trace

trace is a command for coding agents from allsmog/vuln-scout. It costs 18 tokens per session (892 once invoked), scanned A, original, MIT.

A vulnerability-tracing command that follows attacker-controlled data from where it enters the program to the operation that uses it. It records whether the path proves a vulnerability, needs more investigation, or is a false alarm.

In plain words
What is it for?
Use it to trace a variable, function, or source-code location, document the source and data-flow steps, record validation controls, and assess whether the final operation is reachable with attacker input.
Why use it?
Following every handoff and security check helps distinguish an exploitable data path from a code pattern that only looks dangerous.

Command

Part of the vuln-scout plugin — 32 skills, 15 commands, 9 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/allsmog/vuln-scout/trace
Clone the repo
git clone --depth 1 https://github.com/allsmog/vuln-scout

Or install vuln-scout, the plugin that ships this one along with the rest of its 32 skills, 15 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trace

README.md
[![agentmods](https://agentmods.dev/badge/commands/allsmog/vuln-scout/trace.svg)](https://agentmods.dev/commands/allsmog/vuln-scout/trace)
Your own site
<a href="https://agentmods.dev/commands/allsmog/vuln-scout/trace"><img src="https://agentmods.dev/badge/commands/allsmog/vuln-scout/trace.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 892 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.00892
Opus 5 $0.00009 $0.00446
Sonnet 5 $0.00004 $0.00178
Haiku 4.5 $0.00002 $0.00089

Measured 5d ago against content hash cccd668cda3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

trace scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Controls: parameter binding, Jinja auto-escaping, `urllib.parse`, allowlists
vuln-scout/commands/trace.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Data Flow Trace Command

Trace attacker-controlled input to a sink and document whether it is a verified vulnerability, a hotspot that still needs proof, or a false positive.

Required Evidence

Every trace must include these four evidence buckets:

  1. Source evidence

    • Exact code line where attacker-controlled data enters.
    • Why that source is user-controlled or externally influenced.
  2. Hop chain

    • Every variable handoff or function call from source to sink.
    • File:line references for each step.
  3. Control evidence

    • Validation, encoding, normalization, or allowlist logic seen on the path.
    • Whether the control applies to all paths or only some branches.
  4. Exploitability evidence

    • Why the sink remains reachable with controlled input.
    • Constraints that would block or narrow exploitation.

Workflow

Step 1: Parse the target

Accept:

  • function_name
  • file:line
  • $variable

Step 2: Resolve the sink

Read the target location and capture:

  • Sink function or statement
  • Parameters reaching the sink
  • Immediate code context

Step 3: Build the trace

For each sink argument:

  • Find its last assignment
  • Follow callers or field propagation across files
  • Stop only when you reach a trusted source, an untrusted source, or a dead end

Step 4: Classify the result

  • Finding: attacker-controlled input reaches the sink and controls remain ineffective or absent
  • Hotspot: risky sink/pivot is present, but attacker control or exploit path is still unproven
  • False positive: a control clearly makes the path safe for this vulnerability class

Language-specific tracing templates

JavaScript / TypeScript

  • Sources: req.body, req.params, req.query, headers, cookies, browser postMessage
  • Controls: parameterized SQL, DOMPurify, path.resolve plus prefix check, URL allowlists
  • Notes: treat redirect() and framework handlers as hotspots until attacker control is shown

Python

  • Sources: request.args, request.form, request.json, Flask/Django route params
  • Controls: parameter binding, Jinja auto-escaping, urllib.parse, allowlists
  • Notes: render_template_string is a hotspot unless user-controlled template data reaches it

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 119 lines · 18 tokens per session scan A cccd668cda3d

Subscribe to this mod's changes

trace is a command published in the GitHub repository allsmog/vuln-scout (24 stars, last pushed 2mo ago), licensed MIT. It adds 18 tokens to every session and 892 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.