Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

substrate-vulnerability-scanner — Claude Code skill: how to install

Scans Substrate and Polkadot pallets for 7 critical vulnerabilities such as panic DoS and integer overflow. Useful when auditing FRAME runtimes before mainnet launch.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills --skill substrate-vulnerability-scanner -a claude-code
Open on GitHub

What substrate-vulnerability-scanner does

The skill scans repository trees for FRAME pallet files in pallets/*/lib.rs and runtime setups in runtime/lib.rs. It expects Rust projects with frame-* dependencies in Cargo.toml. It inspects every dispatchable function. The review flags unhandled panics from unwrap() or raw indexing, permissive ensure_signed calls on privileged methods, and weak randomness from pallet_randomness_collective_flip.

Direct arithmetic operators wrap silently in release mode. In blockchain runtimes, unchecked math risks corrupting token accounting. For Substrate releases prior to v0.9.25, the scanner also checks whether storage mutations happen before validation checks without a #[transactional] macro.

The audit finishes with an overview table covering all 7 vulnerability categories. Each row marks a verdict such as found with a code location, or clear. The skill also generates remediation steps for every detected issue.

What it helps with

  • catch missing checked_* and saturating_* arithmetic operations
  • locate node-crashing panics from unwrap and array indexing
  • verify privileged call authorization against missing ensure_root
  • detect storage mutations executed before input validation

Example prompts for the agent

  • Scan all pallets in pallets/ for the 7 Substrate vulnerability patterns
  • Audit #[pallet::call] functions in my runtime before launching the chain
  • Check runtime code for unwrap panics and unchecked arithmetic

How to install substrate-vulnerability-scanner

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill substrate-vulnerability-scanner -a claude-code

2Manually: put the files in place

~/.claude/skills/substrate-vulnerability-scanner/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/substrate-vulnerability-scanner/

From the same set35

The whole set →
semgrep trailofbits Runs a Semgrep static security audit on your codebase. It presents a plan for user confirmation and merges all findings into SARIF. Claude Code CX Codex Cursor +1 9,500installs differential-review trailofbits Reviews code changes for security issues using Git history and test coverage. Use it for commits, diffs, and pull requests that need a written review report. Claude Code CX Codex Cursor +1 8,800installs modern-python trailofbits Configures Python projects with a modern tooling stack: uv for dependency management, ruff for linting and formatting, ty for type checking. Use when starting new projects, writing scripts, or migrating from legacy tools. Claude Code CX Codex Cursor +1 8,700installs secure-workflow-guide trailofbits Guides smart contracts through Trail of Bits' 5-step security audit on check-in or before deployment. It runs static analysis, generates visual charts, and prepares fuzzing tests. Claude Code CX Codex Cursor +1 7,400installs sharp-edges trailofbits Audits API designs and configuration schemas for developer footguns. Flags dangerous defaults and fragile interfaces where the easiest path causes security vulnerabilities. Claude Code CX Codex Cursor +1 6,900installs agentic-actions-auditor trailofbits Inspects GitHub Actions workflows for prompt injection risks and insecure AI agent setups. Catches attacker inputs leaking into prompts via event contexts or environment variables. Claude Code CX Codex Cursor +1 6,700installs gh-cli trailofbits A skill that redirects GitHub requests from curl and fetch to authenticated gh CLI for repositories, pull requests, and issues. Use it for private repos and higher API limits. Claude Code CX Codex Cursor +1 6,600installs variant-analysis trailofbits Finds related occurrences of an already identified defect across a repository. Use it after a vulnerability or logic issue turns up and similar code needs checking. Claude Code CX Codex Cursor +1 6,400installs

Similar

vulnerability-scanner sickn33 Guides AI agents through vulnerability assessments using OWASP 2025 standards and attack surface mapping. Useful during pre-release security reviews. Claude Code CX Codex Cursor +1 1,300installs wp-plugin-development WordPress This skill guides WordPress plugin work, from project structure and hooks to admin settings, security checks and release packaging. Claude Code CX Codex Cursor +1 7,900installs shipping-artifacts phuryn Generates core documentation to make vibe-coded applications reviewable before release. It maps architecture, permission flows, and test coverage for audits. Claude Code CX Codex Cursor +1 1,700installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs ponytail-audit DietrichGebert It audits a repository and ranks bugs, risks, and redundant code in a one-shot report. Use it when you need a review without code changes. Claude Code CX Codex Cursor +1 44,800installs security-audit cloudflare Reviews codebases and APIs for vulnerabilities using safe sandboxing. Fits pre-release security reviews, pen-test triage, and architecture checks. Claude Code CX Codex Cursor +1 52,200installs security-and-hardening addyosmani Guides threat modeling and security checks for code that handles user input, authentication, sessions, or external services. Use it when building a feature that accepts untrusted data or reviewing code before release. Claude Code CX Codex Cursor +1 69,400installs

Questions about substrate-vulnerability-scanner

How to install substrate-vulnerability-scanner in Claude Code?

Run npx skills add trailofbits/skills --skill substrate-vulnerability-scanner -a claude-code.

What vulnerabilities does this skill scan for?

It detects 7 specific Substrate flaws: arithmetic overflows, panic DoS from unwrap or index access, incorrect transaction weights, storage writes before validation, insecure unsigned transactions, weak collective-flip randomness, and improper origin validation.

Why does the scanner check storage write order on older Substrate versions?

Before Substrate v0.9.25, storage writes were not automatically rolled back on error. Unless wrapped in #[transactional], mutations that occur prior to a validation failure persist in storage.

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor