Skip to content

Commit a411f36

Browse files
feat(ci): add security-scan workflow to scan for vulnerabilities in dependencies (#27)
1 parent 239445b commit a411f36

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Security Scan
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
target:
6+
description: "Scan part"
7+
required: true
8+
default: "docker"
9+
type: choice
10+
options:
11+
- docker
12+
- source
13+
image:
14+
description: "Docker image (for 'docker' target). By default ghcr.io/<owner>/<repo>:latest"
15+
required: false
16+
default: ""
17+
only-high-critical:
18+
description: "Scan only HIGH + CRITICAL"
19+
required: false
20+
default: true
21+
type: boolean
22+
trivy-scan:
23+
description: "Run Trivy scan"
24+
required: false
25+
default: true
26+
type: boolean
27+
grype-scan:
28+
description: "Run Grype scan"
29+
required: false
30+
default: true
31+
type: boolean
32+
continue-on-error:
33+
description: "Continue on error"
34+
required: false
35+
default: true
36+
type: boolean
37+
only-fixed:
38+
description: "Show only fixable vulnerabilities"
39+
required: false
40+
default: true
41+
type: boolean
42+
43+
permissions:
44+
contents: read
45+
security-events: write
46+
actions: read
47+
packages: read
48+
49+
jobs:
50+
security-scan:
51+
uses: netcracker/qubership-workflow-hub/.github/workflows/re-security-scan.yml@main
52+
with:
53+
target: ${{ github.event.inputs.target || 'source' }}
54+
image: ${{ github.event.inputs.image || '' }}
55+
only-high-critical: ${{ inputs.only-high-critical}}
56+
trivy-scan: ${{ inputs.trivy-scan }}
57+
grype-scan: ${{ inputs.grype-scan }}
58+
only-fixed: ${{ inputs.only-fixed }}
59+
continue-on-error: ${{ inputs.continue-on-error }}

0 commit comments

Comments
 (0)