From nexus-agents
Handles GitHub Security Advisories via confidential triage, private-fork patching, coordinated publish, and post-mortem. Use for reporter-filed advisories or escalated internal discoveries.
npx claudepluginhub williamzujkowski/nexus-agentsThis skill is limited to using the following tools:
<!--
Performs security reviews on Git diffs identifying high-confidence exploitable vulnerabilities with severity/confidence scoring, OWASP 2025 alignment, and optional GitHub PR comments.
Mines GitHub Security Advisories and NVD CVE databases for incomplete fixes, identifying variant vulnerabilities in patched code and similar patterns in related packages. Useful for high-acceptance-rate security findings.
Redacts reverse-engineering repos for public disclosure while preserving methodology and patterns. Uses private-public splits, deny-lists, orphan commits, and CI gates to block leaks.
Share bugs, ideas, or general feedback.
Adapted from paperclipai/paperclip deal-with-security-advisory skill. Handles the reporter-filed inbound path — the outbound path (our own discoveries) is covered by CLAUDE.md's Security Discovery Protocol (.security-discoveries.jsonl + draft advisories).
Core invariant: Everything about this process is confidential until the advisory is published. No PR titles, no commit messages, no branch names, no issue comments should reveal the vulnerability. Treat the coordinated-disclosure window as a Rule of Two scenario — processing untrusted reporter input AND editing repo state AND accessing secrets for release.
Fetch the full advisory via the API (never paste content into chat, email, or Slack):
gh api "repos/${REPO}/security-advisories/GHSA-xxxx-xxxx-xxxx" \
--jq '{severity, summary, affected: .vulnerabilities}'
Assess:
Decision gate:
| Signal | Action |
|---|---|
| Critical or high severity, confirmed reproducible | Proceed to Phase 2 immediately |
| Medium/low, or unreproducible | Acknowledge reporter, investigate async; may downgrade to regular issue with reporter's consent |
| Cannot reproduce, no PoC, vague claim | Request PoC; do NOT close as "not a bug" without verification |
| Duplicate of a known issue already fixed | Reference existing fix in response; still credit reporter |
A human operator (not the agent) posts on the private advisory thread:
Agent role in this phase: draft the acknowledgment text for the operator to review and post. Never post directly.
Never patch in the public repo. GitHub auto-creates a temporary private fork when you click "Start a temporary private fork" on the advisory:
gh api -X POST "repos/${REPO}/security-advisories/${GHSA}/forks"
# Returns: { html_url: "https://github.com/OWNER/REPO-ghsa-xxxx" }
Clone the private fork to a directory separate from your regular worktree so you never push the wrong branch:
git clone git@github.com:OWNER/REPO-ghsa-xxxx.git ~/sec-work/GHSA-xxxx
cd ~/sec-work/GHSA-xxxx
Branch naming discipline — non-negotiable:
fix/v2.x-regression, patch/upstream-cve, hotfix/param-validationfix/dns-rebinding, fix/ssrf-bypass, patch/XXE, or anything that describes the vuln classWhy: advisory URLs with descriptive branch names are indexed by scanners and leak the vuln class before disclosure.
Patch discipline:
Local test verification (critical — GH Actions do NOT run on temporary private forks):
pnpm install --frozen-lockfile
pnpm lint && pnpm typecheck && pnpm test && pnpm build
If you skip this, you publish the advisory on a build you haven't validated. Don't.
Notify the reporter the fix is ready for review on the private fork. Give them a window (typically 3–7 days) to validate the patch closes the vuln. They may:
Zero-disclosure-window discipline: advisory publish, release, and public commit all land in the same window (ideally <5 minutes apart) so users never see the public vulnerability without the fix being available.
Order within the window:
gh api -X PATCH "repos/${REPO}/security-advisories/${GHSA}" -f severity=high -f patched_versions=">=X.Y.Z"gh api -X POST "repos/${REPO}/security-advisories/${GHSA}/publish"If step 2 succeeds but step 3 fails, users see the advisory with no fix available. Rehearse this sequence before the live run.
gh api "repos/${REPO}/security-advisories/${GHSA}" --jq .cve_id until populatednpm view nexus-agents versions --json | jq -r '.[-1]' should show the patched version| Concept | Why not |
|---|---|
| Heartbeat-scheduled advisory work | We're synchronous — advisory response is human-driven |
| Company-wide advisory board | Single-repo scope |
| Auto-merge-on-publish hook | We ship via changesets manually; explicit human step is safer for sec releases |
| Excuse | Counter |
|---|---|
| "It's low severity, don't bother with the private fork" | Private-fork discipline applies regardless of severity. Severity informs timeline; the process stays the same. |
| "I'll patch in the public repo, it's faster" | Public branch names + commit messages leak the vuln class. Indexed by scanners within minutes. Always private fork. |
| "We can publish before the fix tested in prod" | The advisory window is when both publish and fix exist. Untested fix + public advisory = scrambling under pressure. |
| "Reporter wants quicker disclosure, override our timeline" | Document the request, but the timeline is decided by maintainer + severity. Reporter pressure is an input, not a directive. |
| "Skip post-mortem, we patched it" | The lesson the post-mortem extracts is what prevents the next incident in the same class. Always do it. |
fix/dns-rebinding)gh api ... .cve_id empty) at publish timepnpm install --frozen-lockfile && pnpm lint && pnpm typecheck && pnpm test && pnpm build)npm view nexus-agents version shows patched version