solana-vulnerability-scanner

Scans native Rust and Anchor Solana programs for six classes of security vulnerabilities.

Updated May 2, 2026
One-click install
npx skills add https://github.com/ayehiaa/my-travel-assistant --skill solana-vulnerability-scanner-ayehiaa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solana-vulnerability-scanner
Source: https://github.com/ayehiaa/my-travel-assistant/tree/main/.agents/skills/solana-vulnerability-scanner
Command: npx skills add https://github.com/ayehiaa/my-travel-assistant --skill solana-vulnerability-scanner-ayehiaa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you systematically find high-impact Solana-specific security issues in native Rust and Anchor programs before deployment, reducing the risk of exploitable CPI, PDA spoofing, and missing authority checks.

Core Features & Use Cases

  • Solana/Anchor program scanning: Locates Solana code (native and Anchor) and reviews it for security-relevant patterns.
  • Six vulnerability pattern coverage: Detects arbitrary CPI, improper PDA validation, missing ownership checks, missing signer checks, sysvar spoofing, and improper instruction introspection.
  • Actionable remediation: Produces findings with locations and recommended fixes, plus testing guidance for validation.

Quick Start

Run a Solana program audit by scanning your repository for Solana/Anchor sources and generating a vulnerability report that includes severity, file locations, and concrete mitigation steps.

Frequently Asked Questions about solana-vulnerability-scanner

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

FAQPage Schema
How do I audit a Solana smart contract for security vulnerabilities?

To audit a Solana smart contract, you scan native Rust or Anchor program sources to identify critical security weaknesses in account validation, PDA usage, and CPI safety. This generates a vulnerability report with severity, file locations, and mitigation steps.

What are common PDA validation and CPI security flaws in Anchor programs?

Common PDA validation and CPI security flaws include arbitrary CPI, improper PDA seed and bump correctness, missing ownership checks, and missing signer enforcement. These vulnerabilities allow account spoofing and unauthorized cross-program invocations before deserialization.

How do I check for missing signer and sysvar spoofing issues in Solana programs?

You check for missing signer and sysvar spoofing issues by scanning for owner and signer checks before deserialization, verifying checked sysvar loaders, and ensuring proper correlated instruction indexing. This detects spoofing and unauthorized instruction introspection.

Can I use automated vulnerability scanning for both native Rust and Anchor Solana code?

Yes, you can use automated vulnerability scanning for both native Rust and Anchor Solana code. The scanner applies to native Rust and Anchor-based workflows, reviewing cross-program invocations, PDA implementations, and instruction parsing logic.

What is the best way to review cross-program invocations for arbitrary CPI risks in Solana?

The best way to review cross-program invocations for arbitrary CPI risks is exhaustive pattern detection across invoke and invoke_signed calls. This identifies unsafe execution paths and produces actionable remediation with testing guidance.

Does Solana vulnerability scanning detect improper instruction introspection and correlated indexing?

Yes, Solana vulnerability scanning detects improper instruction introspection and correlated instruction indexing issues. It evaluates instruction parsing logic to ensure secure execution and produces findings with concrete mitigation steps.