Skip to main content
skill CX Codex

ton-vulnerability-scanner — Claude Code skill: TON security audit

ton-vulnerability-scanner scans TON smart contracts (FunC) for three critical vulnerabilities: integer-as-boolean misuse, fake Jetton contracts, and forwarding TON without gas checks.

CC-BY-SA-4.0 5,700 installs ★ 8,341 updated 2026-10-24

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

What ton-vulnerability-scanner does

The skill detects three vulnerability types in TON contracts. First: treating positive integers as booleans — FunC true is -1, not 1, and confusion breaks conditional logic. Second: missing sender validation in transfer_notification handlers — without checking that the sender matches the trusted Jetton wallet address, an attacker can forge token transfer notifications. Third: forwarding user-supplied forward_ton_amount values without balance checks — the contract can be drained.

The skill scans .fc and .func files, outputs a coverage table for all three patterns (found, verified, or not applicable), and provides detailed reports for each finding with line numbers. Without ton-compiler and toncli installed, it will not run. Reports include specific fixes for each vulnerability.

What it helps with

  • detect use of 1 instead of -1 in FunC boolean flags
  • verify sender validation in Jetton transfer_notification handlers
  • identify user-supplied TON forwarding without balance limits
  • run pre-launch security audit on a TON contract

Example prompts for the agent

  • Check contracts in contracts/ for TON vulnerabilities
  • Run ton-vulnerability-scanner on all .fc files in the project
  • Scan Jetton handlers for missing sender validation

How to install ton-vulnerability-scanner

1Skills CLI (Vercel)

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

2Manually: put the files in place

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

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

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ton-vulnerability-scanner

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

Run npx skills add trailofbits/skills --skill ton-vulnerability-scanner -a claude-code, then open ~/.claude/skills/ton-vulnerability-scanner/SKILL.md.

What does ton-vulnerability-scanner do?

It scans FunC contracts for three vulnerabilities: integer-as-boolean misuse, missing sender checks in Jetton notifications, and unsafe TON forwarding without gas reservation.

What does ton-vulnerability-scanner require to run?

It needs ton-compiler and toncli installed on the system. Without them, the skill cannot analyze FunC files.

Similar skills

All skills for Security →

From the same set95

The whole set →
substrate-vulnerability-scanner substrate-vulnerability-scanner scans Substrate and Polkadot pallets for 7 critical vulnerabilities such as panic DoS and integer overflow. Useful when auditing FRAME runtimes before mainnet launch. CX Codex +1 5,700installs atheris Sets up Atheris, a coverage-guided Python fuzzer built on libFuzzer. Runs fuzzing on pure Python code and native C extensions with AddressSanitizer. CX Codex +1 5,700installs cairo-vulnerability-scanner cairo-vulnerability-scanner — a skill that scans Cairo contracts on StarkNet for 6 vulnerability patterns, from felt252 overflow to replayed signatures. Use it when auditing L1-L2 bridges. CX Codex +1 5,700installs ossfuzz Guides your AI agent through enrolling projects in Google OSS-Fuzz and running fuzzer targets locally with helper scripts. CX Codex +1 5,700installs skill-improver The skill-improver skill runs repeated reviews and fixes on another skill until the review has no critical or major findings. It relies on the plugin-dev reviewer agent. CX Codex +1 5,600installs let-fate-decide The let-fate-decide skill uses a Tarot spread to suggest a direction when a request leaves several reasonable options open. It suits casual handoffs where the agent is asked to choose. CX Codex +1 5,300installs zeroize-audit zeroize-audit finds passwords, keys and tokens left in memory across C, C++ and Rust, and checks whether the compiler threw their wiping away. CX Codex +1 5,300installs mutation-testing Walks the agent through mutation testing: setting up a mewt or muton campaign, reading surviving mutants, hunting bugs in untested code. CX Codex +1 4,900installs

Project sponsors

Companies that keep this analytics open