A Claude Code skill bundle for bug hunting and external red-team work - 82 skills, 15 slash commands, 681 disclosed-report patterns curated across 24 core vulnerability classes, plus enterprise identity + infrastructure attack matrices.
Python ai-securityanthropicapplication-securitybug-bountybugbountybugcrowdclaudeclaude-codeclaude-skillsethical-hackinghackeroneoffensive-securitypentestingred-teamsecurity-toolsweb-security
Phase 3.2: CISA KEV coverage refresh script (+ workflow template)
Sachin Sharma0bca621b2727
diff --git a/docs/automation/cve-refresh.yml.template b/docs/automation/cve-refresh.yml.templatenew file mode 100644index 0000000..d74771f--- /dev/null+++ b/docs/automation/cve-refresh.yml.template@@ -0,0 +1,88 @@+name: CVE Coverage Refresh++# Weekly check against CISA KEV — surfaces CVEs added to the catalog+# that aren't yet documented in our skills or disclosed-reports library.+#+# When coverage gaps appear, the job opens (or updates) a tracking issue+# so the team can pick up the highest-priority entries.++on:+ schedule:+ # Every Monday at 14:00 UTC+ - cron: "0 14 * * 1"+ workflow_dispatch: # allow manual runs++permissions:+ contents: read+ issues: write++jobs:+ cve-refresh:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4++ - name: Set up Python+ uses: actions/setup-python@v5+ with:+ python-version: "3.12"++ - name: Run CVE coverage check+ id: cve_check+ run: |+ # 90-day lookback window — newer entries are higher priority+ OUTPUT=$(scripts/refresh-cve-index.py --days 90 --max 30 2>&1)+ EXIT=$?+ echo "$OUTPUT"+ {+ echo "report<<EOF"+ echo "$OUTPUT"+ echo "EOF"+ } >> "$GITHUB_OUTPUT"+ # Exit 0 even if gaps found — we open an issue instead+ echo "exit_status=$EXIT" >> "$GITHUB_OUTPUT"++ - name: Open or update tracking issue (if gaps)+ if: steps.cve_check.outputs.exit_status != '0'+ uses: actions/github-script@v7+ env:+ REPORT: ${{ steps.cve_check.outputs.report }}+ with:+ script: |+ const report = process.env.REPORT;+ const issueTitle = "CISA KEV coverage gaps — weekly refresh";+ const body = [+ "**Automated weekly CVE coverage check.** Lookback window: 90 days. In-scope vendor list at `scripts/refresh-cve-index.py`.",+ "",+ "To close a gap: add a Pattern Library entry in `docs/disclosed-reports/hunt-<class>.md` and an exploit summary in `skills/hunt-<class>/SKILL.md`.",+ "",+ "```",+ report,+ "```",+ ].join("\n");++ const { data: existing } = await github.rest.issues.listForRepo({+ owner: context.repo.owner,+ repo: context.repo.repo,+ state: "open",+ labels: "cve-coverage",+ });+ const found = existing.find(i => i.title === issueTitle);+ if (found) {+ await github.rest.issues.update({+ owner: context.repo.owner,+ repo: context.repo.repo,+ issue_number: found.number,+ body,+ });+ console.log(`Updated existing issue #${found.number}`);+ } else {+ await github.rest.issues.create({+ owner: context.repo.owner,+ repo: context.repo.repo,+ title: issueTitle,+ body,+ labels: ["cve-coverage", "automation"],+ });+ console.log("Opened new tracking issue");+ }diff --git a/docs/cve-coverage.md b/docs/cve-coverage.mdnew file mode 100644index 0000000..0abec7b--- /dev/null+++ b/docs/cve-coverage.md@@ -0,0 +1,55 @@++# CISA KEV coverage snapshot++Auto-generated by `scripts/refresh-cve-index.py`. Re-run with:++```bash+scripts/refresh-cve-index.py --markdown --days 180 --max 30 > docs/cve-coverage.md+```++- **CISA KEV catalog version:** 2026.05.15+- **Total KEV vulnerabilities:** 1592+- **CVE IDs indexed in this repo:** 91++## Coverage report (180-day lookback, in-scope vendors only)++- **In-scope CVEs:** 54+- **Already indexed:** 0+- **Gaps:** 54++## Top 30 in-scope CVEs NOT indexed (newest first)++| Date added | CVE | Vendor | Product | Vulnerability |+|---|---|---|---|---|+| 2026-05-15 | `CVE-2026-42897` | Microsoft | Microsoft | Microsoft Exchange Server Cross-Site Scripting Vulnerability |+| 2026-05-14 | `CVE-2026-20182` | Cisco | Catalyst SD-WAN | Cisco Catalyst SD-WAN Controller Authentication Bypass Vulnerability |+| 2026-05-07 | `CVE-2026-6973` | Ivanti | Endpoint Manager Mobile (EPMM) | Ivanti Endpoint Manager Mobile (EPMM) Improper Input Validation Vulnerability |+| 2026-05-06 | `CVE-2026-0300` | Palo Alto Networks | PAN-OS | Palo Alto Networks PAN-OS Out-of-bounds Write Vulnerability |+| 2026-04-30 | `CVE-2026-41940` | WebPros | cPanel & WHM and WP2 (WordPress Squared) | WebPros cPanel & WHM and WP2 (WordPress Squared) Missing Authentication for Critical Funct |+| 2026-04-28 | `CVE-2026-32202` | Microsoft | Windows | Microsoft Windows Protection Mechanism Failure Vulnerability |+| 2026-04-22 | `CVE-2026-33825` | Microsoft | Defender | Microsoft Defender Insufficient Granularity of Access Control Vulnerability |+| 2026-04-20 | `CVE-2026-20122` | Cisco | Catalyst SD-WAN Manger | Cisco Catalyst SD-WAN Manager Incorrect Use of Privileged APIs Vulnerability |+| 2026-04-20 | `CVE-2026-20133` | Cisco | Catalyst SD-WAN Manager | Cisco Catalyst SD-WAN Manager Exposure of Sensitive Information to an Unauthorized Actor V |+| 2026-04-20 | `CVE-2026-20128` | Cisco | Catalyst SD-WAN Manager | Cisco Catalyst SD-WAN Manager Storing Passwords in a Recoverable Format Vulnerability |+| 2026-04-16 | `CVE-2026-34197` | Apache | ActiveMQ | Apache ActiveMQ Improper Input Validation Vulnerability |+| 2026-04-14 | `CVE-2009-0238` | Microsoft | Office | Microsoft Office Remote Code Execution |+| 2026-04-14 | `CVE-2026-32201` | Microsoft | SharePoint Server | Microsoft SharePoint Server Improper Input Validation Vulnerability |+| 2026-04-13 | `CVE-2012-1854` | Microsoft | Visual Basic for Applications (VBA) | Microsoft Visual Basic for Applications Insecure Library Loading Vulnerability |+| 2026-04-13 | `CVE-2025-60710` | Microsoft | Windows | Microsoft Windows Link Following Vulnerability |+| 2026-04-13 | `CVE-2023-21529` | Microsoft | Exchange Server | Microsoft Exchange Server Deserialization of Untrusted Data Vulnerability |+| 2026-04-13 | `CVE-2023-36424` | Microsoft | Windows | Microsoft Windows Out-of-Bounds Read Vulnerability |+| 2026-04-13 | `CVE-2020-9715` | Adobe | Acrobat | Adobe Acrobat Use-After-Free Vulnerability |+| 2026-04-13 | `CVE-2026-21643` | Fortinet | FortiClient EMS | Fortinet FortiClient EMS SQL Injection Vulnerability |+| 2026-04-13 | `CVE-2026-34621` | Adobe | Acrobat and Reader | Adobe Acrobat and Reader Prototype Pollution Vulnerability |+| 2026-04-08 | `CVE-2026-1340` | Ivanti | Endpoint Manager Mobile (EPMM) | Ivanti Endpoint Manager Mobile (EPMM) Code Injection Vulnerability |+| 2026-04-06 | `CVE-2026-35616` | Fortinet | FortiClient EMS | Fortinet FortiClient EMS Improper Access Control Vulnerability |+| 2026-03-30 | `CVE-2026-3055` | Citrix | NetScaler | Citrix NetScaler Out-of-Bounds Read Vulnerability |+| 2026-03-27 | `CVE-2025-53521` | F5 | BIG-IP | F5 BIG-IP Stack-Based Buffer Overflow Vulnerability |+| 2026-03-19 | `CVE-2026-20131` | Cisco | Secure Firewall Management Center (FMC) | Cisco Secure Firewall Management Center (FMC) Software and Cisco Security Cloud Control (S |+| 2026-03-18 | `CVE-2026-20963` | Microsoft | SharePoint | Microsoft SharePoint Deserialization of Untrusted Data Vulnerability |+| 2026-03-09 | `CVE-2021-22054` | Omnissa | Workspace One UEM | Omnissa Workspace ONE Server-Side Request Forgery |+| 2026-03-09 | `CVE-2026-1603` | Ivanti | Endpoint Manager (EPM) | Ivanti Endpoint Manager (EPM) Authentication Bypass Vulnerability |+| 2026-03-03 | `CVE-2026-22719` | Broadcom | VMware Aria Operations | Broadcom VMware Aria Operations Command Injection Vulnerability |+| 2026-02-25 | `CVE-2022-20775` | Cisco | SD-WAN | Cisco SD-WAN Path Traversal Vulnerability |++**To close a gap:** add a Pattern Library entry in `docs/disclosed-reports/hunt-<class>.md` and an exploit summary in `skills/hunt-<class>/SKILL.md`.diff --git a/scripts/refresh-cve-index.py b/scripts/refresh-cve-index.pynew file mode 100755index 0000000..597d885--- /dev/null+++ b/scripts/refresh-cve-index.py@@ -0,0 +1,227 @@+#!/usr/bin/env python3+"""+refresh-cve-index.py — pull CISA KEV catalog, diff against repo's disclosed-reports+and hunt-* skill content, surface coverage gaps.++Runs locally and via the .github/workflows/cve-refresh.yml weekly job.++Usage:+ scripts/refresh-cve-index.py [--days N] [--vendors VENDOR1,VENDOR2,...]++Exit codes:+ 0 — coverage acceptable (all recent in-scope CVEs are indexed)+ 1 — gaps detected (script printed the list)+"""+from __future__ import annotations+import argparse+import datetime+import json+import re+import sys+import urllib.request+from pathlib import Path++KEV_FEED = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"++# Vendors/products whose CVEs map cleanly to our skill stack.+# Add new entries here when you add an enterprise-platform skill.+IN_SCOPE_VENDORS = {+ "Apache",+ "Atlassian", # Confluence, Jira, Bitbucket+ "Cisco", # ASA, AnyConnect, Talos+ "Citrix",+ "F5",+ "Fortinet",+ "GitLab",+ "Ivanti", # Pulse Secure successor+ "Jenkins",+ "Microsoft", # SharePoint, Exchange, AD, IIS+ "Mitre", # webgoat etc, edge cases+ "Oracle", # WebLogic, MySQL+ "Palo Alto Networks",+ "Pulse Secure",+ "Red Hat", # JBoss+ "SonarSource",+ "SonicWall",+ "Spring",+ "VMware",+ "WordPress",+ "Drupal",+ "Joomla",+ "PHP Group",+ "Adobe", # ColdFusion+}++# CVEs the index doesn't need to ack-by-name (kernel CVEs, hardware, mobile, browser internals).+# These are operationally not in scope for a bug-bounty/external-red-team skill stack.+OUT_OF_SCOPE_VENDOR_PREFIXES = {+ "Google", "Apple", "Mozilla", "Linux", "Microsoft Edge",+ "Samsung", "Adobe Acrobat", "Adobe Reader",+}+++def fetch_kev() -> dict:+ """Fetch the CISA KEV JSON feed."""+ req = urllib.request.Request(+ KEV_FEED,+ headers={"User-Agent": "Claude-BugHunter-CVE-Refresh/1.0"},+ )+ with urllib.request.urlopen(req, timeout=30) as resp:+ return json.loads(resp.read().decode())+++def find_indexed_cves(repo_root: Path) -> set[str]:+ """Grep the repo for CVE-YYYY-N patterns we already document."""+ pattern = re.compile(r"CVE-\d{4}-\d{4,7}")+ indexed = set()+ for sub in ("docs/disclosed-reports", "skills"):+ for p in (repo_root / sub).rglob("*.md"):+ try:+ text = p.read_text(encoding="utf-8")+ except Exception:+ continue+ indexed.update(pattern.findall(text))+ return indexed+++def in_scope(vuln: dict) -> bool:+ vendor = vuln.get("vendorProject", "")+ if any(vendor.startswith(p) for p in OUT_OF_SCOPE_VENDOR_PREFIXES):+ return False+ if vendor in IN_SCOPE_VENDORS:+ return True+ # Fallback for vendors not explicitly listed — fuzzy product match+ product = (vuln.get("product") or "").lower()+ name = (vuln.get("vulnerabilityName") or "").lower()+ hint = product + " " + name+ in_scope_hints = (+ "wordpress", "drupal", "joomla", "apache", "tomcat", "nginx",+ "spring", "struts", "weblogic", "jboss", "jenkins", "gitlab",+ "confluence", "jira", "bitbucket", "sharepoint", "exchange",+ "fortinet", "fortigate", "fortios", "cisco asa", "anyconnect",+ "citrix", "netscaler", "pulse", "ivanti", "panorama", "globalprotect",+ "vcenter", "esxi", "horizon", "workspace one", "vmware",+ "atlassian", "sonarqube", "sonarsource",+ )+ return any(h in hint for h in in_scope_hints)+++def main():+ ap = argparse.ArgumentParser()+ ap.add_argument("--days", type=int, default=180,+ help="Show CVEs added to KEV within this many days (default 180)")+ ap.add_argument("--vendors", help="Comma-separated vendor filter (overrides IN_SCOPE_VENDORS)")+ ap.add_argument("--max", type=int, default=50, help="Max gaps to print (default 50)")+ ap.add_argument("--markdown", action="store_true", help="Emit markdown for docs/cve-coverage.md")+ args = ap.parse_args()++ repo_root = Path(__file__).resolve().parent.parent+ if args.markdown:+ log = []+ say = lambda s="": log.append(s)+ else:+ say = print+ say(f"Repo root: {repo_root}" if not args.markdown else "")+ if not args.markdown:+ print(f"Fetching CISA KEV catalog from {KEV_FEED}")+ feed = fetch_kev()+ total = feed.get("count", 0)+ if args.markdown:+ say("# CISA KEV coverage snapshot")+ say()+ say(f"Auto-generated by `scripts/refresh-cve-index.py`. Re-run with:")+ say()+ say("```bash")+ say(f"scripts/refresh-cve-index.py --markdown --days {args.days} --max {args.max} > docs/cve-coverage.md")+ say("```")+ say()+ say(f"- **CISA KEV catalog version:** {feed.get('catalogVersion')}")+ say(f"- **Total KEV vulnerabilities:** {total}")+ else:+ say(f"CISA KEV catalog version: {feed.get('catalogVersion')} ({total} vulnerabilities)")++ indexed = find_indexed_cves(repo_root)+ if args.markdown:+ say(f"- **CVE IDs indexed in this repo:** {len(indexed)}")+ else:+ say(f"CVE IDs already indexed in our repo: {len(indexed)}")+ if indexed:+ sample = sorted(indexed)[-5:]+ say(f" e.g. (newest 5 alphabetically): {sample}")++ cutoff = datetime.date.today() - datetime.timedelta(days=args.days)+ vendor_filter = set(v.strip() for v in args.vendors.split(",")) if args.vendors else None++ in_scope_total = 0+ in_scope_covered = 0+ gaps = []++ for v in feed.get("vulnerabilities", []):+ try:+ date_added = datetime.date.fromisoformat(v["dateAdded"])+ except Exception:+ continue+ if date_added < cutoff:+ continue+ if vendor_filter:+ if v.get("vendorProject", "") not in vendor_filter:+ continue+ elif not in_scope(v):+ continue+ in_scope_total += 1+ cve_id = v["cveID"]+ if cve_id in indexed:+ in_scope_covered += 1+ else:+ gaps.append((date_added, v))++ if args.markdown:+ say()+ say(f"## Coverage report ({args.days}-day lookback, in-scope vendors only)")+ say()+ say(f"- **In-scope CVEs:** {in_scope_total}")+ say(f"- **Already indexed:** {in_scope_covered}")+ say(f"- **Gaps:** {len(gaps)}")+ say()+ else:+ say()+ say(f"=== Coverage report (CVEs in KEV in the last {args.days} days, in-scope only) ===")+ say(f" In-scope CVEs: {in_scope_total}")+ say(f" Already indexed: {in_scope_covered}")+ say(f" Gaps: {len(gaps)}")+ say()+ if not gaps:+ if args.markdown:+ say("All in-scope KEV entries in the lookback window are indexed. Nothing to do.")+ print("\n".join(log))+ else:+ say("All in-scope KEV entries in the lookback window are indexed. Nothing to do.")+ return 0++ gaps.sort(key=lambda t: t[0], reverse=True)++ if args.markdown:+ say(f"## Top {min(len(gaps), args.max)} in-scope CVEs NOT indexed (newest first)")+ say()+ say("| Date added | CVE | Vendor | Product | Vulnerability |")+ say("|---|---|---|---|---|")+ for date_added, v in gaps[:args.max]:+ name = (v.get('vulnerabilityName','') or '').replace("|", "\\|")[:90]+ say(f"| {date_added} | `{v['cveID']}` | {v.get('vendorProject','')} | {v.get('product','')} | {name} |")+ say()+ say("**To close a gap:** add a Pattern Library entry in `docs/disclosed-reports/hunt-<class>.md` and an exploit summary in `skills/hunt-<class>/SKILL.md`.")+ print("\n".join(log))+ else:+ say(f"Top {min(len(gaps), args.max)} in-scope KEV entries NOT indexed (newest first):")+ say()+ for date_added, v in gaps[:args.max]:+ say(f" {date_added} {v['cveID']:18s} {v.get('vendorProject',''):20s} {v.get('product',''):30s} {v.get('vulnerabilityName','')[:80]}")+ say()+ say(f"To add coverage: pick a CVE, add a Pattern Library entry in docs/disclosed-reports/hunt-<class>.md")+ say(f"plus an exploit summary in skills/hunt-<class>/SKILL.md.")++ return 1+++if __name__ == "__main__":+ sys.exit(main())