Auto advisory import #35388
This file contains hidden or 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: Auto advisory import | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
jobs: | |
job: | |
continue-on-error: false | |
name: Auto import | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.16.4' | |
- run: | | |
wget https://pypa-advisory-db.storage.googleapis.com/triage/pypi_links.json | |
wget https://pypa-advisory-db.storage.googleapis.com/triage/pypi_versions.json | |
- run: | | |
for year in $(seq 2002 $(date +%Y)); do | |
wget https://storage.googleapis.com/cve-osv-conversion/nvd/nvdcve-2.0-$year.json; | |
done | |
- run: | | |
go install github.com/google/osv/vulnfeeds/cmd/pypi@master | |
for nvdfile in nvdcve-2.0-*.json; do | |
pypi -false_positives triage/false_positives.yaml \ | |
-nvd_json $nvdfile \ | |
-pypi_links pypi_links.json \ | |
-pypi_versions pypi_versions.json \ | |
-out_dir vulns \ | |
-without_notes \ | |
-exclude_unbounded; | |
done | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add vulns | |
git diff --cached | |
env: | |
GONOPROXY: github.com/google/osv | |
- run: git diff --cached --quiet || git commit -m 'Auto import' | |
- run: git push |