Skip to content

Commit 505b2aa

Browse files
Create trivy.yaml
1 parent 58e155a commit 505b2aa

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/trivy.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Run Trivy vulnerability scanner in repo mode
16+
uses: aquasecurity/trivy-action@master
17+
with:
18+
scan-type: 'fs'
19+
ignore-unfixed: true
20+
format: 'sarif'
21+
output: 'trivy-results.sarif'
22+
severity: 'CRITICAL'
23+
24+
- name: Upload Trivy scan results to GitHub Security tab
25+
uses: github/codeql-action/upload-sarif@v2
26+
with:
27+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)