-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (68 loc) · 2.43 KB
/
scan-images.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Scan Images
on:
workflow_dispatch:
schedule:
- cron: '00 7 * * *'
jobs:
Scan-Images:
runs-on : ubuntu-latest
permissions:
contents: write
pull-requests: write
name : Scan images
steps :
- uses: actions/checkout@v3
name: Checkout
- name: Cache OpenAF runtime
uses: actions/cache@v3
with:
key : oaf-t8
path: /tmp/oaf
- name: Restore the trivy databases from cache
run : |
wget https://openaf.io/trivy-db.tgz
docker run --rm -v trivy-db:/volume -v $(pwd):/backup busybox tar xzf /backup/trivy-db.tgz -C /volume
- uses: openaf/ojob-action@v4
name: Check latest
with:
ojob: 'ojob.io/sec/genSecBadge'
args: 'image=nmaguiar/hvscs:latest file=.github/sec-latest.svg reportFile=.github/sec-latest.yaml scanOptions="--skip-dirs\ /home/.openvscode-server/**"'
dist: 't8'
- uses: openaf/ojob-action@v4
name: Check build
with:
ojob: 'ojob.io/sec/genSecBadge'
args: 'image=nmaguiar/hvscs:build file=.github/sec-build.svg reportFile=.github/sec-build.yaml scanOptions="--skip-dirs\ /home/.openvscode-server/**"'
dist: 't8'
- uses: openaf/ojob-action@v4
name: Check build lite
with:
ojob: 'ojob.io/sec/genSecBadge'
args: 'image=nmaguiar/hvscs:build-lite file=.github/sec-build-lite.svg reportFile=.github/sec-build-lite.yaml scanOptions="--skip-dirs\ /home/.openvscode-server/**"'
dist: 't8'
- uses: openaf/ojob-action@v4
name: Generate sec-latest.md
with:
ojob: 'ojob.io/util/toMDTree'
args: 'inputFile=.github/sec-latest.yaml file=.github/sec-latest.md'
dist: 't8'
- uses: openaf/ojob-action@v4
name: Generate sec-build.md
with:
ojob: 'ojob.io/util/toMDTree'
args: 'inputFile=.github/sec-build.yaml file=.github/sec-build.md'
dist: 't8'
- uses: openaf/ojob-action@v4
name: Generate sec-build-lite.md
with:
ojob: 'ojob.io/util/toMDTree'
args: 'inputFile=.github/sec-build-lite.yaml file=.github/sec-build-lite.md'
dist: 't8'
- uses: openaf/ojob-action@v4
name: Update badges
env :
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ojob: 'ojob.io/git/hub/contentIn'
args: 'message="update\ badge\ {{date}}/{{time}}" title="Scan\ images\ result" paths=.github/'
dist: 't8'