Files
cve/.github/workflows/sync_metadata.yml
T
0xMarcio 31da22381c Rebrand to PoC Index and move to pocindex.io
The site called itself three different things: CVE PoC Hub in the title, CVE
Radar in the h1 and the social metadata, and cve on GitHub. Google had no
consistent site name to settle on, so none of the mentions compounded. CVE
Radar was taken anyway, by SOCRadar's free tool and by cveradar.com.

Every user-facing name and URL now comes from scripts/brand.py, so the next
move is one edit rather than a sweep through the tree.

Also repairs the parts of the site a crawler could not use:

- robots.txt and sitemap.xml were both 404. scripts/build_seo.py writes them,
  wired into the Pages job. trending_poc.json, kev.json and stats.json stay
  crawlable because the first paint needs them; the five bulk payloads are
  disallowed, which is 13.2 MB per crawl spent on data no crawler queries.
- Search state lives in ?q= now. Results were unlinkable, so nobody could cite
  one and there was no route for a SearchAction to declare. replaceState
  rather than pushState, so typing does not bury the back button.
- A WebSite JSON-LD block carries the name Google prints as the site name.
- The footer carries the MITRE trademark notice.
2026-09-02 03:36:22 +02:00

90 lines
2.4 KiB
YAML

name: Sync CVE Metadata
on:
schedule:
- cron: '10 3 * * 1-6'
- cron: '10 3 * * 0'
workflow_dispatch:
inputs:
full:
description: Rebuild NVD and the reviewed GitHub advisory cache
required: false
default: false
type: boolean
permissions:
contents: write
concurrency:
group: repository-updates
cancel-in-progress: false
jobs:
sync:
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 CVSS, advisory and advisory PoC metadata
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
if [ "${{ github.event.schedule }}" = "10 3 * * 0" ] || [ "${{ inputs.full }}" = "true" ]; then
python3 scripts/sync_cve_metadata.py --full
else
python3 scripts/sync_cve_metadata.py
fi
- name: Refresh CISA known-exploited status
run: python3 scripts/audit_poc_links.py --kev-only
- name: Verify the generated index
run: |
python3 -m unittest discover -s tests
python3 scripts/build_site.py
- name: Refresh published counts
run: |
python3 .github/hero.py
python3 .github/getTrending.py --counts-only
- name: Check for changes and commit
run: |
git config user.name 'CVE-BOT'
git config user.email '[email protected]'
git add -- \
README.md \
cves/ \
docs/hero.svg \
docs/social-card.svg \
docs/stats.json \
index/cve_dates.json \
index/cve_record_state.json \
index/github_advisories.json \
index/kev.json \
index/metadata/ \
index/references.txt
if git diff --cached --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "Sync CVE metadata $(date -u +'%Y-%m-%d')"
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