Skip to main content

TRACE — Security radar for agents

npm version CI docs license GitHub stars

Full-repo audit in 0.26 s on local CPU. Zero tokens. No cloud.
If it is useful to you, a ⭐ helps other people find it.

TRACE is the radar, your coding agent is the mechanic. TRACE parses the repository into an Attack-Path Model, correlates real vulnerabilities (BOLA, BFLA, SSRF, injection, …), and hands structured findings to Claude Code, Cursor, or Codex over MCP — then proves each fix with a live verification oracle instead of assuming it worked.

npx trace-sec audit .
trace scan ./backend --target http://localhost:8000
trace explain TR-BOLA-001
trace verify TR-BOLA-001
claude mcp add trace -- npx -y trace-sec mcp

Every command on one page: CLI reference. AI agents start at AGENTS.md and the security harness skill.

Quick install

Install globally in one command — runtimes and dependencies configure automatically:

# Global CLI via npm (available globally as 'trace' in any terminal)
npm install -g trace-sec

# Or instant zero-install execution via npx
npx trace-sec

# Windows PowerShell one-liner
irm https://raw.githubusercontent.com/VK-Amogh/TRACE/main/install.ps1 | iex

# macOS & Linux one-liner
curl -fsSL https://raw.githubusercontent.com/VK-Amogh/TRACE/main/install.sh | bash

Once installed, simply open any terminal or CMD and type trace to launch!

Agent skills

You don't have to install TRACE yourself: install the skill and your coding agent sets TRACE up. Two skills in the open SKILL.md format work in any agent harness (Claude Code, Codex, Cursor, Gemini CLI, Copilot, OpenCode, Antigravity, …):

npx skills add VK-Amogh/TRACE --skill trace   # universal installer, 75+ agents
npx trace-sec install-skill                   # or: both skills + MCP config, zero-dependency
Skill What it is for
trace Setup: the agent installs and configures TRACE (runtime, MCP, local target, scan scope), runs scans and fixes setup problems
trace-fix Findings: triage, prioritize, fix by category and language, verify, report, plus top security guidance (OWASP/CWE, coverage limits, CI)

They also ship inside the trace-sec npm package and the PyPI wheel, so they are versioned with the tool. Details: Agent skills.

What it catches

ID Category Root cause it proves
TR-BOLA Broken Object-Level Authorization id lookup without tenant scoping, shown via dual-identity differential test
TR-BFLA Broken Function-Level Authorization Admin endpoint reachable without role check
TR-AUTH Missing / broken authentication State-changing endpoint with no auth middleware
TR-SSRF Server-Side Request Forgery User-controlled URL dispatched without validation
TR-INJ Injection (SQLi / command) Unparameterized query or shell execution, triple-signal confirmed
TR-MASS Mass assignment Untrusted dict bound straight onto an ORM model
TR-TRAV Path traversal File operation on an unsanitized user path
TR-SSTI Template injection Unescaped user input rendered server-side
TR-CORS CORS misconfiguration Wildcard origin reflected with credentials
TR-DESER Unsafe deserialization Untrusted bytes fed to an object-graph deserializer

TRACE reads source code in Python, JavaScript/TypeScript, Java/Kotlin, Go, PHP, Ruby, Rust, C# and Dart, and skips markup, styles, data/config files and build output before opening them (what TRACE scans). Secrets, dependency CVEs and cloud/IaC configuration are not assessed.

Benchmarks

Onecrew production repo (189 files, 39 endpoints), offline, zero tokens — recorded in docs/BENCHMARKS.md:

Stage Time
AST ingestion 0.049 s
APM graph assembly 0.071 s
Vulnerability analysis 0.141 s
End-to-end audit 0.261 s

Hardcore multi-service testbed (15 endpoints, 12 planted flaws): 15.79 ms static pipeline, 100% precision / 100% recall. Every trace audit prints per-stage timings, so these numbers are reproducible on your machine — no lab-only claims.

Covered by 250+ automated tests (pytest tests/).

Lite or Full

