Code and supply chain security logo

PR / Dependency Breaking-Change & Exploit Gatekeeper

$0.50 USDC per call · Developer and security · POST /api/v1/gatekeep-diff · Id diff-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

FieldTypeRequiredDescription
gitDiffstring; length 1..300000noRaw unified diff (git diff output). Provide exactly one of gitDiff, prUrl or files.
prUrlstring; length 20..300noAlternative 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.
filesarray<object>; max 300 itemsnoAlternative to gitDiff: changed files with their patch hunks, as returned by GitHub's pull request files API.
packageJsonDiffstring; length 0..50000no
contextstring; length 0..4000noWhat 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.

FieldTypeRequiredDescription
summarystringyes
intent_alignmentstringyesDoes the diff do what the context says, and anything it does beyond that.
breakingChangesarray<object>yes
securityFlawsarray<object>yes
bugsarray<object>yes
dependency_risksarray<object>no
riskScoreintegeryes0-100 overall merge risk.
verdictstring; one of "fail", "warn", "pass", "inconclusive"yesfail: 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.
verdictReasonstringyes
statusstring; one of "complete", "partial"yespartial 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.
nextStepstringyes
topFindingsarray<object>yes
annotationsarray<object>yes
sarifobjectyesSARIF 2.1.0 log of every grounded finding at its file and line; uploads to GitHub code scanning as-is.
mergeApprovedbooleanyesTrue when no secret and no grounded critical or high finding was found and the whole diff was reviewed.
modelRiskScoreintegeryesThe 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.
blockersarray<string>yes
dependencyRisksobjectyes
secretsDetectedarray<object>yes
suggestedPatchesarray<object>yes
statsobjectyes

Pay and connect

Available through: x402 (USDC on Base), MCP, RapidAPI, Apify.

Machine-readable