-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (47 loc) · 1.84 KB
/
update_release_assets.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
name: Update release assets
on:
schedule:
- cron: "15 4 1,8,16,24 * *"
workflow_dispatch:
jobs:
build-artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout search_vulns code
uses: actions/checkout@v4
- name: Set up Python and Pip
uses: actions/setup-python@v5
with:
cache: 'pip'
python-version: '3.10'
- name: Upgrade Pip
run: python3 -m pip install --upgrade pip
- name: Install tool and build DB
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
VULNCHECK_API_KEY: ${{ secrets.VULNCHECK_API_KEY }}
run: NVD_API_KEY=$NVD_API_KEY VULNCHECK_API_KEY=$VULNCHECK_API_KEY ./install.sh --full
- name: Test CVE Completeness
run: python3 ./tests/test_cve_completeness.py
- name: Test CVE Attribute Completeness
run: python3 ./tests/test_cve_attr_completeness.py
- name: Test Exploit Completeness
run: python3 ./tests/test_exploit_completeness.py
- name: Test Version Comparison Correctness
run: python3 ./tests/test_version_comparison.py
# - name: Test endoflife.date Correctness
# run: python3 ./tests/test_eol_date.py
- name: Get latest release tag
run: |
LATEST_TAG=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/ra1nb0rn/search_vulns/releases/latest | jq -r '.tag_name')
echo "LATEST_RELEASE_TAG=$LATEST_TAG" >> $GITHUB_ENV
- name: Update resource files of latest release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.LATEST_RELEASE_TAG }}
files: |
resources/vulndb.db3
resources/cveid_to_edbid.json
resources/cpe-search-dictionary.db3
resources/deprecated-cpes.json