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
|
2023-04-10 14:34:26 -04:00
|
|
|
runs-on: ubuntu-latest
|
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
|
2023-09-11 19:17:22 -04:00
|
|
|
uses: actions/checkout@v4
|
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
|
2023-12-18 13:19:50 -05:00
|
|
|
uses: github/codeql-action/upload-sarif@v3
|
2021-04-17 17:50:23 -04:00
|
|
|
with:
|
|
|
|
sarif_file: 'report.sarif'
|