This repository has been archived by the owner on May 30, 2024. It is now read-only.
forked from stevencox/tycho
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding trivy vulnerability scan and updates to dependabot
- Loading branch information
1 parent
0b05b21
commit e3817e5
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: trivy-pr-scan | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- master | ||
- main | ||
types: [ opened, synchronize ] | ||
paths-ignore: | ||
- README.md | ||
- .old_cicd/* | ||
- .github/* | ||
- .github/workflows/* | ||
- LICENSE | ||
- .gitignore | ||
- .dockerignore | ||
- .githooks | ||
|
||
jobs: | ||
trivy-pr-scan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# We will not be concerned with Medium and Low vulnerabilities | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: 'fs' | ||
format: 'sarif' | ||
severity: 'CRITICAL,HIGH' | ||
output: 'trivy-results.sarif' | ||
exit-code: '1' | ||
# Scan results should be viewable in GitHub Security Dashboard | ||
# We still fail the job if results are found, so below will always run | ||
# unless manually canceled. | ||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
if: '!cancelled()' | ||
with: | ||
sarif_file: 'trivy-results.sarif' |