Skip to content

Commit 129bec0

Browse files
authored
Update trivy.yml
1 parent ab1ad17 commit 129bec0

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

.github/workflows/trivy.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,15 @@ jobs:
99

1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v3
13-
14-
- name: Install dependencies
15-
run: |
16-
sudo apt-get update -y
17-
sudo apt-get install -y wget apt-transport-https ca-certificates
18-
19-
- name: Install Trivy
20-
run: |
21-
wget https://github.com/aquasecurity/trivy/releases/latest/download/trivy_Linux-64bit.deb
22-
sudo dpkg -i trivy_Linux-64bit.deb
12+
uses: actions/checkout@v4
2313

2414
- name: Build Docker image
2515
run: docker build -t devsecops-scan .
2616

27-
- name: Run Trivy image scan (fail on HIGH/CRITICAL)
28-
run: trivy image --exit-code 1 --severity HIGH,CRITICAL devsecops-scan
17+
- name: Run Trivy (action)
18+
uses: aquasecurity/trivy-action@v0.9.0
19+
with:
20+
image-ref: devsecops-scan
21+
format: table
22+
severity: HIGH,CRITICAL
23+
exit-code: 1

0 commit comments

Comments
 (0)