solana-vulnerability-scanner
An agent skill by trailofbits, from trailofbits/skills. Tags: analysis, blockchain, security, smart-contracts, solana.
What it does
Scans Solana programs for 6 critical vulnerabilities including arbitrary CPI, improper PDA validation, missing signer/ownership checks, and sysvar spoofing. Use when auditing Solana/Anchor programs.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add trailofbits/skills --skill solana-vulnerability-scanner
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/trailofbits/skills
cp -r skills/plugins/building-secure-contracts/skills/solana-vulnerability-scanner ~/.claude/skills/solana-vulnerability-scanner
Safety box score
Grade B, low risk: 11 of 100 risk points, rated 2026-10-19. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill audits Solana/Anchor Rust projects for six Solana-specific vulnerability patterns and drives local scanning/testing commands over the repository. Its main blast radius is local code execution during tests/validator runs and possible edits to project config for lint setup; it does not request secrets, sudo, or autonomous external actions.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | The workflow explicitly runs shell tools and tests such as `rg`, `anchor test`, and `solana-test-validator`, which can compile and execute repository code. |
| Network access | 0 (none) | It contains documentation links to external resources, but no command that fetches remote content or sends data off-machine. |
| Filesystem reach | 1 (low) | It may modify project files to enable tooling, e.g. `Add to Cargo.toml` and the linter setup shown under `# Add to Cargo.toml`. |
| Secrets & credentials | 0 (none) | The skill does not ask for tokens, keys, passwords, `.env` files, or other credential stores. |
| Privilege & persistence | 0 (none) | There is no `sudo`, global install, service registration, shell startup edit, or other privilege-changing action. |
| Instruction hijack surface | 0 (none) | The text does not tell the agent to ignore instructions, skip confirmations, hide actions, or follow remote instructions. |
| Irreversible actions | 0 (none) | It is an auditing skill only; it reports findings and fixes but does not push, deploy, publish, pay, or delete on its own. |
| Transparency | 0 (none) | All shipped files are readable text (`.md`, `.yaml`, and an SVG); no binaries, base64 blobs, or decoded-at-runtime payloads are present. |
Before installing
- Read `SKILL.md` sections 7 and 10: it will run `rg`, `anchor test`, and `solana-test-validator`.
- Check whether you are okay with the agent editing `Cargo.toml` to enable lints.
- If this will be run on a sensitive repo, use a scratch checkout first so local tests cannot affect your main working tree.
- Review `resources/VULNERABILITY_PATTERNS.md` to see the exact checks it will apply.
Rated 2026-10-19 by an automated review of 4 files from the skill's repository.
Source
- Repository
- trailofbits/skills (all skills from this repository)
- Path
- plugins/building-secure-contracts/skills/solana-vulnerability-scanner/SKILL.md
- Branch
- main
- Collection
- building-secure-contracts
- Updated
- 2026-09-19
Related skills
- algorand-vulnerability-scanner — Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations.
- cairo-vulnerability-scanner — Scans Cairo/StarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems.
- cosmos-vulnerability-scanner — Scans Cosmos SDK blockchain modules and CosmWasm contracts for consensus-critical vulnerabilities — chain halts, fund loss, state divergence.
- substrate-vulnerability-scanner — Scans Substrate/Polkadot pallets for 7 critical vulnerabilities including arithmetic overflow, panic DoS, incorrect weights, and bad origin checks.
- token-integration-analyzer — Token integration and implementation analyzer based on Trail of Bits' token integration checklist.
- ton-vulnerability-scanner — Scans TON (The Open Network) smart contracts for 3 critical vulnerabilities including integer-as-boolean misuse, fake Jetton contracts.