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.

referencesmethodologiestrust-surface-deps.md

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

Trust-surface dependency walk (FULL-AUDIT Step 1.5 P8)

When: the program trusts the return value of sign, verify, prove, commit, recover_pubkey, verify_proof or aggregate from a small or niche crate, or uses a niche zero-copy collection for fund-moving state. Exempt: solana-program and split crates, spl-*, anchor-lang, pinocchio. ZK proof systems, Groth16 VKs and Merkle/cNFT are in references/vuln-classes/zk-and-compression.md.

Steps: (1) state the one-line security property relied on; (2) list the primitive's standard failure modes (below); (3) read the dependency's implementation (not its tests) against the textbook construction; (4) if it cannot be verified, record it under "Trust surface: unverified" — never drop it.

  • Hash-based one-time signatures (Lamport / WOTS / WOTS+): missing checksum chain (digit-domination forgery: after one signature an attacker grinds a message whose digest digits all lie on the forward side of the observed ones, then walks each hash chain forward — no hash is broken; the grinding cost depends on the observed digits and w and is often practical for small w or truncated digests); key reuse beyond one signature (enforce one-shot consumption); hash truncated below 128-bit security; signer/verifier w or digest-length mismatch; stored public-key commitment not bound to a PDA/field. Grep: a signing loop over digest digits with no second loop over checksum digits.
  • Schnorr / EdDSA variants: nonce reuse; non-canonical s (malleability); no domain-separation tag (cross-protocol replay); low-order or small-subgroup R accepted; batch verification with predictable scalars. Grep nonce|rng|RngCore|scalar_mul|prehash|dom_sep.
  • BLS / pairings: rogue-key attack without proof of possession; non-RFC 9380 hash-to-curve; G1/G2 confusion; identity or non-canonical points accepted.
  • Hand-rolled hashes/commitments: Pedersen h = g^c with known c (binding broken); H(v‖r) with < 256-bit hash; non-CSPRNG randomness; a hand-rolled hash is a finding by default.
  • Niche zero-copy collections (five axes): iteration soundness (DoubleEndedIterator cursors crossing → two &mut to one slot); ordering preserved after get_mut changes a sort key; rebalancing cases (missing red-black delete-fixup case, stale order-statistic size/rank); capacity edge (silent eviction at full capacity, generation-counter wrap into the "empty" sentinel); interior mutability (&self returning &mut via raw cast; RefCell double borrow → panic DoS). Check whether the crate's own tests run under Miri.

Sources: qedgen/solana-skills skills/qedgen-auditor/references/trust_surface_primitives.md and skills/qedgen-auditor/references/data_structure_dep_invariants.md (MIT, Copyright (c) 2025 QEDGen), rewritten.

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