Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

solana-vulnerability-scanner

Skill by trailofbits

Scans Solana programs written natively in Rust or with Anchor for six platform-specific vulnerability patterns. It is for developers and auditors reviewing Solana protocols before launch.

  • Score 91
  • 8.5k stars
  • CC-BY-SA-4.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install solana-vulnerability-scanner

Built from the published package, never by AI.

git clone --depth 1 https://github.com/trailofbits/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/plugins/building-secure-contracts/skills/solana-vulnerability-scanner ~/.claude/skills/solana-vulnerability-scanner

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install solana-vulnerability-scanner in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill audits Solana programs, both native Rust and Anchor framework code, for six vulnerability patterns tied to Solana's account model. The patterns cover arbitrary cross-program invocation, improper PDA validation, missing ownership checks, missing signer checks, sysvar account checks, and improper instruction introspection. When invoked, it searches the codebase for Solana or Anchor programs, runs grep-style searches for each pattern, and reports findings with file references and severity.

The report opens with a coverage table that gives a verdict for all six patterns, so a clean result is not confused with an unchecked one. Each finding includes the vulnerable code, an attack scenario, and a suggested fix. The skill is aimed at people performing security audits or pre-launch reviews of Solana and Anchor programs.

Written from the project's SKILL.md and checked against it.

What it can do

  • Arbitrary CPI checkLooks for user-controlled program IDs in cross-program invocation calls.
  • PDA validation checkChecks that program-derived addresses use canonical bumps and seeds constraints.
  • Ownership checkLooks for account deserialization without owner validation.
  • Signer checkLooks for authority operations that lack an is_signer check.
  • Sysvar account checkFlags spoofed sysvar accounts in programs targeting Solana versions before 1.8.1.
  • Instruction introspection reviewLooks for absolute index use that could allow instruction reuse.
  • Coverage table reportGives a found, clear, or n/a verdict for each of the six patterns.

What you need

  • Solana program source in Rust (native or Anchor)
  • Solana Test Validator for local testing (optional)
  • Anchor test framework for integration tests (optional)

Try asking

  • Audit this Anchor program for missing signer and ownership checks.
  • Scan my Solana programs for arbitrary CPI and PDA validation issues.
  • Review my instruction introspection code and give a coverage table.

Good to know

  • The source does not include a worked example output section.
  • Sysvar spoofing guidance applies to programs targeting Solana versions before 1.8.1.
  • The Trail of Bits Solana Lints step is described only as available if installed.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: plugins/building-secure-contracts/skills/solana-vulnerability-scanner/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md14 KB
  • agents/openai.yaml258 B
  • assets/trail-of-bits-mark.svg3 KB
  • resources/VULNERABILITY_PATTERNS.md20 KB

Alternatives to solana-vulnerability-scanner

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

solana-vulnerability-scanner: common questions

What vulnerabilities does the Solana vulnerability scanner check for?

It checks six patterns: arbitrary CPI, improper PDA validation, missing ownership check, missing signer check, sysvar account check, and improper instruction introspection.

Does it work with Anchor programs?

Yes. The source covers both native Solana programs written in Rust and programs built with the Anchor framework.

What does the report look like?

The report starts with a coverage table giving a verdict for all six patterns, followed by findings that cite file and line with suggested fixes.

How do I install solana-vulnerability-scanner?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is solana-vulnerability-scanner free?

The code is published under the CC-BY-SA-4.0 licence. The service it connects to may have its own pricing.

Is solana-vulnerability-scanner safe to use?

It scores 91 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to solana-vulnerability-scanner?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

solana-vulnerability-scanner Install

Add to stack

Loading.