Files
cve/.github/workflows/sync_nuclei.yml
T
0xMarcio a7449da61b Move the year directories out of the repository root
Twenty-eight year folders sat above the README, so anyone opening the
repository scrolled past 1999 through 2026 before reaching a word about what
it is. The entries move to cves/ and the files the pipeline reads and writes
move to index/, which leaves the root at README, LICENSE and five
directories.

Nothing about the data changes. Every script takes its two roots from the
same place, and all five syncs report zero writes against the moved tree,
which is what a correct repoint looks like.
2026-09-01 14:43:38 +02:00

52 lines
1.3 KiB
YAML

name: Sync Nuclei Templates
on:
workflow_dispatch:
schedule:
- cron: '25 4 * * *'
permissions:
contents: write
concurrency:
group: repository-updates
cancel-in-progress: false
jobs:
ScheduledRun:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.13'
- name: Pull templates and fold them into the index
run: python3 scripts/sync_nuclei.py
- name: Check for changes and commit
run: |
git config user.name 'CVE-BOT'
git config user.email '[email protected]'
git add -u
git add -- index/nuclei.json
if git diff --cached --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "Sync nuclei templates $(date -u +'%Y-%m-%d') :robot:"
for attempt in 1 2 3; do
if git push origin HEAD:main; then
exit 0
fi
echo "Push rejected; replaying onto the current main (attempt $attempt)"
git fetch --unshallow origin main 2>/dev/null || git fetch origin main
git rebase FETCH_HEAD
done
exit 1