-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (59 loc) · 1.85 KB
/
Copy pathrescan-main-images.yml
File metadata and controls
70 lines (59 loc) · 1.85 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
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
- 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