Skip to content
SkillModel-led3,117 tokens in use

Substrate Vulnerability Scanner

Scans Substrate and Polkadot FRAME pallets for 7 critical vulnerabilities that crash nodes, enable spam or allow unauthorized calls.

8,319 stars on the repository CC-BY-SA-4.0trailofbits/skills · plugins/building-secure-contracts/skills/substrate-vulnerability-scanner
/plugin marketplace add trailofbits/skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing Substrate Vulnerability Scanner costs

51tokens idle
3,117tokens in use
9,114tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure25/25
  • Examples15/15
  • Output10/15
  • Size15/15
  • Resources7/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 144

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity100
  • Maintenance52
  • Community64
  • Maturity32
  • Momentum40

Substrate Vulnerability Scanner reviews pallets and runtime code for arithmetic overflow, panics, incorrect weights, validate-first violations, unsigned transaction validation, bad randomness and bad origin checks.

The report opens with a coverage table that gives each of the seven patterns a verdict of found, clear or n/a with evidence, followed by the findings. A checklist and testing guidance for fuzzing, benchmarks and try-runtime come with it.

What You Get

  • A coverage table with all seven patterns and a verdict with evidence for each
  • Findings ordered by priority from critical to medium
  • A dispatchable checklist covering arithmetic, panics, weights, origin and validation
  • Fuzz test, benchmark and try-runtime examples

Common Use Cases

  • Auditing a custom pallet before a parachain launch
  • Reviewing weight functions for variable-cost operations
  • Finding privileged calls guarded only by ensure_signed
  • Checking a runtime upgrade path with try-runtime

What Makes It Unique

The skill targets how FRAME runtimes fail: a panic in a dispatchable stops block processing, release builds wrap arithmetic silently, and a benchmark covers only the path it measures. It requires a row for every pattern, scopes the verify-first pattern to the runtime version and rejects claims such as ensure_signed counting as an origin check for privileged calls.

Under The Hood

The skill is an instruction file with a linked pattern resource. The agent searches the project with ripgrep, reads pallets and runtime files, and reports in its response. Its checklist and examples mention commands the user can run, such as cargo test with runtime benchmarks, a node benchmark pallet command and try-runtime against a live node URI over a websocket, plus fuzz tests with test-fuzz. It does not edit pallet code.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers