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

Inside the capability

Three views of how it works.

POLICY AS CODE
agentleak.yamlPOLICYminimum_score:80block:channel: tool_callat_or_above: L3require_trace_digest:true

Define the boundary beside the code

Version score thresholds and forbidden channel-level combinations with the project that owns them.

REQUIRED CHECK
PR #284 · privacy checksunit tests1m 08sagentleak / trace18sagentleak / code11sbuild52s

Block only on a defined crossing

Return a normal pass or fail status that any CI runner and branch protection rule can enforce.

SIGNED EVIDENCE
POLICYTRACEREPORTdecision signed · 2026-07-20 18:42 UTC

Attach proof to the decision

Keep the policy digest, trace digest and failing finding together so a gate can be audited later.

The mental model

A privacy policy becomes useful when it can stop a release.

Dashboards are evidence after the fact. A gate turns the same evidence into an enforceable engineering boundary: which channels may disclose which levels, and what minimum privacy score a project must maintain. The policy lives beside the code and produces a normal CI status.

Before

Reviewers inspect a report after an agent has changed.

With AgentLeak

The pull request cannot merge until the same trace passes policy.

  • Policies are version-controlled per project
  • The official Action and the CLI enforce the same local decision
  • Every failure carries the channel, level and remediation needed to fix it

How it works

From raw trace to a fix, in four steps.

1

Set the policy

Choose a score threshold, or forbid a specific channel/severity combination, per project and check it into version control.

2

Add the check

Use the official Action on GitHub, or run the same CLI from GitLab CI, a Makefile or a pre-merge hook.

3

Fail on crossing

A boundary crossing exits non-zero, which fails the job exactly like any other failing test in the suite.

4

Attach the evidence

The trace, the offending channel and the severity are written to the report and CLI output, so whoever marked the job required has exactly what they need to fix it before merging.

Gate a merge in CI

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

Read the complete implementation guide →

FAQ

Questions, answered.

Ready when you are

Test the path, not only the answer.

Create a local workspace, run a bundled scenario, then wire AgentLeak into CI or let your agent onboard itself.