agentic-actions-audito…
Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI…
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.
$ npx -y skills add trailofbits/skills --skill ton-vulnerability-scanner --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/ton-vulnerability-scannerContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
name: ton-vulnerability-scanner description: 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.
Systematically scan TON blockchain smart contracts written in FunC for platform-specific security vulnerabilities related to boolean logic, Jetton token handling, and gas management. This skill encodes 3 critical vulnerability patterns unique to TON's architecture.
;; FunC contract indicators
#include "imports/stdlib.fc";
() recv_internal(int my_balance, int msg_value, cell in_msg_full, slice in_msg_body) impure {
;; Contract logic
}
() recv_external(slice in_msg) impure {
;; External message handler
}
;; Common patterns
send_raw_message()
load_uint(), load_msg_addr(), load_coins()
begin_cell(), end_cell(), store_*()
transfer_notification operation
op::transfer, op::transfer_notification
.store_uint().store_slice().store_coins()---
When invoked, I will:
1. **Search your codebase** for FunC/Tact contracts 2. **Analyze each contract** for the 3 vulnerability patterns 3. **Report findings** with file references and severity, above them a coverage table carrying a verdict for every pattern 4. **Provide fixes** for each identified issue 5. **Emit the coverage table** — all 3 patterns, each with a verdict
---
When vulnerabilities are found, you'll get a report like this:
=== TON VULNERABILITY SCAN RESULTS === Project: my-ton-contract Files Scanned: 3 (.fc, .tact) Vulnerabilities Found: 2 Coverage: 3/3 patterns reported 1 Integer as Boolean .............. found contracts/wallet.fc:45 2 Fake Jetton Contract ............ found contracts/staking.fc:85 3 Forward TON Without Gas Check ... clear forward amounts fixed at 0.05 TON --- [CRITICAL] Fake Jetton Contract - Missing Sender Validation File: contracts/staking.fc:85 Pattern: transfer_notification sender not checked against the stored Jetton wallet
---
I check for 3 critical vulnerability patterns unique to TON. For detailed detection patterns, code examples, mitigations, and testing strategies, see [VULNERABILITY_PATTERNS.md](resources/VULNERABILITY_PATTERNS.md).
1. **Integer as Boolean** ⚠️ HIGH - Positive integers used as true; FunC's true is -1 2. **Fake Jetton Contract** ⚠️ CRITICAL - `transfer_notification` sender not validated 3. **Forward TON Without Gas Check** ⚠️ HIGH - Forwarding without reserving gas for the rest of execution
For complete vulnerability patterns with code examples, see [VULNERABILITY_PATTERNS.md](resources/VULNERABILITY_PATTERNS.md).
1. Verify FunC language (`.fc` or `.func` files) 2. Check for TON Blueprint or toncli project structure 3. Locate contract source files 4. Identify Jetton-related contracts
# Find boolean-like variables rg "int.*is_|int.*has_|int.*flag|int.*enabled" contracts/ # Check for positive integers used as booleans rg "= 1;|return 1;" contracts/ | grep -E "is_|has_|flag|enabled|valid" # Look for NOT operations on boolean-like values rg "~.*\(|~ " contracts/
For each boolean:
# Find transfer_notification handlers rg "transfer_notification|op::transfer_notification" contracts/
For each Jetton handler:
# Find forward amount usage rg "forward_ton_amount|forward_amount" contracts/ rg "load_coins\(\)" contracts/ # Find send_raw_message calls rg "send_raw_message" contracts/
For each outgoing message:
TON contracts require thorough manual review:
---
Report on every pattern in §6, whether or not it turned anything up. Emit this table above the findings, with all 3 rows present:
| # | Pattern | Verdict | Evidence | |---|---------|---------|----------| | 1 | Integer as Boolean | `clear` | searched `is_`/`has_`/`flag`; all set to -1 | | 2 | Fake Jetton Contract | | | | 3 | Forward TON Without Gas Check | | |
Each verdict is one of:
addr
A Claude Code plugin marketplace from Trail of Bits providing skills to enhance AI-assisted security analysis, testing, and development workflows. Codex can load this marketplace through its Claude marketplace compatibility.
Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI…
Understand a codebase before looking for bugs in it - what each function assumes, what it guarantees, and what it depends on elsewhere. Use when starting an…
Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access…
Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes…
Scans Cairo/StarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems,…
Systematic code maturity assessment using Trail of Bits' 9-category framework. Analyzes codebase for arithmetic safety, auditing practices, access controls,…