Skip to content

Commit 43c36ca

Browse files
committed
Switch to CLI-based Sysdig scan using curl
1 parent cc5fa03 commit 43c36ca

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/sysdig-scan.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
scan:
15-
name: Sysdig Scan Docker + IaC (Docker version)
15+
name: Sysdig Scan Docker + IaC (loaded image method)
1616
runs-on: ubuntu-latest
1717

1818
steps:
@@ -27,10 +27,15 @@ jobs:
2727
docker build -t vote-image ./vote
2828
docker save vote-image -o vote-image.tar
2929
30-
- name: Scan Docker image from archive with Sysdig
30+
- name: Load and tag image
3131
run: |
32-
docker run --rm --platform linux/amd64 -e SECURE_API_TOKEN=${{ secrets.SYSDIG_SECURE_TOKEN }} -v ${{ github.workspace }}/vote-image.tar:/tmp/vote-image.tar quay.io/sysdig/sysdig-cli-scanner:latest --standalone --input-file /tmp/vote-image.tar vote-image:ci
32+
docker load -i vote-image.tar
33+
docker tag vote-image:latest vote-image:ci
34+
35+
- name: Scan Docker image using tag
36+
run: |
37+
docker run --rm -e SECURE_API_TOKEN=${{ secrets.SYSDIG_SECURE_TOKEN }} quay.io/sysdig/sysdig-cli-scanner:latest --apiurl ${{ secrets.SYSDIG_API_URL }} vote-image:ci
3338
3439
- name: Scan IaC (k8s-specifications)
3540
run: |
36-
docker run --rm --platform linux/amd64 -e SECURE_API_TOKEN=${{ secrets.SYSDIG_SECURE_TOKEN }} -v ${{ github.workspace }}:/iac quay.io/sysdig/sysdig-cli-scanner:latest --apiurl ${{ secrets.SYSDIG_API_URL }} --iac scan /iac/k8s-specifications
41+
docker run --rm -e SECURE_API_TOKEN=${{ secrets.SYSDIG_SECURE_TOKEN }} -v ${{ github.workspace }}:/iac quay.io/sysdig/sysdig-cli-scanner:latest --apiurl ${{ secrets.SYSDIG_API_URL }} --iac scan /iac/k8s-specifications

0 commit comments

Comments
 (0)