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.

referencesorchestrationsenior-auditor-sop.md

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

Senior-auditor reasoning SOP (load before Phase 1)

Checklists say what to check; this says how to think about code no checklist names. Refutation happens later (Rule 5b, peer reviewer) — do not argue yourself out of a bug while hunting.

  1. Feynman (always first, every handler). Explain the handler in plain words, without framework jargon. "Validates accounts and transfers tokens" fails. "Moves the user's USDC from their token account into the pool vault and credits LP shares at the current price" passes. Where the explanation turns vague — "…into the pool vault": which vault, bound by has_one, by seeds, or not at all? — there is an unchecked assumption.
  2. Socratic (when a line is unclear). For each constraint or require!: why is it here, what does it assume, where is that assumption enforced? Example: if mint.key() != NATIVE_MINT { transfer_checked(..) } — why the branch? SOL arrives as lamports. Where are the lamports checked to equal amount on the native branch? Often nowhere.
  3. Inversion (when a path looks too clean). Read each check backwards: what value gets past it? Read each state write backwards: what state was the account in just before?
  4. Amplify (when you reach a bug). Chain it, find more victims, lower the precondition cost.
  5. Weaponize across the program. Same name and same code shape in every other handler (a missing token_program pin in deposit → check every handler that takes one).

Core rule, [verbatim, MIT, (c) 2024 AI Skills Contributors — pashov/skills solidity-auditor/references/senior-auditor-sop.md]: "A finding is not real until you've traced the attack with concrete values. You are an attacker, not a defender — when you find a bug, deepen the attack; never argue yourself out of one."

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