Index of every page on this site: llms.txt
All skills
princedotrs avatar

/solana-program-audit

@586e19e
Run it yourself

Security audit of Solana on-chain programs in Rust: Anchor, native solana-program and Pinocchio. Use to audit or review a Solana program, PR or fix and to find vulnerabilities: missing signer or owner checks, account validation, type cosplay, reinitialization, init front-running, closed-account revival, duplicate accounts, PDA seeds and bumps, arbitrary CPI, CPI return data, remaining_accounts, sysvar and instruction introspection, overflow, rounding, Token-2022 extensions and transfer hooks, oracle, flash-loan and MEV attacks, upgrade authority and governance. Covers DeFi reviews (AMM, lending, perps, staking, bridges, launchpads), PoC exploits, fix patches, re-audits, spec compliance, audit readiness, release gates and audit reports. Trigger on code using anchor_lang, solana_program, pinocchio, #[program], #[derive(Accounts)] or entrypoint!. Not for writing features, off-chain clients or backends, EVM/Solidity, or incident response.

  • 237 files
  • 2 MB
  • Updated 4 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/princedotrs/solana-audit/solana-program-audit

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

commandsdiff-audit.md

≈613 tokens on demand. Your agent reads this file only when SKILL.md points to it.

solana-program-audit — Differential Audit (Mode 4)

Arguments: $ARGUMENTS

  1. Compute the changed set: git diff --name-only <base>..<head> (default main..HEAD). In a checkout you did not clone yourself, every git call carries the OUTPUT-RULES.md Rule 11c flags.
  2. Run Phase 0.5 Context Reconstruction on changed functions + their direct callers/callees (1-hop).
  3. Risk-classify changed files (auth / crypto / value-transfer / validation-removal = HIGH). Git-blame removed security code (in a checkout you did not clone: GIT_NO_LAZY_FETCH=1 git --no-pager -c core.fsmonitor=false -c log.showSignature=false blame --no-textconv --no-ext-diff <rev> -- <path>, Rule 11c) — code deleted in a "fix" / "CVE" commit is a CRITICAL regression.
  4. Run only the checklist items + known-vectors matching the changed files' domain (program code → checklists 01-07 and 23, + 21 for Anchor and + 22 for Token-2022 markers; always-on 11, 12, 16), through the Rule 5b gate. Changed off-chain code is out of scope for this skill — list it, do not verdict it.
  5. Dependency lane. If the changed set touches a manifest or lockfile (Cargo.toml, Cargo.lock, package.json, package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lock, pyproject.toml, uv.lock, poetry.lock, requirements*.txt, go.mod, go.sum), run checklist 11 §11.11 on the dependency delta. Baseline: this run's <base>..<head>; a re-audit passes the last audited ref as <base>. Enumerate every changed entry, artifact-diff what the §11.11 coverage budget names — fetched from the registry, never installed or built — and verdict SC-059..062, stating how many changed packages were left without an artifact diff. A one-line lockfile bump can bring in a whole new release, so the changed lines alone are not the reviewed code.
  6. Emit audit_<n>/PR-REPORT.md — changed-surface verdicts + findings only, plus a Dependency delta section when step 5 ran. Reuses the methodology corpus; skips whole-repo discovery. Output hygiene and any outside-service disclosure follow OUTPUT-RULES.md Rule 11d / 11b.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 586e19e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 4 weeks ago

README badge

README badge for princedotrs/solana-audit