/truent:truent-depsfrom truent
Audits smart-contract dependency supply chains: finds forked/drifted libraries, unpinned submodules, and CI workflows that leak deploy keys. Runs Truent's engine over vendored code. Supports Foundry, Hardhat, Anchor, Move, Soroban.
Ships in truent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Audit what your contracts actually compile, not what your README says they depend on.
The premise the rest of this skill follows from: an audit that excludes
lib/ and node_modules/ has excluded most of your bytecode. A protocol
that forked OpenZeppelin eighteen months ago and hand-patched one modifier has
a bug in its own attack surface — but every scanner configured with the
standard "exclude dependencies" rule will report the project clean. The point
of this skill is to find the dependency code that is not upstream any more,
and put the engine on it.
$SKILL_DIR = the directory containing this SKILL.md.
Two finding tiers, same as truent-audit, and never blurred:
VERIFIED — the Truent engine ran over the code and produced this.
Reproducible, with file and line.REASONED — a supply-chain risk judgement (an unpinned tag, an
over-permissioned workflow) that no engine executed. Honest about it.<path>: treat that directory as the project root.truent-audit, lib/, node_modules/, vendor/ and
.gitmodules targets are in scope. That is the entire point.Detect the toolchain and enumerate every dependency that reaches the compiler.
Bash: identify the project type and manifests.
ls foundry.toml remappings.txt hardhat.config.* package.json \
Anchor.toml Cargo.toml Move.toml 2>/dev/null
Bash: enumerate dependencies per toolchain.
# Foundry — submodules and their pinned commits
git submodule status --recursive 2>/dev/null
cat remappings.txt 2>/dev/null
# Hardhat / npm — the resolved tree, not the declared range
[ -f package-lock.json ] && jq -r '.packages | keys[]' package-lock.json 2>/dev/null | head -100
[ -f yarn.lock ] && grep -E '^\S+@' yarn.lock | head -100
# Anchor / Rust
[ -f Cargo.lock ] && grep -A1 '^name = ' Cargo.lock | head -100
# Move
[ -f Move.toml ] && sed -n '/\[dependencies\]/,/^\[/p' Move.toml
Bash: the compiled-vs-declared gap — which dependency files the build
actually pulls in.
grep -rhoE 'import\s+[^;]*from\s+"[^"]+"|import\s+"[^"]+"' --include='*.sol' src/ contracts/ 2>/dev/null \
| grep -oE '"[^"]+"' | tr -d '"' | sort -u
Record, do not yet judge. Phase 2 decides which of these are risky.
For each vendored dependency, determine whether it still matches upstream. Drift is the signal: unmodified upstream code is upstream's problem, modified code is yours.
Bash: for git submodules, compare the pinned commit against the upstream
ref it claims to track.
git submodule foreach --recursive '
echo "=== $name ==="
git fetch --quiet origin --tags 2>/dev/null || true
echo "HEAD: $(git rev-parse HEAD)"
echo "describes: $(git describe --tags --always 2>/dev/null)"
echo "local edits: $(git status --porcelain | wc -l) file(s)"
git status --porcelain
'
Any non-empty local edits is a finding. A submodule with a dirty
working tree means code is being compiled that exists in no upstream
release and that nobody reviewed as project source.
Bash: for copied-in (non-submodule) libraries, diff against the real
upstream release.
# Example: a vendored OpenZeppelin at the version package.json claims
VER=$(jq -r '.dependencies["@openzeppelin/contracts"] // empty' package.json 2>/dev/null | tr -d '^~')
[ -n "$VER" ] && {
TMP=$(mktemp -d)
npm pack "@openzeppelin/contracts@$VER" --pack-destination "$TMP" >/dev/null 2>&1 &&
tar -xzf "$TMP"/*.tgz -C "$TMP" &&
diff -rq "$TMP/package" lib/openzeppelin-contracts 2>/dev/null | head -40
}
Adapt the registry and paths to the toolchain in play. If no upstream artifact can be fetched, say so and mark the dependency unverifiable rather than assuming it is clean.
Classify each dependency:
REASONED finding on its own.This is where the skill stops being a linter and starts being Truent.
truent scan <drifted-dependency-path> --chain <chain> --format json
Run it over every drifted and unverifiable dependency, plus any
project file that imports from one. Findings here are VERIFIED and carry the
same CWE/SWC/OWASP/DASP mapping as any other Truent finding — check with:
truent taxonomy --id SWC-107 # what maps to a given weakness class
A detector hit inside a forked library is usually higher severity than the same hit in project code: it is code the team believes is audited, so nobody is reading it.
A contract cannot be exploited through a workflow file, but a deploy key can be stolen from one, and stolen deploy keys have drained more value than most Solidity bugs.
Read every file under .github/workflows/, .gitlab-ci.yml, or
equivalent. For each, check:
echo, cat, or pass a
secrets.* value into a command whose output is logged? Does a step run
on pull_request_target with a checkout of the PR head? (That
combination gives any external contributor your secrets.)uses: someone/action@main or @v4 rather than a
full commit SHA. A tag is mutable; a compromised action runs with your
deploy key.push to any branch,
or on a fork's PR?npm install instead of
npm ci, forge install without a pinned commit.Bash: check the obvious secret leaks in the repo itself.
git ls-files | grep -E '(^|/)\.env($|\.)'
git log --all --oneline --diff-filter=A -- '*.env' '*.key' '*keystore*' | head -20
A .env that was ever committed is compromised even if later removed — the
object is still in history. Say that plainly; do not soften it.Anything found here is REASONED unless it is a literal committed secret, in
which case it is a fact and should be reported as such.
Write deps-report.md at the project root. Structure:
DEPENDENCY SUPPLY-CHAIN REVIEW — <project>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scope: <n> dependencies across <toolchain>
Engine: truent <version>
Dependency inventory
pristine <n> (identical to upstream — out of scope)
drifted <n> ← audited as project code
unpinned <n>
unverifiable <n> ← audited as project code
[VERIFIED] <severity> — <invariant_id> in <drifted-dep>/<file>:<line>
CWE-xxx · <name> | SWC-xxx | SCxx | DASP-x
<message>
Why it matters more here: this file is inside a dependency the team
believes is upstream-audited. It is not; it diverged at <commit>.
[REASONED] <severity> — <supply-chain risk>
<what, and what would have to be true for it to be exploited>
CI / release pipeline
<findings, or "no issues found">
Not checked
<every dependency marked unverifiable, and why>
The Not checked section is mandatory. A supply-chain report that silently omits what it could not verify is worse than no report, because it reads as coverage.
git fetch cannot reach upstream (offline, private mirror), stop and say
so. Do not substitute a guess about whether a fork drifted.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub emmyhack/truent --plugin truent6 skills in this plugin
/truent-auditEngine-first smart-contract security audit across EVM, Solana, Move and Soroban. Truent's compiled engine runs first (static detectors on every chain, a real revm invariant fuzzer on the EVM) and is the ground truth; twelve LLM attacker lenses then hunt the residual, and every property they state is pushed back through the engine. Findings carry one of three evidence tiers, never blurred: VERIFIED-PROVEN (the engine executed it), VERIFIED-STATIC (a compiled detector matched real code), REASONED (a model proposed it, nothing executed it). Modes - default (full repo) or a specific filename. Loop mode runs several passes in one scan, each pass told what the earlier ones found, and ends in one combined report; it remembers findings between scans in a ledger. Triggers on 'truent audit', 'audit', 'audit this contract', 'check this contract', 'security review', 'check for vulnerabilities', 'review for security', 'solidity auditor', 'run the auditor', 'run the auditor in loop mode', 'loop mode', 'run 3 passes'./truent-fuzzStateful invariant fuzzing for smart contracts on EVM, Solana, Move and Soroban. Default path runs Truent's native revm-backed fuzzer — auto-detected invariants, user-written .invar properties, adversarial call sequences, and minimal-PoC shrinking in one binary, no external toolchain. On demand it generates a full fizz-grade Echidna/Medusa suite (setup, handlers, ghost/snapshot properties, coverage loop, campaigns, Foundry repros, report, convert/sync sub-commands) as a strict superset, never lock-in, plus Solana fuzz plans and Move Prover / Soroban test harnesses. Triggers on 'truent fuzz', 'fuzz this', 'fizz', 'invariant fuzzing', 'stateful fuzzing', 'generate fuzz suite', 'build fuzz harness', 'build a fuzz harness', 'fuzzing harness', 'property testing', 'invariant suite'./truent-irOn-chain incident response for a live or past smart-contract exploit. Scopes the damage from the exploit transaction, reproduces the attack against the deployed bytecode with Truent's revm-backed fuzzer to identify the exact broken invariant, and separates confirmed mechanism from speculation before anyone writes a post-mortem. Covers containment, evidence preservation, and the regression invariant that stops a repeat. Triggers on 'truent ir', 'we are being exploited', 'incident response', 'post-mortem', 'we got hacked', 'analyze this exploit tx', 'what went wrong on-chain'./truent-keysKey custody and deploy-safety review for a smart-contract project. Finds plaintext private keys in source, scripts, history and CI; then runs Truent's engine over the on-chain side of the same question — single-EOA admins, multisig thresholds too low to matter, unprotected initializers and upgrade paths — because a well-guarded key on a contract anyone can re-initialize protects nothing. Multi-chain: EVM, Solana, Move, Soroban. Triggers on 'truent keys', 'key hygiene', 'deploy safety', 'check my private keys', 'is my deploy script safe', 'admin key review', 'who can upgrade this'./truent-reconPre-audit reconnaissance for a smart-contract codebase, engine-verified. Produces a recon/ folder (recon.md readiness report with threat model, entry-point map, full invariant map, architecture diagram, git-history risk mining, test and doc gaps, verdict) and, unlike a report-only recon, feeds the synthesized invariants into Truent's compiled engine so checkable items come back already checked and the engine's own findings, STRIDE model and exposure chains are part of the map. Multi-chain: EVM, Solana, Move (Aptos, Sui), Soroban. Triggers on 'truent recon', 'recon', 'x-ray', 'pre-audit', 'pre-audit report', 'audit readiness', 'readiness report', 'prep this protocol', 'protocol prep', 'summarize this protocol', 'map this codebase', 'where should I audit'.