Inspiration
Code review is where many security bugs slip through. Scanners are noisy and rarely suggest a fix, and small teams often have no security expert. We wanted a reviewer that does not just flag a problem: it proposes a patch and checks it before a human merges.
What it does
Nimrod-CI takes a code diff and runs an agentic workflow with a verification loop:
- Triage: a fast Nemotron model picks out the risky parts of the diff.
- Analysis: a larger Nemotron model classifies each flaw (CWE, OWASP category) and describes an attack scenario.
- Enrichment: Tavily searches the web at runtime for current CWE/OWASP references.
- Patching: the model writes a minimal unified diff.
- Verification: the patch is applied in memory, a parser checks the syntax (JavaScript/TypeScript), and the model analyzes the patched code again. If the weakness is still there, the agent retries, up to two times.
The result is a verdict (BLOCK, REVIEW or PASS), a 0-100 risk score, the finding, the patch as a diff and its verification status, exportable as Markdown, JSON or SARIF. Patches are suggestions to review, not guarantees.
Try it: no login needed. "Load sample result" works without using API credits. Live analysis uses limited credits, has a daily cap, and can time out on the hosted demo.
How we built it
- Next.js, TypeScript and Tailwind. Each pipeline step is a short, stateless API route and the browser orchestrates the steps, so API keys never leave the server.
- NVIDIA Nemotron on Nebius Token Factory through its OpenAI-compatible API. A smaller model handles triage and re-analysis; a larger one handles analysis and patching.
- Tavily at runtime for references, with a fail-soft design: if it is rate-limited, the pipeline continues without it.
- Prompt-injection hardening: analyzed code is wrapped in untrusted-data delimiters and the prompts tell the model never to follow instructions found in code.
- Cost protection: per-IP rate limit and a daily request cap.
- Designed and directed by me, implemented with AI coding assistance.
Challenges we ran into
- Reasoning models. Nemotron can return reasoning text or
<think>blocks and tool calling is unreliable, so we use prompt-level JSON, a robust extractor, schema validation and one corrective retry. - Unsafe patches. In one real run the model "fixed" a command injection by proposing
eval, which is just another injection. Verification rejected it and blocked the merge, and we hardened the prompts against that pattern. - State bugs. A real run exposed a bug where the patch came from a previously loaded example instead of the submitted diff. We fixed it and added a regression test.
- Honest verification. An early version executed model-written proof-of-concept code in a sandbox. We removed it: running model-generated code on a public server is not safe.
- Latency. The patch step took about 33-41 seconds in our local runs and timed out on the hosted demo until we raised the function limits.
Accomplishments that we're proud of
- A working end-to-end pipeline that found a SQL injection, wrote a patch and verified it on the first attempt.
- A verification gate that refused an unsafe patch instead of approving it.
- Every claim in the app and README is labeled or trimmed to what we measured, and preloaded demo results are clearly marked as samples.
What we learned
- Verification must check for new weaknesses introduced by a patch, not only whether the original one disappeared.
- Reasoning models need defensive parsing and generous time limits.
- Being explicit about what a tool can and cannot guarantee makes it more useful.
What's next for Nimrod-CI
A GitHub Action that reviews pull requests (a manual workflow exists but is not tested end to end), syntax checking for Python, and a larger evaluation of the full patch-and-verify loop.
Built With
- acorn
- nebius-token-factory
- next.js
- node.js
- nvidia-nemotron
- react
- tailwind-css
- tavily
- typescript
- vercel
- vitest
- zod