Skip to main content
Evaluation runs against a synthetic Go payments API whose spec matches it exactly in the clean state. Drift is then injected, so ground truth is known by construction.

The 12 drifts

Authentication, checked at the guard

D08 is caught by reading the handler: an endpoint the spec calls public whose code reads a credential. That direction is unambiguous, but it only answers half the question. Authentication is usually applied by middleware instead of inside the handler, so a handler that reads no header tells you nothing about whether the endpoint is protected. Where a language’s extractor records route middleware, both directions are checked against the guard instead: The pattern that motivates the first one is ordering. router.use(mw) guards only the routes registered after it, so a route sitting above that line is open however protected the rest of the file looks:
Both rules are reported per file, and only for files that guard something. A project that applies authentication once at the application level registers no route middleware at all, so calling every one of its routes unguarded would fill a page with false alarms. What makes something a guard is what it reads, not what it is called. The spec’s components.securitySchemes names the credential, and any middleware whose source reads that header counts as an authentication guard, whatever its name.

The three worst ones

D05 Money precision

"1500.50" becomes 1500.50. String parsers break, float parsers lose precision.

D08 Silent auth

A documented-public endpoint starts returning 401.

D10 Webhook signature

Header renamed. Every delivery fails verification on the receiving end.
All three are silent. Code compiles, tests pass, endpoint returns 200. The damage lands in the partner’s system.

The 4 decoys

A local rename, an added comment, an extracted helper, a reordered field. These are code changes that leave the contract alone, so a finding on any of them is a false positive. Without decoys, an auditor that reports everything scores perfectly.

Targets

Committed before the first run, so they cannot be adjusted afterwards.

Recall ≥ 0.80

Precision ≥ 0.85

3/3 critical

4/4 decoys clean

Primary metric is F1: recall alone rewards noise, precision alone rewards silence.