2021-04-05 17:00:29 -07:00
|
|
|
# Disabling trivy scans while they get troubleshooting for failures
|
2021-04-17 14:50:23 -07:00
|
|
|
---
|
2022-02-21 10:17:34 -05:00
|
|
|
name: Trivy Container Scan
|
2021-04-17 14:50:23 -07:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-10-01 12:57:26 -07:00
|
|
|
- main
|
2021-04-17 14:50:23 -07:00
|
|
|
pull_request:
|
2022-04-11 15:52:49 -04:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-04-17 14:50:23 -07:00
|
|
|
jobs:
|
|
|
|
scan-container:
|
2022-04-11 15:52:49 -04:00
|
|
|
permissions:
|
|
|
|
contents: read # for actions/checkout to fetch code
|
|
|
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
2021-04-17 14:50:23 -07:00
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-18.04
|
2021-11-16 01:25:36 +09:00
|
|
|
timeout-minutes: 60
|
2021-04-17 14:50:23 -07:00
|
|
|
steps:
|
|
|
|
######################
|
|
|
|
# Checkout code base #
|
|
|
|
######################
|
|
|
|
- name: Checkout code
|
2022-03-07 15:34:26 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-02-17 14:03:30 -08:00
|
|
|
|
2021-04-17 14:50:23 -07:00
|
|
|
#################################
|
|
|
|
# Run Trivy Scan of source code #
|
|
|
|
#################################
|
|
|
|
- name: Trivy Scan
|
|
|
|
uses: aquasecurity/trivy-action@master
|
|
|
|
with:
|
|
|
|
scan-type: 'fs'
|
|
|
|
format: 'template'
|
|
|
|
template: '@/contrib/sarif.tpl'
|
|
|
|
output: 'report.sarif'
|
|
|
|
severity: 'HIGH,CRITICAL'
|
2021-02-17 14:03:30 -08:00
|
|
|
|
2021-04-17 14:50:23 -07:00
|
|
|
#################################
|
|
|
|
# Upload report to security tab #
|
|
|
|
#################################
|
|
|
|
- name: Upload Trivy scan results to GitHub Security tab
|
2022-05-02 09:56:21 -05:00
|
|
|
uses: github/codeql-action/upload-sarif@v2
|
2021-04-17 14:50:23 -07:00
|
|
|
with:
|
|
|
|
sarif_file: 'report.sarif'
|