File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Snyk scan for training‑runtime Dockerfiles
2
+ # push to main, nightly 03:00 UTC, fork PRs after label `run‑snyk`
3
+ # Fails on High/Critical CVEs
4
+ name : Snyk Dockerfile Scan
5
+ on :
6
+ push :
7
+ branches : [ main ]
8
+ pull_request_target :
9
+ types : [ labeled ]
10
+ schedule :
11
+ - cron : ' 0 3 * * *'
12
+ jobs :
13
+ snyk-scan :
14
+ if : |
15
+ github.event_name == 'schedule' ||
16
+ github.event_name == 'push' ||
17
+ (github.event_name == 'pull_request_target' &&
18
+ contains(github.event.pull_request.labels.*.name, 'run-snyk'))
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+ with :
23
+ # for pull_request_target scan the PR head commit
24
+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
25
+ - uses : snyk/actions/setup@master
26
+ with :
27
+ token : ${{ secrets.SNYK_TOKEN }}
28
+ - name : Scan Dockerfiles
29
+ shell : bash
30
+ run : |
31
+ set -euo pipefail
32
+ find images/runtime/training -name Dockerfile | while read f; do
33
+ snyk iac test "$f" --severity-threshold=high
34
+ done
You can’t perform that action at this time.
0 commit comments