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.

known-vectors174-config-update-dropped-field.md

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

174 — Config Update Silently Drops a Field

Severity: 5 (higher when the dropped field is a safety lever: fee, cap, pause, oracle, migration allocation) | Real: Pump Science H-02 (contest)

update_settings(params) copies most fields but forgets one. The admin believes a parameter changed; it never does, so a safety lever is dead. Also: Option<T> params where None is handled but Some is never written.

Cross-ref: SM-079.

Verification Procedure
rg -n 'pub struct \w*(Params|Input|Args|Settings)' programs/
rg -n 'fn (update|set)_[a-z0-9_]+' programs/

Diff each params struct's fields against the assignments in its handler.

  • ✅ PASS: every field written. Exhaustive destructuring let S { a, b, c } = p; with no .. makes a field added to the struct later a compile error (E0027) until it is named, and a named field that is never assigned shows up as an unused-variable warning
  • ❌ FAIL: any field never written
// VULNERABLE
cfg.fee_bps = p.fee_bps; cfg.admin = p.admin; /* p.max_cap never written */ cfg.whitelist = p.whitelist;
// FIXED
let SettingsInput { fee_bps, admin, max_cap, whitelist } = p;
cfg.fee_bps = fee_bps; cfg.admin = admin; cfg.max_cap = max_cap; cfg.whitelist = whitelist;

Overall verdict: ✅ every field applied · ❌ any field silently dropped

Sources: sanbir/solana-auditor-skills solana-auditor/references/attack-vectors/attack-vectors-1.md V25 (MIT, Copyright (c) 2024 AI Skills Contributors).

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