nvd cache #427
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: nvd cache | |
on: | |
schedule: | |
- cron: '0 11 * * *' | |
workflow_dispatch: | |
# Needed so we can run it manually | |
jobs: | |
build: | |
permissions: | |
contents: write | |
name: Update NVD API Cache | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: gh-pages | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' # See 'Supported distributions' for available options | |
java-version: '11' | |
- name: update | |
env: | |
NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | |
run: | | |
curl https://github.com/jeremylong/Open-Vulnerability-Project/releases/download/v7.0.1/vulnz-7.0.1.jar -s -L -o vulnz.jar | |
git reset --soft HEAD~1 | |
ls -la . | |
java -jar vulnz.jar cve --cache --directory ./nvd_cache --threads=4 --debug --delay=8000 --maxRetry=40 --recordsPerPage=1000 | |
rm vulnz.jar | |
git status | |
cat nvd_cache/cache.properties | |
git config user.email "[email protected]" | |
git config user.name "GitHub Actions" | |
git add ./nvd_cache/ | |
git commit -am 'chore: update' | |
git push origin gh-pages --force |