substrate-vulnerability-scanner
Scans Substrate/Polkadot pallets for 7 critical vulnerabilities including arithmetic overflow, panic DoS, incorrect weights, and bad origin checks. Use when auditing Substrate runtimes or FRAME pallets.
Security Assessment
Detected risks:
About substrate-vulnerability-scanner
The substrate-vulnerability-scanner skill is designed to help security auditors and blockchain developers identify critical security issues in Substrate and FRAME-based runtimes. It focuses specifically on vulnerabilities unique to Substrate and Polkadot ecosystem development, including arithmetic overflow, panic-driven denial of service conditions, incorrect weight calculations, unsigned transaction validation weaknesses, and improper origin checks. By systematically analyzing Rust-based pallet implementations, runtime configuration files, and benchmarking logic, the skill helps prevent vulnerabilities that could lead to node crashes, unauthorized access, spam attacks, or chain instability.
The skill detects Substrate-specific framework indicators such as `#[pallet]`, `#[pallet::call]`, `#[pallet::storage]`, and dispatchable extrinsic functions. It scans pallet implementations for seven predefined vulnerability patterns and provides findings with severity levels, file references, and mitigation guidance. The scanner also reviews weight calculation logic, unsigned transaction validation, and randomness usage, while recognizing project structures commonly used in Substrate chains such as `pallets/*/lib.rs`, `runtime/lib.rs`, and `benchmarking.rs`. In addition, it references compatible tooling such as cargo-fuzz, test-fuzz, benchmarking frameworks, and try-runtime for deeper testing and validation workflows.
This skill is intended for blockchain security engineers, smart contract auditors, Substrate runtime developers, and teams preparing Polkadot parachains or standalone Substrate chains for deployment. It is especially useful during pre-launch security reviews, pallet audits, runtime hardening, and code review processes where platform-specific vulnerabilities may otherwise be overlooked. Teams building custom FRAME pallets or validating dispatchable extrinsics can use the skill to improve runtime reliability and reduce the risk of operational or security failures.
FAQ
What types of vulnerabilities does this skill detect?
The skill checks for seven critical Substrate and FRAME-specific vulnerability patterns, including arithmetic overflow, panic-related denial of service risks, incorrect weight calculations, bad origin validation, unsigned transaction validation issues, unsafe randomness usage, and improper storage write ordering.
Which projects are compatible with this skill?
The skill is intended for Substrate and FRAME-based blockchain projects written in Rust, including Polkadot parachains, standalone Substrate chains, and custom FRAME pallets.
What files and structures does the scanner analyze?
The scanner looks for common Substrate project structures such as `pallets/*/lib.rs`, `runtime/lib.rs`, `benchmarking.rs`, and Rust files containing FRAME macros like `#[pallet]` and `#[pallet::call]`.
Does the skill provide remediation guidance?
Yes. In addition to reporting findings and severity levels, the skill provides recommended fixes and mitigation guidance for identified vulnerabilities.
Are there limitations to the scanner?
The scanner is focused specifically on Substrate and FRAME runtime vulnerabilities described in the provided patterns. It does not claim to cover all possible Rust or blockchain security issues outside the documented vulnerability categories.
Install substrate-vulnerability-scanner
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
trailofbits/skills