-
Notifications
You must be signed in to change notification settings - Fork 465
59 lines (53 loc) · 1.72 KB
/
update-cache.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
name: Update cached database
on:
push:
branches:
- main
paths:
- 'data/**'
schedule:
# Runs at 00:20 UTC everyday
- cron: '20 0 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
NO_EXIT_CVE_NUM: 1
nvd_api_key: ${{ secrets.NVD_API_KEY }}
permissions:
contents: read
jobs:
linux:
name: Update linux cached database
runs-on: 'ubuntu-latest'
timeout-minutes: 60
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.10'
cache: 'pip'
- name: Get date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: cache
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.date }}
- name: Install cve-bin-tool
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade wheel
python -m pip install --editable .
- name: Update database
run: |
[[ -e cache ]] && mkdir -p .cache && mv cache ~/.cache/cve-bin-tool
python -m cve_bin_tool.cli test/assets/test-kerberos-5-1.15.1.out -u now
python -m cve_bin_tool.mismatch_loader
cp -r ~/.cache/cve-bin-tool cache
# Windows cache is currently disabled.