canister-audit
БесплатноБез исполняемых скриптовНе проверенDeep security audit of an Internet Computer Rust canister repo - detect an ic-cdk canister, model its invariants and trust boundaries first, run a Semgrep IC…
от aeonfun★ 801 звезда на GitHubОб этом скилле
${var} - Target selector. Three forms:
- `` (empty) -> auto-select the day's fresh feed target, audit only if it is a Rust IC canister, else exit clean. See §C1.
owner/repo-> audit that GitHub repo (e.g.dfinity/examples, a specific canister repo).fixture:<name>-> local regression mode: audit the bundled fixture atskills/canister-audit/fixtures/<name>/(e.g.fixture:token_vault). No fork, no dedup, no disclosure - a self-contained way to exercise the whole pipeline including the PocketIC proof arm. See §C1/§C2.Scope: Rust canisters only (ic-cdk / candid). Motoko is out of scope for this skill. There is no on-chain-by-address mode - an IC audit operates on source (a canister's logic is not recoverable from its deployed wasm the way verified EVM source is).
Today is ${today}. Read memory/MEMORY.md and the last 30 days of memory/logs/ before starting.
Why this skill exists
Canister bugs are logic and economics on a message-passing model, not syntax. The high-value classes - anonymous-principal access, TOCTOU across await, callback-trap-after-mutation, unbounded storage/cycle-drain DoS, upgrade-safety - are what an agentic reviewer catches by reading the source and reasoning about who can call what and which invariant breaks across an await. No off-the-shelf static tool models them: vuln-scanner and sc-audit have zero IC-aware analysis (Slither is Solidity-only; osv/cargo-audit cover Rust dependency CVEs, not canister logic). This skill is that missing IC arm.
It is sc-audit with the EVM pieces swapped for IC pieces and the shared machinery reused unchanged: the PoC gate (command mode), disclosure routing, dedup ledger, coverage manifest, report shape, and the staging/allowlist pattern. The agentic source pass (§C5) is the reliable core and needs no toolchain; Semgrep and the PocketIC proof arm are best-effort extras, so a clean audit never depends on either succeeding.
Shell shape. Each Bash call is one allowed command (pipes are fine). The run refuses a call that redirects into a file (> f, >> f, cat > f <<EOF, | tee f - /tmp included), sets a variable (REPO=...), starts with export, uses if / case / [ ... ] tests, joins commands with ; / && / ||, or uses find / cp / rm / tr / printf / command -v. So decide in prose from what each call printed, write the values you already know (<WORKDIR>, <SCRATCH>, <TARGET_COMMIT>, <REPO>, <FIXTURE>) into later commands literally in place of the placeholder, save tool output with a flag (--output / -o) or a node -e writer, copy files with python3, and write or append sources.txt/JSON artifacts with the Write/Edit tools. Only the working directory carries between calls; shell variables do not. <SCRATCH> is /tmp/canister-audit (the staging step sets CARGO_TARGET_DIR under it); gh, git, cargo, semgrep, node, python3, mkdir, cd are allowed by bare name (dep CVEs run via the cargo audit subcommand; the PocketIC server is launched by the repro's pocket-ic crate via POCKET_IC_BIN, not a bare command).
C1. Detect a Rust canister and select the target
Parse ${var} in your head (don't script it): starts with fixture: → MODE=fixture, <FIXTURE> = the text after fixture:; anything else → MODE=repo (owner/repo, or empty → auto-select).
MODE=fixture-> auditskills/canister-audit/fixtures/<FIXTURE>/(§C2). Skip dedup and disclosure entirely (§C7/§C8) - fixtures are deliberately-vulnerable regression targets, re-run on demand, never disclosed. Missing dir -> recordno-fixture: <FIXTURE>, exit clean.MODE=repo,<REPO>set -> confirm it is a Rust canister before forking (see detection below). If not, recordnot-a-rust-canister: <REPO>and exit clean.MODE=repo,<REPO>empty -> read thegithub-trendingfeed atoutput/.chains/github-trending.md(most recent by ISO header date) and walk its repos for the first Rust IC canister. If none, recordno-canister-targetand exit clean.
Rust-canister detection (any one is sufficient, after clone in C2): a Cargo.toml whose deps include ic-cdk or candid; a source file with #[ic_cdk::update] / #[ic_cdk::query] / #[update] / #[query]; or a project manifest .did + (dfx.json | icp.yaml | canister_ids.json). A repo with only .mo files is Motoko -> not-a-rust-canister, exit clean.
Dedup (mandatory in MODE=repo, same ledger as vuln-scanner/sc-audit). Before auditing, skip a target covered in the last 30 days: read memory/vuln-scanned.json, skip any row inside the window keyed on <REPO>. Also check gh api "repos/<REPO>/security-advisories" - a repo with a published advisory for the same class is already handled. MODE=fixture bypasses dedup (re-runnable).
C2. Get the code (fork a repo or copy a fixture)
First capture <WORKDIR> (the aeon repo root - memory/ and s
Установить canister-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл canister-audit?
Deep security audit of an Internet Computer Rust canister repo - detect an ic-cdk canister, model its invariants and trust boundaries first, run a Semgrep IC ruleset plus cargo-audit/osv (best-effort), then a bounded agentic pass that hunts a path breaking each invariant against the 12 canister-security pitfalls, triage, adversarially refute, prove a confirmed HIGH/CRITICAL with a PocketIC reproduction through the shared PoC gate, and route each finding through the shared responsible-disclosure machinery. The IC sibling of sc-audit; Rust canisters only.
Как установить скилл canister-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл canister-audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic