solana-vulnerability-scanner

Scan Rust and Anchor Solana programs for six vulnerability patterns.

1|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/tawf-labs/zkt-hackathon --skill solana-vulnerability-scanner-tawf-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solana-vulnerability-scanner
Source: https://github.com/tawf-labs/zkt-hackathon/tree/main/.claude/skills/solana-vulnerability-scanner%20copy
Command: npx skills add https://github.com/tawf-labs/zkt-hackathon --skill solana-vulnerability-scanner-tawf-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps auditors and developers identify common, high-impact security mistakes in Solana and Anchor programs that could lead to unauthorized execution, spoofed accounts, or broken access controls.

Core Features & Use Cases

  • Detects 6 Solana-specific vulnerability patterns: arbitrary CPI, improper PDA validation, missing ownership checks, missing signer checks, sysvar spoofing, and improper instruction introspection.
  • Guides remediation: provides fixes and mitigation approaches tailored to native Rust and Anchor account/constraint models.
  • Produces actionable reporting: reports findings with severity and file locations, plus concrete test recommendations to validate fixes.
  • Use Cases: pre-launch audits for Solana protocols, security reviews of CPI and PDA logic, and regression checking after refactors to ensure account validation remains correct.

Quick Start

Use the solana-vulnerability-scanner skill to scan your Solana/Anchor codebase for the 6 critical vulnerability patterns and return findings with locations and recommended fixes.

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 Solana smart contracts for arbitrary CPI execution vulnerabilities?

To audit Solana smart contracts for arbitrary CPI execution, scan Rust and Anchor source files for patterns enabling unauthorized cross-program invocations. The scanner identifies specific vulnerability code, reports severity with file locations, and provides targeted mitigations and test strategies.

What is improper PDA validation in Anchor programs and how do I detect it?

Improper PDA validation in Anchor programs occurs when account derivation constraints are missing or bypassed. Detect it by scanning Anchor source code for missing ownership checks and insufficient signer verifications, which returns file-referenced findings with severity levels and actionable fixes.

How do I check my Solana protocol for sysvar spoofing and missing signer checks?

Check Solana protocols for sysvar spoofing and missing signer checks by scanning native Rust and Anchor implementations for these specific vulnerability patterns. The scan reports exact file locations, assigns severity, and recommends concrete mitigations to validate account validation logic.

Can I use an automated scanner to find instruction introspection flaws in Rust Solana code?

Yes, you can scan native Rust Solana code to find improper instruction introspection flaws. The scanner analyzes instruction-index logic and CPI security, reporting identified weaknesses with file references and providing tailored remediation approaches for both native and Anchor models.

Does this Solana vulnerability scanner work with both native Rust and Anchor frameworks?

Yes, the Solana vulnerability scanner works with both native Rust and Anchor frameworks. It applies account and constraint models specific to Anchor, while also analyzing native Rust implementations for missing access controls, PDA validation bypasses, and unsafe sysvar handling.

What are the limitations of automated Solana smart contract security audits?

Automated Solana smart contract security audits are limited to detecting six specific vulnerability patterns like arbitrary CPI, PDA validation, and sysvar spoofing. They provide file-referenced findings and test strategies, but require manual review for complex business logic flaws outside these defined categories.