Skip to content

Commit ee85da0

Browse files
authored
Create trivy.yml
1 parent 2cfb817 commit ee85da0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/trivy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Trivy Scan
2+
on:
3+
push:
4+
branches: [ main ]
5+
jobs:
6+
scan:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Code
10+
uses: actions/checkout@v3
11+
12+
- name: Install Trivy
13+
run: |
14+
sudo apt-get install wget -y
15+
wget https://github.com/aquasecurity/trivy/releases/latest/download/trivy_Linux-64bit.deb
16+
sudo dpkg -i trivy_Linux-64bit.deb
17+
- name: Build Docker Image
18+
run: docker build -t devsecops-scan .
19+
- name: Run Trivy Scan
20+
run: trivy image --exit-code 1 --severity HIGH,CRITICAL devsecops-scan

0 commit comments

Comments
 (0)