2021-04-05 20:00:29 -04:00
|
|
|
# Disabling trivy scans while they get troubleshooting for failures
|
2021-04-17 17:50:23 -04:00
|
|
|
---
|
2022-02-21 10:17:34 -05:00
|
|
|
name: Trivy Container Scan
|
2021-04-17 17:50:23 -04:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-10-01 15:57:26 -04:00
|
|
|
- main
|
2021-04-17 17:50:23 -04:00
|
|
|
pull_request:
|
2023-02-09 01:48:06 -05:00
|
|
|
merge_group:
|
|
|
|
|
2022-04-11 15:52:49 -04:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-04-17 17:50:23 -04: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 17:50:23 -04:00
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-18.04
|
2021-11-15 11:25:36 -05:00
|
|
|
timeout-minutes: 60
|
2021-04-17 17:50:23 -04:00
|
|
|
steps:
|
|
|
|
######################
|
|
|
|
# Checkout code base #
|
|
|
|
######################
|
|
|
|
- name: Checkout code
|
2022-03-07 10:34:26 -05:00
|
|
|
uses: actions/checkout@v3
|
2021-02-17 17:03:30 -05:00
|
|
|
|
2021-04-17 17:50:23 -04: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 17:03:30 -05:00
|
|
|
|
2021-04-17 17:50:23 -04:00
|
|
|
#################################
|
|
|
|
# Upload report to security tab #
|
|
|
|
#################################
|
|
|
|
- name: Upload Trivy scan results to GitHub Security tab
|
2022-05-02 10:56:21 -04:00
|
|
|
uses: github/codeql-action/upload-sarif@v2
|
2021-04-17 17:50:23 -04:00
|
|
|
with:
|
|
|
|
sarif_file: 'report.sarif'
|