solana-vulnerability-scanner

Scan Solana and Anchor Rust programs for six critical vulnerability patterns.

1|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/Ramprasad4121/srp --skill solana-vulnerability-scanner-ramprasad4121
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solana-vulnerability-scanner
Source: https://github.com/Ramprasad4121/srp/tree/main/skills-repos/trailofbits/plugins/building-secure-contracts/skills/solana-vulnerability-scanner
Command: npx skills add https://github.com/Ramprasad4121/srp --skill solana-vulnerability-scanner-ramprasad4121

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical need for security in Solana smart contract development by systematically identifying and reporting on 6 common and high-impact vulnerability patterns specific to the Solana platform.

Core Features & Use Cases

  • Automated Vulnerability Detection: Scans Solana/Anchor programs for 6 critical vulnerability patterns including arbitrary CPI, improper PDA validation, missing signer/ownership checks, and sysvar spoofing.
  • Code Auditing: Assists developers and auditors in pre-deployment security assessments by providing detailed findings and recommended fixes.
  • Use Case: Before deploying a new DeFi protocol on Solana, use this Skill to perform an automated security audit of your smart contracts, ensuring common pitfalls are identified and addressed.

Quick Start

Use the solana-vulnerability-scanner skill to audit the Solana program located in the 'programs/my_program' directory.

Frequently Asked Questions about solana-vulnerability-scanner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan my Solana program for common smart contract vulnerabilities?

To scan Solana programs for vulnerabilities, provide your Rust source code, Anchor.toml, and Cargo.toml files to an automated scanner that detects six critical security patterns including arbitrary CPI and improper PDA validation.

What security vulnerabilities should I check before deploying an Anchor program on Solana?

Before deploying an Anchor program, check for six critical Solana vulnerabilities: arbitrary CPI, improper PDA validation, missing ownership and signer checks, sysvar spoofing, and improper instruction introspection to ensure smart contract security.

Can I audit Solana smart contracts for missing ownership and signer checks automatically?

Yes, you can automatically audit Solana smart contracts for missing ownership and signer checks by analyzing the program's Rust code structure, which generates detailed findings and recommended mitigation strategies for each identified security flaw.

Does the Solana vulnerability scanner work with Anchor framework projects?

Yes, the Solana vulnerability scanner works with Anchor framework projects by analyzing Anchor.toml configuration files alongside Rust source code and Cargo.toml dependencies to detect platform-specific security risks unique to Solana programs.

How do I fix sysvar spoofing and improper PDA validation in my Solana code?

To fix sysvar spoofing and improper PDA validation in Solana code, review the detailed findings and code references provided by the vulnerability scan, then apply the specific mitigation strategies recommended for each identified security flaw.