release-gate
Research FAQ Scan a repo
← release-gate

Live example · PR review gate

Watch it block a bad AI change

A pull request adds a helpful-looking feature — and quietly runs the model’s output through eval(). Here is exactly what release-gate says about that PR, on real, reproducible output. No mockups.

100 → 76
agent code-safety, this diff
1
confirmed HIGH introduced
exit 1
blocks the merge in CI
net-new
only what the PR added

01 The pull request

A data agent learns to answer free-form questions

On main, analysis-agent answers questions about a CSV by letting the model pick one named aggregation from an allowlist. Safe, boring, capped. Then a PR lands: “support natural-language queries.” It asks the model for a pandas expression and evaluates it against the dataframe. Every line looks reasonable in review — and a prompt-injected cell in the CSV now reaches eval().

02 The gate

One command, scoped to the diff

In the PR’s CI job — or locally before you push — one line. It compares the branch against its merge-base and rules on what this change introduced, never inherited debt.

$ release-gate pr --base main --comment

03 The verdict

Clean on main → blocked on the PR

Same agent, two states. The baseline promotes. The change that added the eval flips it to a block — and names the exact line and why.

✓ PROMOTE base — main before the PR 100 / 100
No confirmed high-severity risk in production code. The model may only choose from an allowlist; its output is validated, never executed. Nothing to raise.
● BLOCK this change made things net-worse Agent Code Safety 100 → 76 ▼−24

Introduced by this change — not pre-existing

HIGH Dangerous execution sink  agent.py:25 high · confirmed — eval() executes expr, which we traced to the model's own output at line 17.
client.chat.completions.create() (L17) → expr → eval() (L25)
LOW LLM call with no token ceiling  agent.py:17 medium · inferred — no max_tokens; a single response can run to the model’s max output.
1 source file changed, 0 test files touched · every line above is a fact derived from this diff, not a prediction. Exit code 1.

04 Why you can trust the red

A gate teams keep, not one they mute

  • Net-new only. It blocks what this PR introduced and never fails you on debt you inherited — so the red always means “you just added this.”
  • Confirmed, not guessed. The HIGH is graded confirmed because we can point at where the value came from: it was assigned from client.chat.completions.create(…) on line 17 and reaches eval() on line 25. Open those two lines and check us — every HIGH carries that chain.
  • A variable’s name is never evidence. Scan the same service and cache.py has pickle.loads(payload) — a genuinely dangerous sink. A name-matching scanner calls that confirmed remote code execution because the variable is called payload. We report it as a MEDIUM that asks you to confirm the source, because it’s a bare parameter whose caller this file can’t see. In AutoGPT that same variable held the cache’s own HMAC-signed bytes — asserting a vulnerability there is how a report gets dismissed by a maintainer who knows their code.
    `payload` → pickle.loads() (L26) — origin unknown
  • It’s just an exit code. 0 promote · 10 hold · 1 block. Drops into any CI without a dashboard, an account, or your code leaving the runner.

05 Run it yourself

The whole example is in the repo

Nothing here is staged. The agent versions and the script that builds the git scenario and runs the gate live under examples/demo-code-risk/. Reproduce the output above in about thirty seconds:

# from a clone of the repo $ pip install release-gate $ ./examples/demo-code-risk/build_demo.sh # …or have the demo assert every claim on this page $ ./examples/demo-code-risk/build_demo.sh --check OK — every claim in the demo docs reproduces from this run.

And we don’t rely on you to catch us. --check asserts the verdict, the score delta, the line numbers and the provenance chain quoted on this page, and CI runs it on every push. If the engine’s output ever drifts from what you read here, the build fails — so this page can’t quietly become a mockup.

Point it at your agent

Add the same gate to your PRs. It reads the code, rules on the change, and comments the verdict — free and open-source.

# .github/workflows — on every pull request
- uses: VamsiSudhakaran1/release-gate@v0.9
  with:
    command: pr
    base: origin/main