Files
cve/.github/workflows/site.yml
T
0xMarcio 46b5acf052 Tighten the writers: timeouts, a shorter audit, fewer bytes in git
Every writer now has a timeout, so a hung download cannot hold the
repository-updates lock for six hours and cancel the runs queued behind
it. The link audit moves from one 12,000-and-12,000 batch a week, which
measured an hour under that lock, to a seventh of it every day.

The social card PNG is drawn at deploy time and no longer committed: it
changed about four times a day at 68 KB a copy. nuclei.json stops
mirroring EPSS scores; every indexed CVE already has one in epss.json,
the site never fell back to the copy, and the daily recomputation
rewrote 3,400 lines of it each night.

The metadata sync retries GitHub advisory calls on 403, 429 and 5xx
instead of failing on the first one, and refuses to publish a year
shard that an NVD feed would shrink by a tenth or delete outright.
2026-09-04 00:36:16 +02:00

78 lines
1.9 KiB
YAML

name: Build & Deploy PoC Index
on:
schedule:
- cron: '20 6 * * *'
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.13'
- name: Build site data
run: python3 scripts/build_site.py
- name: Build per-CVE pages
run: python3 scripts/build_pages.py
- name: Build robots.txt and sitemaps
run: python3 scripts/build_seo.py
- name: Rasterise the social card
run: |
# og:image has to be a raster: Twitter, Slack and Discord all ignore SVG.
# Drawn here so the PNG lives in the deployed artifact, not in git.
sudo apt-get update -qq >/dev/null
sudo apt-get install -y --no-install-recommends librsvg2-bin >/dev/null
rsvg-convert -w 1280 -h 640 docs/social-card.svg -o docs/social-card.png
- name: Verify published counts
run: |
python3 .github/hero.py
python3 .github/getTrending.py --counts-only
git diff --exit-code -- \
README.md \
docs/hero.svg \
docs/social-card.svg \
docs/stats.json
- name: Configure Pages
uses: actions/configure-pages@v6
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: docs
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v5