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-vectors022-bridge-exploit-fake-proof.md

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

22 — Bridge Exploit (Fake Proof)

Severity: 10 | Real: Wormhole ($326M), Ronin ($625M), Nomad ($190M)

Forge cross-chain message/proof → claim tokens that were never locked on the source chain.

Verification Procedure

Step 1: Check if protocol uses bridging

grep -rn --include="*.rs" --include="*.ts" -iE "bridge|wormhole|layerzero|across|debridge|lifi|cross.chain" .
  • If no bridge: N/A
  • If bridge exists: proceed

Step 2: Verify message/proof validation

grep -rn --include="*.rs" -iE "verify|proof|signature|guardian|validator|consensus" programs/
  • ✅ PASS: Bridge messages verified with cryptographic proof (e.g., guardian signatures, Merkle proof)
  • ❌ FAIL: Bridge messages accepted without verification

Step 3: Check for replay protection

grep -rn --include="*.rs" -iE "nonce|sequence|replay|already.*processed\|used.*message" programs/
  • ✅ PASS: Each bridge message has a unique nonce/sequence that can only be processed once
  • ❌ FAIL: Same message could be replayed to mint tokens multiple times

Step 4: Verify bridge program is a known, audited bridge

  • ✅ PASS: Uses well-known bridge (Wormhole, LayerZero, deBridge) without modification
  • ❌ FAIL: Custom bridge implementation without third-party audit

Step 5: Verify cross-domain binding and mark-before-action atomicity (VC-43; Wormhole $326M)

grep -rn --include="*.rs" -iE "source.?chain|dest.?chain|target.?chain|chain.?id|emitter|dest.*program|domain" programs/
  • The signed message/proof must commit to the source chain, destination chain, and destination program — a message "signed for chain A" (or for a different destination program) must not be replayable on Solana or redirected to another program. Omitting the domain lets a valid proof from one context be lifted into another.
  • The processed/consumed marker (nonce/sequence, Step 3) must be written before the value-bearing action (mint/release), in the same transaction — mark-before-action atomicity — so a partial failure or reentrant path cannot double-claim.
  • ✅ PASS: Message commits to source_chain + dest_chain + dest_program (bound to Solana + this program); the replay marker is set atomically before funds move
  • ❌ FAIL: Proof lacks cross-domain binding (replayable across chains/programs), or the action executes before the message is marked consumed (double-claim window)

Overall verdict:

  • ✅: Known audited bridge, proof verification, replay protection
  • ⚠️: Known bridge but custom adapter code that hasn't been audited
  • ❌: Custom bridge without proof verification or replay protection
  • N/A: No bridge functionality

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