Skip to content

Commit 185331f

Browse files
committed
Analyze published image
1 parent d77e2ee commit 185331f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/main.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,19 @@ jobs:
126126
container_scan:
127127
name: Container & deps scan (Trivy)
128128
runs-on: self-hosted
129-
needs: [build]
129+
needs: [push_image]
130130
steps:
131-
# - name: Trivy image (CRITICAL,HIGH)
132-
# uses: aquasecurity/trivy-action@0.28.0
133-
# with:
134-
# scan-type: fs
135-
# image-ref: demo-app:local
136-
# format: sarif
137-
# output: trivy-image.sarif
138-
# ignore-unfixed: true
139-
# severity: CRITICAL,HIGH
140-
# - uses: github/codeql-action/upload-sarif@v3
141-
# with: { sarif_file: trivy-image.sarif }
131+
- name: Trivy image (CRITICAL,HIGH)
132+
uses: aquasecurity/trivy-action@0.28.0
133+
with:
134+
scan-type: image
135+
image-ref: 'ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}'
136+
format: sarif
137+
output: trivy-image.sarif
138+
ignore-unfixed: true
139+
severity: CRITICAL,HIGH
140+
- uses: github/codeql-action/upload-sarif@v3
141+
with: { sarif_file: trivy-image.sarif }
142142

143143
- name: Trivy fs (SCA sobre el repo)
144144
uses: aquasecurity/trivy-action@0.28.0

0 commit comments

Comments
 (0)