Build & CI

Catch it before it ships.

Scan the agent's own code for secrets and personal data, give coding agents a privacy check they can call, and make a boundary crossing fail the merge like any other failing test.

Pre-runtime scanning

Catch hardcoded secrets before the agent ever runs.

Static code scan reads an agent's own source — a local directory, an uploaded zip, or a GitHub repo — for hardcoded secrets, PII in log statements and sensitive values sent to third parties, before a single trace is captured.

Three ways to submit code

Point the scanner at a local directory, a zip file, or a GitHub repo and branch — it reads the same source your agent runs, not a sandboxed copy.

  • `agentleak scan <path>` for a local directory or .zip
  • `agentleak scan --repo owner/name --branch main`
  • POST /api/agent/code for an agent scanning itself
  • Detector settings honour your project's agentleak.yaml

The same severity model

Findings use the identical L1 to L4 severity scale as trace analysis, plus code-specific layers, so a hardcoded API key and a leaked account_id are directly comparable.

  • L1 to L4 severity per finding
  • Entropy analysis for high-signal secrets
  • De-obfuscation of decomposed PII
  • File and line number per finding

Built for the agent loop

POST /api/agent/code is part of the same scoped-key API an agent uses to self-test and improve, so a code scan can run automatically before every deploy.

  • POST /api/agent/code
  • Scoped project API key (X-AgentLeak-Key)
  • Re-scans the source declared in the agent card
  • Pairs with the CI `--fail-under` gate

GitHub-native privacy automation

Turn every code change into a privacy checkpoint.

Scan every pull request

Run AgentLeak static analysis on pull requests and merge queues before sensitive code lands.

Auto-gate risky changes

Fail CI automatically when the code privacy score falls below the threshold set for the repository.

Branch-specific policies

Apply stricter secret, PII and third-party-send rules to production and release branches.

Review remediation status

Keep findings, reviewers and the current privacy gate attached to the exact commit in GitHub.

Scan a GitHub repo for hardcoded secrets

agentleak scan --repo acme/support-bot --branch main --fail-under 80
# Code privacy score: 74/100 — Conditional pass
#   [L3] app/memory_adapter.py:42 hardcoded_api_key (secret, high-entropy)

Read the implementation guide →

MCP privacy preflight

Give coding agents a privacy check they can call.

agentleak mcp exposes four local tools for code scanning, trace checks, redaction and change-aware preflight. Before an agent says the work is done, it can see what is new, what it fixed and what remains open.

agentleak / preflightLOCAL
$ privacy_preflight workspace
1 new2 fixed1 still open
L4hardcoded_secretsrc/client.py

Move the credential to an environment variable before completing this change.

history local · redacted4 tools over MCP

Four tools, one local engine

The MCP surface runs the same analyzer as the CLI, directly inside Claude Code, Cursor or any compatible client.

  • privacy_preflight
  • privacy_scan_code
  • privacy_check_trace
  • privacy_redact

Deltas an agent can act on

Preflight compares the current scan with the previous check and separates new, fixed and still-open findings instead of returning an isolated score.

  • Stable identity across line moves
  • Priority-sorted new findings
  • Fixed findings acknowledged
  • Empty traces rejected, never scored 100

Private by default

History stays in the project as capped, redacted JSONL. Without a project key, no result leaves the machine.

  • No account required
  • No network required
  • Only redacted snippets in history
  • Optional workspace sync

Register the local MCP server

{
  "mcpServers": {
    "agentleak": {
      "command": "agentleak",
      "args": ["mcp"]
    }
  }
}

Read the implementation guide →

CI policy gate

Make privacy a required check, not an afterthought.

Set a policy per project and wire AgentLeak into CI. When an agent crosses its boundary, the check fails and the pull request is blocked, with the offending channel and severity attached to the run.

One boundary per project

Define what counts as a failure (a channel, a severity level, a score threshold) and the gate enforces it on every run.

  • Fail below a privacy score
  • Block a channel above a level
  • Per-project, version-controlled policy
  • Sensible defaults out of the box

A native GitHub check—or any runner

The official GitHub Action scans code, traces, scenarios or benchmark packs, annotates the pull request and writes a job summary. The same CLI still works in GitLab CI and every other runner.

  • Official GitHub Action
  • PR annotations and job summary
  • Typed score, verdict and finding outputs
  • CLI support for every other runner

Evidence on the PR

A blocked merge comes with the trace, the offending channel and the severity, so the author knows exactly what to fix.

  • Offending channel highlighted
  • Severity and risk index shown
  • Link straight to the full report
  • The exact remediation attached

Gate a merge in CI

# .github/workflows/agentleak.yml
- name: AgentLeak privacy gate
  uses: yagobski/agentleak@v0.14.1
  with:
    trace: traces/latest.json
    config: agentleak.yaml
    fail-under: '80'

Read the implementation guide →

Built for autonomous agents

Agents can discover, test and fix themselves.

llms.txt discovery, one-call onboarding, scoped project keys and machine-readable remediation hints. An agent can find AgentLeak, audit itself and fix its own leaks in a bounded loop, with no browser and no human in the middle.

Discoverable by machines

A machine-readable llms.txt and an A2A agent card let an agent find AgentLeak and learn how to use it without a human.

  • /llms.txt discovery
  • /.well-known/agent-card.json
  • OpenAPI at /openapi.json
  • One-call onboarding

Self-test in one call

An agent submits its own trace and gets back a full report: passed, compliant, failed frameworks and the exact remediation hints.

  • POST /api/selftest
  • Scoped project API keys
  • Compliance verdict per framework
  • Structured, actionable hints

A bounded improvement loop

The improve endpoint returns a delta versus the previous run and priority-sorted next steps, so an agent can converge on a clean score safely.

  • POST /api/agent/improve
  • Delta versus the previous run
  • Priority-sorted next steps
  • Generous free quota for agents

Onboard an agent in one call

curl -sX POST https://www.agentleak.org/api/agent/onboard \
  -H 'content-type: application/json' \
  -d '{"email":"agent@example.com","agent_name":"SupportBot"}'

Read the implementation guide →

Make privacy operations self-driving

“A privacy issue gets fixed when the finding is tied to the exact file, line, trace and release gate.”

Code-to-trace evidenceOne remediation path from source to runtime

“Teams should not have to choose between shipping quickly and proving that agents handle sensitive data safely.”

Fast, auditable releasesAgentLeak product principle

FAQ

Questions, answered.