feat: ground vuln taxonomy + audit report in real Solana audit practice#9
Merged
Merged
Conversation
Deepen ARES's domain grounding using canonical Solana security sources (Sealevel Attacks, Neodyme common pitfalls, the solsec corpus, and the empirical multi-auditor study), and harden the dependency supply chain. Taxonomy (src/knowledge/solana-vulns.ts): add 8 professionally-recognized classes the catalog was missing — type-cosplay, unsafe-type-cast, missing-slippage-protection, denial-of-service, business-logic-error (empirically the largest finding category), upgrade-authority-risk, token-2022-extension-risk, and remaining-accounts-validation — taking the catalog from 20 to 28 classes with detection hints, remediation, and refs. Severity + report (src/knowledge/severity.ts, prompts, report node): add the industry impact × likelihood severity matrix, per-level definitions, a deterministic severity-distribution table, and stable finding IDs (ARES-001…). Rewrite the REPORT prompt to emit a professional assessment structure (executive summary + severity table, scope & methodology, findings summary, per-finding description/impact/recommendation, coverage, disclaimer). Counts and IDs are computed in-node so headline numbers can't be hallucinated. Dependency security: add an npm override pinning uuid ^11.1.1, clearing the moderate uuid/jayson/@solana/web3.js advisory chain (8 advisories -> 3). Add SECURITY.md documenting the reporting process, read-only runtime posture, and the accepted residual bigint-buffer advisory (no upstream fix; availability- only CVSS; unreachable with adversarial input given read-only RPC parsing). Tests: +20 tests (31 -> 51) covering the new severity module and the previously-untested crystalline-store (round-trip, recall, activation, spreading activation, consolidation promotion) and retrieval synthCrystal. Verified: typecheck, lint, build, and the full suite pass; the report node's IDs and severity table were confirmed end-to-end against the live graph in both black-box and source modes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZB4NjNJZ6zWTqypbSiihy
daemon-blockint-tech
marked this pull request as ready for review
July 18, 2026 00:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Follow-up to the merged CI PR (#6). The goal here was to make ARES's output resemble how real Solana audits are actually done and reported, using canonical public sources — Sealevel Attacks, Neodyme's common pitfalls, the solsec corpus, the Neodyme workshop, and the empirical multi-auditor study of 1,669 findings — and, along the way, to close the outstanding dependency-security and test-coverage gaps.
What changed
1. Vulnerability taxonomy — grounded in real audit practice
src/knowledge/solana-vulns.ts: 20 → 28 classes. Added 8 professionally-recognized classes the catalog was missing, each with detection hints, remediation, and references:type-cosplay(account/type confusion — Sealevel Add opt-in Computer Use Agent (CUA) investigation analyzer #3, Neodyme)unsafe-type-cast(uncheckedastruncation — Neodyme)missing-slippage-protection(front-running/MEV — the dominant DeFi finding)denial-of-service(compute exhaustion / account bloat)business-logic-error(accounting/state-machine — empirically the single largest finding category)upgrade-authority-risk(program-upgrade centralization)token-2022-extension-risk(transfer hooks / fees / permanent delegate)remaining-accounts-validation(unvalidatedctx.remaining_accounts)2. Severity methodology + professional report format
src/knowledge/severity.ts— the industry impact × likelihood severity matrix, per-level definitions, a deterministic severity-distribution counter, a markdown severity-summary table, and stable finding-ID formatting (ARES-001…).3. Dependency security
overridespinninguuid ^11.1.1, clearing the moderateuuid→jayson→@solana/web3.jsadvisory chain.npm audit: 8 advisories → 3.SECURITY.mddocumenting the reporting process, ARES's read-only runtime posture, the resolveduuidadvisory, and the accepted residualbigint-bufferadvisory (no upstream fix; availability-only CVSS; unreachable with adversarial input given read-only RPC parsing).4. Test coverage
+20 tests (31 → 51). New suites for the severity module, the previously-untested
crystalline-store(round-trip, recall, activation, spreading activation, consolidation promotion), andretrieval/synthCrystal.Verification
The report node's stable IDs and deterministic severity table were additionally confirmed end-to-end against the live graph in both black-box (findings downgraded to speculative) and source modes — the table faithfully tracks the pipeline's final severities in each.
Notes
npm auditstep — the unfixablebigint-bufferadvisory would make every build red for no actionable reason. It's tracked via Dependabot andSECURITY.mdinstead.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZB4NjNJZ6zWTqypbSiihy
Generated by Claude Code