44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: NVD Synchronisation
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "27 */2 * * *"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
mirror:
|
|
runs-on: vuln-runner
|
|
timeout-minutes: 360
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
persist-credentials: true
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: Tools prüfen
|
|
run: |
|
|
python3 --version
|
|
git --version
|
|
|
|
- name: NVD synchronisieren
|
|
env:
|
|
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
|
|
run: python3 scripts/sync.py --since-year 2017
|
|
|
|
- name: Neue oder geänderte Datensätze prüfen
|
|
run: python3 scripts/validate.py --changed-only
|
|
|
|
- name: Änderungen committen und übertragen
|
|
run: |
|
|
git config user.name "Vulnerability Bot"
|
|
git config user.email "vuln-bot@users.noreply.local"
|
|
git add -A data/ state/
|
|
if git diff --cached --quiet; then
|
|
echo "Keine Änderungen"
|
|
exit 0
|
|
fi
|
|
git commit -m "NVD update $(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
git push origin HEAD:main
|