substrate vulnerability scanner

Other Community

Skill notes

1. Purpose

Systematically scan Substrate runtime modules (pallets) for platform-specific security vulnerabilities that can cause node crashes, DoS attacks, or unauthorized access. This skill encodes 7 critical vulnerability patterns unique to Substrate/FRAME-based chains.

2. When to Use This Skill

Auditing custom Substrate pallets Reviewing FRAME runtime code Pre-launch security assessment of Substrate chains (Polkadot parachains, standalone chains) Validating dispatchable extrinsic functions Reviewing weight calculation functions

File Extensions & Indicators

Rust files: .rs

Project Structure

pallets/*/lib.rs - Pallet implementations runtime/lib.rs - Runtime configuration benchmarking.rs - Weight benchmarks Cargo.toml with frame-* dependencies

Tool Support

cargo-fuzz: Fuzz testing for Rust test-fuzz: Property-based testing framework benchmarking framework: Built-in weight calculation try-runtime: Runtime migration testing

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Other
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@trailofbits · no license declared
Token usage
Lean
Setup complexity
Plug-and-play
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
Node.js
Detected file/system behavior
  • Read-only
  • Write / modify
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1: Platform Identification

Verify Substrate/FRAME framework usage Check Substrate version (v0.9.25+ has transactional storage) Locate pallet implementations (`pallets/*/lib.rs`) Identify runtime configuration (`runtime/lib.rs`)

02
Step 2: Dispatchable Analysis

For each `#[pallet::call]` function: [ ] Arithmetic: Uses checked/saturating operations? [ ] Panics: No unwrap/expect/indexing? [ ] Weights: Proportional to cost, bounded inputs? [ ] Origin: Appropriate validation level?

03
Step 3: Panic Sweep

Step 3: Panic Sweep

04
Step 4: Arithmetic Safety Check

Step 4: Arithmetic Safety Check

05
Step 5: Weight Analysis

[ ] Run benchmarking: `cargo test --features runtime-benchmarks` [ ] Verify weights match computational cost [ ] Check for bounded input parameters [ ] Review weight calculation functions

06
Step 6: Origin & Privilege Review

Step 6: Origin & Privilege Review

07
Step 7: Testing Review

[ ] Unit tests cover all dispatchables [ ] Fuzz tests for panic conditions [ ] Benchmarks for weight calculation [ ] try-runtime tests for migrations

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.