substrate-vulnerability-scanner

Detect seven Substrate/FRAME vulnerability patterns in Rust pallets and runtimes.

Updated Jul 10, 2025
One-click install
npx skills add https://github.com/Superlend/superloop-core-contracts --skill substrate-vulnerability-scanner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: substrate-vulnerability-scanner
Source: https://github.com/Superlend/superloop-core-contracts/tree/main/.cursor/skills/building-secure-contracts/skills/substrate-vulnerability-scanner
Command: npx skills add https://github.com/Superlend/superloop-core-contracts --skill substrate-vulnerability-scanner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps security engineers systematically identify and report critical Substrate/FRAME vulnerabilities in Substrate pallets and runtimes, reducing the risk of runtime outages and exploits.

Core Features & Use Cases

  • Pattern-based auditing: detects seven critical Substrate vulnerability patterns (arithmetic overflow, dont panic, weights, verify-first, unsigned validation, randomness, bad origin) across pallets and runtime code.
  • Repository-wide checks: scans pallets/*/lib.rs and runtime/lib.rs to surface risky constructs and provide actionable remediation guidance.
  • Use Case: during a security audit of a Substrate-based chain, run this skill to generate a prioritized list of issues with file references and suggested fixes.

Quick Start

Run the scanner against your Substrate project to enumerate vulnerabilities and generate a remediation report.

Frequently Asked Questions about substrate-vulnerability-scanner

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

FAQPage Schema
How do I audit Substrate pallets for security vulnerabilities?

To audit Substrate pallets for security vulnerabilities, scan the Rust code in pallets/*/lib.rs and runtime/lib.rs to detect seven critical vulnerability patterns including arithmetic overflow, bad origin checks, and unsigned validation errors. The scanner generates a prioritized list of issues with file references and remediation guidance.

What common vulnerability patterns should I check in FRAME runtime logic?

When checking FRAME runtime logic, you should scan for seven critical vulnerability patterns: arithmetic overflow, dont panic, incorrect weights, verify-first violations, unsigned validation flaws, randomness misuse, and bad origin checks across dispatchables and storage writes.

How do I run a security audit on a Substrate-based blockchain?

Running a security audit on a Substrate-based blockchain involves scanning repository-wide pallet and runtime code to surface risky constructs. The scanner analyzes Rust files to enumerate vulnerabilities and generates a remediation report with actionable fixes to reduce the risk of runtime exploits.

Does this vulnerability scanner work with any Rust blockchain project?

This vulnerability scanner is specifically designed for Substrate-based chains and FRAME modules. It analyzes Rust code in pallets/*/lib.rs and runtime/lib.rs files to identify critical Substrate vulnerability patterns, making it unsuitable for generic Rust blockchain projects outside the Substrate ecosystem.

How do I detect bad origin checks and unsigned validation issues in pallets?

To detect bad origin checks and unsigned validation issues in pallets, the scanner analyzes dispatchables and unsigned validation logic in your Rust code. It identifies patterns where origin checks are missing or incorrect and flags unsigned validation flaws with specific file references and suggested fixes.