Update release assets #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |