ton-vulnerability-scanner
An agent skill by trailofbits, from trailofbits/skills. Tags: analysis, blockchain, security, smart-contracts, ton.
What it does
Scans TON (The Open Network) smart contracts for 3 critical vulnerabilities including integer-as-boolean misuse, fake Jetton contracts, and forward TON without gas checks. Use when auditing FunC contracts.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add trailofbits/skills --skill ton-vulnerability-scanner
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/trailofbits/skills
cp -r skills/plugins/building-secure-contracts/skills/ton-vulnerability-scanner ~/.claude/skills/ton-vulnerability-scanner
Safety box score
Grade A, minimal risk: 7 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This is a read-only audit skill for TON/FunC contracts: it searches local project files, reviews them for three named vulnerability patterns, and outputs a report. It does not ship installers or automation that changes the machine, but it does expose contract source to the model and can surface sensitive logic in the scanned repo.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 1 (low) | The skill instructs the agent to run read-only shell searches like `rg "transfer_notification|op::transfer_notification" contracts/`, but it ships no executable scripts or code evaluators. |
| Network access | 0 (none) | It names external references such as `https://docs.ton.org/` and GitHub URLs, but it does not instruct downloading content or sending data to remote hosts. |
| Filesystem reach | 1 (low) | Its workflow reads local project files under paths like `contracts/` and `resources/VULNERABILITY_PATTERNS.md`, but it does not write, delete, or touch paths outside the repo. |
| Secrets & credentials | 0 (none) | There is no handling of tokens, keys, `.env` files, browser sessions, or other secret stores. |
| Privilege & persistence | 0 (none) | No sudo, global installs, services, shell profile edits, or OS/git settings are requested. |
| Instruction hijack surface | 0 (none) | The markdown contains normal audit instructions and examples, but no hidden text, prompt-injection payloads, or directions to ignore higher-priority rules. |
| Irreversible actions | 0 (none) | The skill only scans and reports; it does not push, deploy, send messages, pay, book, or delete anything. |
| Transparency | 0 (none) | All shipped files are human-readable markdown, YAML, or SVG; there are no binaries, base64 blobs, or decoded-at-runtime payloads. |
Before installing
- Confirm you are comfortable letting the agent read local contract source under `contracts/` for analysis.
- Skim `resources/VULNERABILITY_PATTERNS.md` to see the exact checks the scanner will apply.
- If you want extra caution, run it first in a scratch checkout and verify it makes no writes outside the repo.
Rated 2026-10-20 by an automated review of 4 files from the skill's repository.
Source
- Repository
- trailofbits/skills (all skills from this repository)
- Path
- plugins/building-secure-contracts/skills/ton-vulnerability-scanner/SKILL.md
- Branch
- main
- Collection
- building-secure-contracts
- Updated
- 2026-09-19
Related skills
- algorand-vulnerability-scanner — Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations.
- cairo-vulnerability-scanner — Scans Cairo/StarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems.
- cosmos-vulnerability-scanner — Scans Cosmos SDK blockchain modules and CosmWasm contracts for consensus-critical vulnerabilities — chain halts, fund loss, state divergence.
- solana-vulnerability-scanner — Scans Solana programs for 6 critical vulnerabilities including arbitrary CPI, improper PDA validation, missing signer/ownership checks, and sysvar spoofing.
- substrate-vulnerability-scanner — Scans Substrate/Polkadot pallets for 7 critical vulnerabilities including arithmetic overflow, panic DoS, incorrect weights, and bad origin checks.
- token-integration-analyzer — Token integration and implementation analyzer based on Trail of Bits' token integration checklist.