Skip to content
SkillModel-led3,433 tokens in use

Solana Vulnerability Scanner

Scans native and Anchor Solana programs for 6 critical vulnerabilities in CPI, PDA derivation and account validation, with a verdict for every pattern.

8,319 stars on the repository CC-BY-SA-4.0trailofbits/skills · plugins/building-secure-contracts/skills/solana-vulnerability-scanner
/plugin marketplace add trailofbits/skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing Solana Vulnerability Scanner costs

48tokens idle
3,433tokens in use
8,165tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure22/25
  • Examples15/15
  • Output15/15
  • Size15/15
  • Resources7/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 120

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity100
  • Maintenance52
  • Community64
  • Maturity32
  • Momentum40

Solana Vulnerability Scanner checks programs for arbitrary CPI, improper PDA validation, missing ownership checks, missing signer checks, sysvar account spoofing and improper instruction introspection.

Each report opens with a coverage table giving every pattern a verdict of found, clear or n/a with evidence, followed by findings that include the vulnerable code, an attack scenario and a fix in native or Anchor style.

What You Get

  • A coverage table with all six patterns and a verdict with evidence for each
  • Findings with severity, location, vulnerable code, attack scenario and recommendation
  • Checklists for CPI, PDA, account validation, signer validation, sysvar and introspection
  • Unit and Anchor integration test examples for malicious inputs

Common Use Cases

  • Auditing a Solana vault or token program before launch
  • Reviewing cross-program invocation logic for unvalidated program accounts
  • Checking PDA derivation and canonical bump use
  • Verifying Anchor account constraints for owner and signer checks

What Makes It Unique

The skill keys on Solana’s account model and requires a verdict for all six patterns, including a version-scoped sysvar row that must cite the targeted solana-program version. It rejects shortcuts such as assuming Anchor handles validation, and asks for the constraint or attribute by name, since an UncheckedAccount opts out of checks and a mut attribute is no ownership check.

Under The Hood

The skill is an instruction file with a linked pattern resource. The agent searches the repository with ripgrep for invoke, invoke_signed, PDA functions, deserialization and introspection calls, reads the matching code and may suggest Cargo lint settings and local validator tests with solana-test-validator and anchor test. It reads project files and writes its report as a response. It does not fetch web pages or call remote services.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers