← Journal
14 September 2026 · hackathon · google-cloud · static-analysis

FinGuard: reviewing payment code at AIM Code Kitchen

Google Cloud's AIM Code Kitchen S01, Track 1. A code reviewer for payment systems where deterministic AST rules run first and Gemini runs second.

Event
AIM Code Kitchen Season 01 · Google Cloud
Track
Track 1: The 24/7 Intelligent Code Reviewer
Built
FinGuard
Team & ownership
Solo
Links

The brief

Track 1 asked for an always-on code reviewer. I narrowed it to one domain: payment code, where an escaped bug doesn’t break a button, it corrupts a ledger.

What I built

FinGuard reviews a diff in tiers, cheapest first:

  1. AST rules, locally, zero tokens. Python’s ast catches the classics before anything leaves the machine: float arithmetic on currency, network calls made while holding a DB lock, and payment routes with no idempotency key.
  2. A scrubber before the cloud. Card numbers (Luhn-checked), Indian PAN numbers and API keys are redacted from the diff, and comments that look like prompt-injection attempts are quarantined, failing closed.
  3. Only then, the model. Gemini on Vertex AI gets the cleaned diff plus similar past incidents from Cloud SQL + pgvector, and streams its reasoning back over SSE. This tier handles what rules can’t express: double-spend races and saga rollbacks.
  4. Proof, then patch. For a finding, it writes a pytest that reproduces the flaw and offers a one-click diff.

It ships as a CLI (finguard review --staged can block a commit), a web console, and a Cloud Run container.

The design call

Deterministic first. Whether payment code is safe should never rest on a model’s judgement alone. An AST rule either fires or it doesn’t, costs nothing, and gives the same answer twice. The LLM earns its tokens only on the problems that need reasoning.