Skip to content

feat: add validation script for nvd json files #5098

feat: add validation script for nvd json files

feat: add validation script for nvd json files #5098

Workflow file for this run

name: CVE scan
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
cve_scan:
name: CVE scan on dependencies
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: '**/requirements.txt'
- name: Get date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
- name: Get cached database
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: cache
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.date }}
- name: Install dependencies and 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 --upgrade pytest
pip install . -r doc/requirements.txt
[[ -e cache ]] && mkdir -p .cache && mv -f cache .cache/cve-bin-tool
sleep 5
- name: Test to check for CVEs for Python requirements and HTML report dependencies
run: |
pytest test/test_requirements.py