Skip to content

Commit 77a7478

Browse files
committed
Bonus
1 parent fd44838 commit 77a7478

File tree

1 file changed

+39
-12
lines changed

1 file changed

+39
-12
lines changed

.github/workflows/sysdig-scan.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,69 @@
1-
name: Sysdig Scan (Official Action)
1+
name: Sysdig Secure Scanning
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- ci/sysdig-integration
5+
branches: [main, ci/sysdig-integration]
86
pull_request:
9-
branches:
10-
- main
11-
- ci/sysdig-integration
7+
branches: [main, ci/sysdig-integration]
128

139
jobs:
1410
scan:
15-
name: Docker + IaC Scan via Sysdig Action
1611
runs-on: ubuntu-latest
12+
name: Scan vote / worker / result + IaC
1713

1814
steps:
1915
- name: Checkout source
2016
uses: actions/checkout@v3
2117

22-
- name: Build vote Docker image
23-
run: |
24-
docker build ./vote -t vote-app:${{ github.sha }}
18+
# Build Docker images
19+
- name: Build vote image
20+
run: docker build ./vote -t vote-app:${{ github.sha }}
2521

22+
- name: Build worker image
23+
run: docker build ./worker -t worker-app:${{ github.sha }}
24+
25+
- name: Build result image
26+
run: docker build ./result -t result-app:${{ github.sha }}
27+
28+
# Scan vote
2629
- name: Scan vote image with Sysdig
2730
uses: sysdiglabs/scan-action@v6
2831
with:
2932
image-tag: vote-app:${{ github.sha }}
3033
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}
3134
sysdig-secure-url: ${{ secrets.SYSDIG_API_URL }}
3235
stop-on-processing-error: true
36+
cli-scanner-version: 1.22.3
37+
38+
# Scan worker
39+
- name: Scan worker image with Sysdig
40+
uses: sysdiglabs/scan-action@v6
41+
with:
42+
image-tag: worker-app:${{ github.sha }}
43+
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}
44+
sysdig-secure-url: ${{ secrets.SYSDIG_API_URL }}
45+
stop-on-processing-error: true
46+
cli-scanner-version: 1.22.3
3347

48+
# Scan result
49+
- name: Scan result image with Sysdig
50+
uses: sysdiglabs/scan-action@v6
51+
with:
52+
image-tag: result-app:${{ github.sha }}
53+
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}
54+
sysdig-secure-url: ${{ secrets.SYSDIG_API_URL }}
55+
stop-on-processing-error: true
56+
cli-scanner-version: 1.22.3
57+
58+
# Scan IaC
3459
- name: Scan Kubernetes IaC manifests
3560
uses: sysdiglabs/scan-action@v6
61+
continue-on-error: true # IaC scan failure should not block main scan
3662
with:
3763
mode: iac
38-
cli-scanner-version: 1.24.2
3964
iac-scan-path: k8s-specifications
4065
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}
4166
sysdig-secure-url: ${{ secrets.SYSDIG_API_URL }}
4267
stop-on-processing-error: true
68+
cli-scanner-version: 1.23.3
69+

0 commit comments

Comments
 (0)