Skip to content

Commit 1ff0777

Browse files
xdxxxdxcaspervg
authored andcommitted
Update Trivy-secrete-scan.yaml
1 parent 13de81b commit 1ff0777

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed
Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1-
name: build
1+
name: Code Scanning
2+
23
on:
34
push:
45
branches:
56
- main
6-
pull_request:
7+
8+
permissions:
9+
actions: read
10+
security-events: write
11+
712
jobs:
8-
build:
9-
name: Build
13+
code-scanning:
1014
runs-on: ubuntu-latest
11-
permissions:
12-
contents: read
13-
security-events: write
1415
steps:
1516
- name: Checkout code
16-
uses: actions/checkout@v4
17+
uses: actions/checkout@v3
1718

18-
- name: Run Trivy vulnerability scanner in repo mode
19-
uses: aquasecurity/trivy-action@0.28.0
20-
with:
21-
scan-type: 'fs'
22-
ignore-unfixed: true
23-
format: 'sarif'
24-
output: 'trivy-results.sarif'
25-
severity: 'CRITICAL'
19+
- name: Run Trivy
20+
env:
21+
TRIVY_IGNORE_UNFIXED: true
22+
TRIVY_SEVERITY: CRITICAL
23+
TRIVY_FORMAT: sarif
24+
TRIVY_OUTPUT: trivy-results.sarif
25+
run: |
26+
trivy fs --ignore-unfixed --severity CRITICAL --format sarif --output trivy-results.sarif .
2627
27-
- name: Upload Trivy scan results to GitHub Security tab
28+
- name: Upload SARIF
2829
uses: github/codeql-action/upload-sarif@v3
2930
with:
30-
sarif_file: 'trivy-results.sarif'
31+
sarif_file: trivy-results.sarif
32+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)