Skip to content

Commit 5316ced

Browse files
authored
Update Trivy workflow to remove image build step
Removed the Docker image build step and updated Trivy scan configuration.
1 parent 9603ba2 commit 5316ced

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

.github/workflows/trivy.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@ jobs:
2929
- name: Checkout code
3030
uses: actions/checkout@v4
3131

32-
- name: Build an image from Dockerfile
33-
run: |
34-
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
35-
3632
- name: Run Trivy vulnerability scanner
3733
uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe
3834
with:
39-
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
35+
scan-type: repo # or "fs"
36+
scan-ref: . # current repo
4037
format: 'template'
4138
template: '@/contrib/sarif.tpl'
4239
output: 'trivy-results.sarif'

0 commit comments

Comments
 (0)