Lite (default) Full
Install pip install -e . pip install -r requirements.txt
Size ~2 MB, no torch ~1 GB (torch, transformers, onnxruntime)
Runs on any CPU, 4 GB RAM 8 GB RAM recommended
Detection AST dataflow + live probes + SecureBERT 2.0 neural scoring and Laya router
Choose it contributors, CI, quick audits maximum confidence on your own machine

trace doctor reports which mode is active on your machine.

Why trust a finding

Confidence = 1 − (1 − P_SecureBERT) × (1 − P_AST) × (1 − P_dynamic)
  • Triple match (~99.8%): AST dataflow finds the sink, SecureBERT flags the pattern, and a live probe confirms exploitation.
  • Sanitizer attenuation: an existing guard cuts the AST signal by 85%, suppressing false positives.
  • Verification oracle: after a patch, trace verify replays the exploit. FIXED means the attack is actually dead — not that a linter is happy. STILL_PRESENT means it still works; INCONCLUSIVE (target down, refused, or static analysis still flags it) is never reported as fixed.

Runs everywhere

Platform What you get
Linux x64 / Windows x64 / macOS Intel + Apple Silicon identical CLI, CI-tested on all three
Python 3.11 – 3.13, Node 18 / 20 pinned support window (requires-python = >=3.11)
CPU-only / 4 GB / offline lite install; neural scoring degrades gracefully
Air-gapped models resolve from ~/.trace/models or repo-local models/

trace doctor shows what is active on your machine.

Installation

npm install -g trace-sec        # global CLI: trace, trace-sec
pip install -e ".[dev]"         # contributors: lite + test/lint tooling
pip install -r requirements.txt # + full AI inference (torch, ~8 GB RAM)
trace doctor
trace audit ./testbed_hardcore --format table

From a source checkout without installing, the trace.bat / trace.cmd / trace.ps1 launchers set PYTHONPATH automatically. Only test systems you own or the bundled fixtures (testbed_hardcore/, test-repository/, labs/).

Releases

TRACE ships through automated GitHub Actions releases:

  • Tagging and pushing v* (e.g. v2.2.1) triggers release.yml, which runs the full cross-OS test suite, builds attested sdist/wheel/npm packages, and publishes to PyPI and npm with provenance. The agent skills ship in both packages, and release_tools.py keeps their versions in sync.
  • For full details and manual dry runs, see docs/releases.md.

Documentation

Installation · Quick start · CLI reference · What TRACE scans · MCP setup · Agent skills · FAQ · Troubleshooting

Contributing

See CONTRIBUTING.md. Report security issues privately per SECURITY.md; accessibility barriers are tracked as bugs, see ACCESSIBILITY.md. Bug reports and feature requests use the issue templates; pull requests follow the PR template checklist.

Citation
@software{trace_sec,
  title  = {TRACE: Threat Reconnaissance and Attack-path Correlation Engine},
  author = {{TRACE Core Team}},
  year   = {2026},
  url    = {https://github.com/VK-Amogh/TRACE}
}

See CITATION.cff.

Star history

Star history of TRACE

License

Apache-2.0 — see LICENSE.

We are discontinuing this project.

Metadata

Release files for trace-sec 2.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trace-sec 2.2.2
File Size Uploaded Provenance
trace_sec-2.2.2.tar.gz 1.4 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for trace-sec 2.2.2
File Interpreter ABI Platform
trace_sec-2.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / trace_sec-2.2.2.tar.gz

Download URL trace_sec-2.2.2.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
aae834acc2b9672f506cb270c435ad2805f8aad1301c7b279566846a500a1c8a
BLAKE2b-256 checksum
How to use checksums
8c5bb32d28be12783eceeb855352613d23d17d9c99f94c19586a0225fc442202
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / trace_sec-2.2.2-py3-none-any.whl

Download URL trace_sec-2.2.2-py3-none-any.whl
Size 399.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf39074a568b8821e74730a413f6edef9b564890346d0934846b597f2a363cd1
BLAKE2b-256 checksum
How to use checksums
d04abf5752eae4943cbb5f4fa22d0ed6c513d6cb948e2e8928585e25b9af49e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for trace-sec 2.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.2.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page