-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (44 loc) · 1.63 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
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@v3
- name: Set up Python and Pip
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: '3.8'
- name: Upgrade Pip
run: python3 -m pip install --upgrade pip
- name: Install tool and build DB
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
run: NVD_API_KEY=$NVD_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 Related Queries Functionality
run: python3 ./tests/test_related_queries.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@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.LATEST_RELEASE_TAG }}
files: |
vulndb.db3
cveid_to_edbid.json
cpe_search/cpe-search-dictionary.db3
cpe_search/deprecated-cpes.json