Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: Scan Image

on:
workflow_dispatch:
inputs:
cluster:
description: "Cluster whose Secure API token secret to use"
required: true
default: kube
type: choice
options:
- kube
- kubelab

jobs:
scan-from-registry:
Expand All @@ -19,7 +28,7 @@ jobs:
# Tag of the image to analyse
image-tag: sysdiglabs/dummy-vuln-app:latest
# API token for Sysdig Scanning auth
sysdig-secure-token: ${{ secrets.KUBELAB_SECURE_API_TOKEN }}
sysdig-secure-token: ${{ inputs.cluster == 'kubelab' && secrets.KUBELAB_SECURE_API_TOKEN || secrets.KUBE_SECURE_API_TOKEN }}
stop-on-failed-policy-eval: true
stop-on-processing-error: true
severity-at-least: medium
Expand All @@ -45,7 +54,7 @@ jobs:
# Tag of the image to analyse
image-tag: sysdiglabs/dummy-vuln-app:latest
# API token for Sysdig Scanning auth
sysdig-secure-token: ${{ secrets.KUBELAB_SECURE_API_TOKEN }}
sysdig-secure-token: ${{ inputs.cluster == 'kubelab' && secrets.KUBELAB_SECURE_API_TOKEN || secrets.KUBE_SECURE_API_TOKEN }}
stop-on-failed-policy-eval: true
stop-on-processing-error: true
severity-at-least: medium
Expand All @@ -72,7 +81,7 @@ jobs:
# Tag of the image to analyse
image-tag: sysdiglabs/dummy-vuln-app:latest
# API token for Sysdig Scanning auth
sysdig-secure-token: ${{ secrets.KUBELAB_SECURE_API_TOKEN }}
sysdig-secure-token: ${{ inputs.cluster == 'kubelab' && secrets.KUBELAB_SECURE_API_TOKEN || secrets.KUBE_SECURE_API_TOKEN }}
stop-on-failed-policy-eval: false
stop-on-processing-error: true
skip-summary: true
Expand All @@ -84,7 +93,7 @@ jobs:
# Tag of the image to analyse
image-tag: sysdiglabs/dummy-vuln-app:latest
# API token for Sysdig Scanning auth
#sysdig-secure-token: ${{ secrets.KUBELAB_SECURE_API_TOKEN }}
#sysdig-secure-token: ${{ inputs.cluster == 'kubelab' && secrets.KUBELAB_SECURE_API_TOKEN || secrets.KUBE_SECURE_API_TOKEN }}
stop-on-failed-policy-eval: true
stop-on-processing-error: true
standalone: true
Expand All @@ -110,7 +119,7 @@ jobs:
# Tag of the image to analyse
image-tag: hello-world:latest # This one should never have vulns
# API token for Sysdig Scanning auth
sysdig-secure-token: ${{ secrets.KUBELAB_SECURE_API_TOKEN }}
sysdig-secure-token: ${{ inputs.cluster == 'kubelab' && secrets.KUBELAB_SECURE_API_TOKEN || secrets.KUBE_SECURE_API_TOKEN }}
stop-on-failed-policy-eval: true
stop-on-processing-error: true
severity-at-least: medium
Expand Down
Loading