substrate-vulnerability-scanner

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

6.5k|561|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/trailofbits/skills --skill substrate-vulnerability-scanner-trailofbits
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: substrate-vulnerability-scanner
Source: https://github.com/trailofbits/skills/tree/main/plugins/building-secure-contracts/skills/substrate-vulnerability-scanner
Command: npx skills add https://github.com/trailofbits/skills --skill substrate-vulnerability-scanner-trailofbits

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Substrate/FRAME security auditing is complex; this skill detects seven critical vulnerability patterns to quickly identify risky code paths in pallets and runtimes.

Core Features & Use Cases

  • Detects seven critical Substrate/FRAME vulnerability patterns (arithmetic overflow, panic-induced DoS, improper weights, unsigned transaction validation gaps, weak randomness usage, bad origin handling, and transactional safety) and reports file references.
  • Ideal for auditing custom pallets, reviewing runtime configurations, and governance modules across Polkadot-like networks.
  • Provides actionable mitigations and best-practice checks to guide secure development.

Quick Start

Run the substrate-vulnerability-scanner on your Substrate project to generate a vulnerability 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 pallets/*/lib.rs and runtime/config to identify arithmetic overflows, panics, weight misconfigurations, and weak randomness. The scanner reports risky code paths with file references and recommended mitigations.

What are the most critical FRAME pallet vulnerabilities to check for during a security audit?

Critical FRAME pallet vulnerabilities include arithmetic overflows, panic-induced DoS, improper weights, unsigned transaction validation gaps, weak randomness usage, bad origin handling, and transactional storage compatibility issues. Scanning detects these seven patterns across your codebase.

Can I use this scanner to audit governance modules in Polkadot-like ecosystems?

Yes, you can audit governance modules in Polkadot-like ecosystems. The scanner is applicable to Substrate runtimes, custom FRAME pallets, and governance modules, enforcing targeted checks for critical vulnerability patterns and reporting file references.

How do I detect arithmetic overflow and panic-induced DoS in Substrate runtime code?

Detect arithmetic overflow and panic-induced DoS in Substrate runtime code by scanning for these specific vulnerability patterns. The tool enforces checks across pallets and runtimes, providing actionable mitigations and best-practice guidance.

What's the best way to check Substrate pallet weights and unsigned transaction validation?

The best way to check pallet weights and unsigned transaction validation is a targeted scan of pallets/*/lib.rs. The scanner enforces checks for weight misconfigurations and unsigned transaction validation gaps, reporting issues with recommended mitigations.

Does this security audit tool check for bad origin handling and transactional storage compatibility?

Yes, the security audit tool checks for bad origin handling and transactional storage compatibility. It enforces checks for these vulnerabilities alongside arithmetic overflows, panics, weak randomness, and unsigned transaction gaps across Substrate codebases.