Skip to content

feat: Added CI-PRE-CHECKER for VENDOR_PRODUCT #5618

feat: Added CI-PRE-CHECKER for VENDOR_PRODUCT

feat: Added CI-PRE-CHECKER for VENDOR_PRODUCT #5618

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@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
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@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
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