Catch it before it ships.

Privacy bugs are cheapest where code is written. Scan the agent's own source, give coding agents a check they can call, and make a boundary crossing fail the merge like any other failing test.

--fail-under80privacy56::+-------+-------+-----#-+-------========+::0::100::-----::#---------#---------#--------[x]----ocheckoutteststracegatedeployexit1
4
MCP tools a coding agent can call before it says done
0
API keys or network calls needed by default
1
required check: the merge fails when the policy does

01Static code scan

Catch it in the code, before the agent runs.

Hardcoded credentials, personal data in fixtures and logs, and third-party data sends in the agent's own source, scanned locally, from a ZIP, or straight from a GitHub repository.

  • SARIF for GitHub code scanning
  • Reports keep redacted snippets, never the secret
  • A score to gate on with --fail-under
Read the guide
terminal
agentleak scan . --fail-under 90
agentleak scan --repo owner/repo --format sarif --output scan.sarif

02MCP preflight

A privacy check your coding agent can call.

agentleak mcp gives Claude Code, Cursor and any MCP client nine local tools. Before the agent says it is done, it sees what its change introduced, what it fixed and what is still open, and it can score its own run.

  • privacy_preflight, privacy_scan_code, privacy_check_trace, privacy_redact, and five self-test tools
  • No account, key or network by default
  • Finding identity survives harmless line moves
Read the guide
mcp.json
{
  "mcpServers": {
    "agentleak": { "command": "agentleak", "args": ["mcp"] }
  }
}

03CI policy gate

A boundary crossing fails the merge.

The official GitHub Action, or the same CLI on GitLab and any other runner, exits non-zero when a run crosses your version-controlled policy: a score threshold or an exact flow rule.

  • Flow rules: data type × recipient × purpose × origin
  • Pull-request annotations and a job summary
  • The policy lives in the repository, reviewed like code
Read the guide
.github/workflows/privacy.yml
- name: AgentLeak privacy gate
  uses: yagobski/agentleak@v0.20.1
  with:
    trace: traces/latest.json
    fail-under: '80'

04Agent API

Agents that test and fix themselves.

Discovery through llms.txt and an agent card, onboarding in one call, self-tests and prioritised fixes, so an autonomous agent can check its own privacy without a human in the loop.

  • /llms.txt and an A2A agent card for discovery
  • Scoped project keys and a free monthly quota
  • Each run returns the delta against the last one
Read the guide
terminal
curl -sX POST https://www.agentleak.org/api/agent/onboard \
  -H 'content-type: application/json' \
  -d '{"email":"agent@example.com","agent_name":"SupportBot"}'

How it fits together

  1. Scan the codeSecrets and personal data in the source, before anything runs.
  2. Check in the editorThe coding agent runs the preflight on its own change.
  3. Gate the mergeThe same policy decides in CI, and the pull request says why.
TestingFind every leak in a run, on every channelOpen Runtime & evidenceDecide each call before it leaves, and prove itOpen