name: Sync PoC-in-GitHub on: schedule: - cron: '10 5 * * 3' workflow_dispatch: 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' # Every candidate is judged again each week rather than remembered as # rejected: a repository that was an empty shell in March is often a # working exploit by June, and re-reading 6,800 of them costs five # minutes. - name: Judge upstream PoC candidates env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: python3 scripts/sync_pocingithub.py - 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 'bot@pocindex.io' git add --all -- \ README.md \ docs/hero.svg \ docs/social-card.svg \ docs/stats.json \ index/github.txt \ index/cve_dates.json \ index/cve_record_state.json \ cves/ if git diff --cached --quiet; then echo "No changes to commit" exit 0 fi git commit -m "Add PoC repositories from upstream collection $(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