-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (64 loc) · 2.22 KB
/
Copy pathrescan-main-images.yml
File metadata and controls
76 lines (64 loc) · 2.22 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Rescan main images
on:
schedule:
- cron: "37 4 * * 1"
workflow_dispatch:
permissions:
contents: read
packages: read
concurrency:
group: rescan-main-images
cancel-in-progress: false
jobs:
rescan:
name: Rescan main's images
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
issues: write
packages: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
persist-credentials: false
- uses: ./.github/actions/setup-node-pnpm
with:
install: "none"
- uses: ./.github/actions/setup-release-security-tools
with:
install-syft: "false"
- name: Log in to Container Registry
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/download-trivy-db
with:
max-age-hours: "24"
metadata-path: reports/trivy-db.json
- name: Scan the images built from main
env:
TRIVY_USERNAME: ${{ github.actor }}
TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: node scripts/scan-main-images.ts reports
# The pinned upstream digests too, so the weekly picture is the release gate's subject set
# rather than half of it. Report-only for the same reason as the images above: a CVE
# published after the digest was pinned belongs to no commit here.
- name: Scan the pinned upstream images
run: node scripts/scan-upstream-images.ts reports --report-only
- name: Upload the vulnerability policy results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: main-image-rescan-${{ github.run_id }}
path: reports
if-no-files-found: warn
retention-days: 30
- name: Route findings to the tracking issue
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node scripts/report-vulnerability-drift.ts reports