
PR / Dependency Breaking-Change & Exploit Gatekeeper
Merge gate for a pull request: pass/warn/fail verdict, 0-100 risk score, the top findings with file:line and a fix, drop-in patches, GitHub Checks annotations and a SARIF 2.1.0 log. Accepts a raw unified diff, a GitHub PR, commit or compare URL, or per-file patches. Deterministic scanners (secrets, SQL and command injection, weak crypto, risky package.json changes) run beside a model review for bugs, race conditions and silent API breaks, and every model finding must point at a line inside the diff or it is marked ungrounded and never blocks. Large diffs are reviewed in up to 4 parts and anything beyond is reported as unreviewed. A review aid, not a replacement for tests or human review.
What you get
A CI-ready merge gate: stops a leaked secret, an injection bug or a silent API break before it ships, and hands the author the file, line and fix.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/gatekeep-diff. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/gatekeep-diff \
-H 'content-type: application/json' \
-d '{"gitDiff":"diff --git a/src/users.ts b/src/users.ts\n--- a/src/users.ts\n+++ b/src/users.ts\n@@ -10,3 +10,4 @@ export async function findUser(db, req) {\n- return db.query('\''SELECT * FROM users WHERE id = $1'\'', [req.params.id]);\n+ const id = req.params.id;\n+ return db.query(`SELECT * FROM users WHERE id = ${id}`);\n }\n","context":"Refactor user lookup for readability."}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
gitDiff | string; length 1..300000 | no | Raw unified diff (git diff output). Provide exactly one of gitDiff, prUrl or files. |
prUrl | string; length 20..300 | no | Alternative to gitDiff: a public GitHub pull request, commit or compare URL (github.com/owner/repo/pull/123). Its .diff is downloaded; a diff over 300,000 characters is cut at a file boundary and the rest reported as unreviewed. |
files | array<object>; max 300 items | no | Alternative to gitDiff: changed files with their patch hunks, as returned by GitHub's pull request files API. |
packageJsonDiff | string; length 0..50000 | no | |
context | string; length 0..4000 | no | What the PR is supposed to do. |
Example request body
{
"gitDiff": "diff --git a/src/users.ts b/src/users.ts\n--- a/src/users.ts\n+++ b/src/users.ts\n@@ -10,3 +10,4 @@ export async function findUser(db, req) {\n- return db.query('SELECT * FROM users WHERE id = $1', [req.params.id]);\n+ const id = req.params.id;\n+ return db.query(`SELECT * FROM users WHERE id = ${id}`);\n }\n",
"context": "Refactor user lookup for readability."
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
summary | string | yes | |
intent_alignment | string | yes | Does the diff do what the context says, and anything it does beyond that. |
breakingChanges | array<object> | yes | |
securityFlaws | array<object> | yes | |
bugs | array<object> | yes | |
dependency_risks | array<object> | no | |
riskScore | integer | yes | 0-100 overall merge risk. |
verdict | string; one of "fail", "warn", "pass", "inconclusive" | yes | fail: a secret or a grounded critical or high finding blocks the merge. inconclusive: part of the diff was not reviewed. warn: only non-blocking findings. pass: none. |
verdictReason | string | yes | |
status | string; one of "complete", "partial" | yes | partial when part of the diff was not reviewed or an over-long added line was pattern-scanned only in part; the result is still signed. |
nextStep | string | yes | |
topFindings | array<object> | yes | |
annotations | array<object> | yes | |
sarif | object | yes | SARIF 2.1.0 log of every grounded finding at its file and line; uploads to GitHub code scanning as-is. |
mergeApproved | boolean | yes | True when no secret and no grounded critical or high finding was found and the whole diff was reviewed. |
modelRiskScore | integer | yes | The model's own 0-100 estimate; advisory. riskScore is computed from grounded findings (critical 40, high 20, medium 8, low 2, capped at 100) with scanner floors. |
blockers | array<string> | yes | |
dependencyRisks | object | yes | |
secretsDetected | array<object> | yes | |
suggestedPatches | array<object> | yes | |
stats | object | yes |
Pay and connect
Available through: x402 (USDC on Base), MCP, RapidAPI, Apify.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent