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.
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-scannerRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install solana-vulnerability-scanner in Claude Code
git clone --depth 1 https://github.com/trailofbits/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/plugins/building-secure-contracts/skills/solana-vulnerability-scanner ~/.gemini/antigravity-cli/skills/solana-vulnerability-scannerAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install solana-vulnerability-scanner in Antigravity CLI
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
ANo 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 →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
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.
