-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (52 loc) · 1.92 KB
/
SAST-Kubesec.yml
File metadata and controls
61 lines (52 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# https://kubesec.io/
# https://github.com/controlplaneio/kubesec
# https://github.com/controlplaneio/kubesec-action
name: SAST Kubesec Scanner
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '18 8 * * 6'
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
jobs:
kubesec-scan-1:
name: Kubesec Scan 1
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run kubesec scanner (critical-double.yaml)
uses: controlplaneio/kubesec-action@43d0ddff5ffee89a6bb9f29b64cd865411137b14
with:
input: manifests/critical-double.yaml # specify configuration file to scan here
format: template
template: manifests/sarif.tpl
output: kubesec-results.sarif
exit-code: "0"
- name: Upload Kubesec scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: kubesec-results.sarif
kubesec-scan-2:
name: Kubesec Scan 2
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run kubesec scanner (score-5-pod-serviceaccount.yaml)
uses: controlplaneio/kubesec-action@43d0ddff5ffee89a6bb9f29b64cd865411137b14
with:
input: manifests/score-5-pod-serviceaccount.yaml # specify configuration file to scan here
format: template
template: manifests/sarif.tpl
output: kubesec-results.sarif
exit-code: "0"
- name: Upload Kubesec scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: kubesec-results.sarif