Skip to content

Commit ec3195f

Browse files
authored
ci: add test step to validate scanning of image without vulns
1 parent 0b0535e commit ec3195f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/scan.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,30 @@ jobs:
9494
uses: github/codeql-action/upload-sarif@v3
9595
with:
9696
sarif_file: ${{ github.workspace }}/sarif.json
97+
98+
scan-image-without-vulns:
99+
runs-on: ubuntu-latest
100+
101+
steps:
102+
# This step checks out a copy of your repository.
103+
- name: Check out repository
104+
uses: actions/checkout@v4
105+
106+
- name: Scan hello-world from registry
107+
id: scan
108+
uses: ./
109+
with:
110+
# Tag of the image to analyse
111+
image-tag: hello-world:latest # This one should never have vulns
112+
# API token for Sysdig Scanning auth
113+
sysdig-secure-token: ${{ secrets.KUBELAB_SECURE_API_TOKEN }}
114+
stop-on-failed-policy-eval: true
115+
stop-on-processing-error: true
116+
severity-at-least: medium
117+
group-by-package: true
118+
119+
- name: Upload SARIF file
120+
if: success() || failure() # Upload results regardless previous step fails
121+
uses: github/codeql-action/upload-sarif@v3
122+
with:
123+
sarif_file: ${{ github.workspace }}/sarif.json

0 commit comments

Comments
 (0)