<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Saksham Mishra</title>
    <description>The latest articles on DEV Community by Saksham Mishra (@saksham_mishra_ba6fb01ac5).</description>
    <link>https://dev.to/saksham_mishra_ba6fb01ac5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3459146%2F475882bc-6abd-4b3c-8057-3c2720805ce8.jpg</url>
      <title>DEV Community: Saksham Mishra</title>
      <link>https://dev.to/saksham_mishra_ba6fb01ac5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saksham_mishra_ba6fb01ac5"/>
    <language>en</language>
    <item>
      <title>Proof, not guesses: building an AI agent that exploits your PR before it merges</title>
      <dc:creator>Saksham Mishra</dc:creator>
      <pubDate>Sun, 30 Aug 2026 19:05:01 +0000</pubDate>
      <link>https://dev.to/saksham_mishra_ba6fb01ac5/proof-not-guesses-building-an-ai-agent-that-exploits-your-pr-before-it-merges-1dc5</link>
      <guid>https://dev.to/saksham_mishra_ba6fb01ac5/proof-not-guesses-building-an-ai-agent-that-exploits-your-pr-before-it-merges-1dc5</guid>
      <description>&lt;p&gt;&lt;em&gt;A field report from the TrueForge Agent Harness Hackathon.&lt;/em&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/mysticalseeker24" rel="noopener noreferrer"&gt;
        mysticalseeker24
      &lt;/a&gt; / &lt;a href="https://github.com/mysticalseeker24/falcon-harness" rel="noopener noreferrer"&gt;
        falcon-harness
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Falcon&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;A diff-scoped exploitation agent built on TrueForge.&lt;/strong&gt; Falcon reads a pull request, works out the new attack surface the change introduced, boots the app in an isolated sandbox, runs a real exploit against only that surface, and returns a request, a response, and a verdict — a proven fact, not a severity guess. A second model family independently audits the claim before it is sealed into a tamper-evident, hash-chained ledger. If the change is clean and a human approves, Falcon merges it; if it is exploitable, Falcon blocks the merge and posts the proof.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; 1/1 planted flaw caught, 0 false alarms across 1 healthy control, 3 runs each — all verdicts correct. Reproduce with &lt;code&gt;cd attesta-mcp &amp;amp;&amp;amp; npm run bench&lt;/code&gt; (it boots the real fixture, probes it, audits on a different model family, seals + verifies, and exits non-zero on any wrong verdict).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Built for the TrueForge Agent…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/mysticalseeker24/falcon-harness" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Every security scanner I've ever used tells me the same unsatisfying thing: &lt;em&gt;"this might be a&lt;br&gt;
problem, severity: medium."&lt;/em&gt; Might. AI coding agents have made that worse — they ship new endpoints&lt;br&gt;
fast, and every so often one forgets an auth check, and the scanner shrugs and assigns it a number.&lt;/p&gt;

&lt;p&gt;So for this hackathon I built the opposite of a scanner. It's called &lt;strong&gt;Falcon&lt;/strong&gt;, and it doesn't guess.&lt;br&gt;
It reads a pull request, works out the &lt;em&gt;new&lt;/em&gt; attack surface the change introduced, boots the app in an&lt;br&gt;
isolated sandbox, and runs a &lt;strong&gt;real exploit&lt;/strong&gt; against just that surface. It comes back with three&lt;br&gt;
things: a request, a response, and a verdict. Not a severity score — a captured fact.&lt;/p&gt;

&lt;p&gt;Here's what that looks like on our deliberately-vulnerable fixture. A PR adds &lt;code&gt;GET /admin/balances&lt;/code&gt;&lt;br&gt;
and forgets the auth middleware. Falcon sends an unauthenticated request and gets back &lt;code&gt;200 OK&lt;/code&gt; with&lt;br&gt;
every tenant's account balances. Verdict: &lt;strong&gt;EXPLOITED&lt;/strong&gt; — and it blocks the merge, with the exact&lt;br&gt;
request and response attached as proof. Change one line so the route is guarded, and the same probe&lt;br&gt;
gets &lt;code&gt;401&lt;/code&gt;, then &lt;code&gt;403&lt;/code&gt;, then &lt;code&gt;200&lt;/code&gt; for the admin — verdict &lt;strong&gt;CLEAN&lt;/strong&gt;, and now Falcon &lt;em&gt;proposes&lt;/em&gt; the&lt;br&gt;
merge and stops for a human to approve it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one rule that shaped everything
&lt;/h2&gt;

&lt;p&gt;The hackathon's whole premise is a harness — &lt;strong&gt;TrueForge&lt;/strong&gt; — that runs the agent loop, dispatches&lt;br&gt;
tools, provisions the sandbox, and pauses for human approval. The central judging criterion is&lt;br&gt;
whether the harness is &lt;em&gt;actually doing the work&lt;/em&gt;, not being wrapped by a thin app.&lt;/p&gt;

&lt;p&gt;That turned into the single most useful design constraint I've had in a while: &lt;strong&gt;do not build the&lt;br&gt;
loop.&lt;/strong&gt; Every time I caught myself reaching for an orchestrator, a retry state machine, a step&lt;br&gt;
sequencer — stop, that's TrueForge's job. What was left for me to author was surprisingly small and&lt;br&gt;
surprisingly clean:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an &lt;strong&gt;MCP server&lt;/strong&gt; (three tools: scope the diff, seal the evidence, verify the ledger),&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;SKILL&lt;/strong&gt; file — the playbook the agent follows,&lt;/li&gt;
&lt;li&gt;the &lt;strong&gt;vulnbank&lt;/strong&gt; target fixture,&lt;/li&gt;
&lt;li&gt;and a &lt;strong&gt;dashboard&lt;/strong&gt; to render the proof.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;TrueForge does the rest. Resisting the urge to build more made the architecture better, not worse.&lt;br&gt;
That's the lesson I'll carry out of this: when you're on a good harness, subtraction is design.&lt;/p&gt;

&lt;h2&gt;
  
  
  The war stories
&lt;/h2&gt;

&lt;p&gt;The interesting part of any build is where it fights back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The harness crashed on my machine before it did anything.&lt;/strong&gt; TrueForge threw an ESM path error on&lt;br&gt;
native Windows on the very first run. An hour of confusion later: it doesn't like &lt;code&gt;C:\&lt;/code&gt;-style paths. I&lt;br&gt;
moved the whole thing into WSL2 and it came to life. (I wrote up the bug as an upstream issue — paying&lt;br&gt;
it forward.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One wrong path broke the entire sandbox.&lt;/strong&gt; Importing the skill with a slightly-off path didn't just&lt;br&gt;
fail the skill — it made &lt;em&gt;every&lt;/em&gt; command in the sandbox error out. The failure was total and the&lt;br&gt;
message was cryptic. Fix: the skill path is the &lt;em&gt;directory&lt;/em&gt;, not the file. Small gotcha, huge blast&lt;br&gt;
radius. It's now the first thing my setup doc warns about.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The auditor could rubber-stamp itself.&lt;/strong&gt; Falcon audits every finding with a &lt;em&gt;second&lt;/em&gt; model from a&lt;br&gt;
different family before anyone sees it. My first version had the main agent pass an &lt;code&gt;auditor_ok:&lt;br&gt;
true&lt;/code&gt; flag — which, of course, the main agent could just... always set. A reviewer caught it. The fix&lt;br&gt;
was to move the audit &lt;em&gt;inside&lt;/em&gt; the sealing step, on the server, where the caller can't forge the&lt;br&gt;
result, and to enforce that the auditor is genuinely a different model family (I compare provider&lt;br&gt;
prefixes at run time). "The writer is never its own verifier" became a load-bearing principle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A model that judges beautifully but won't write a line of code.&lt;/strong&gt; I used a cheap GLM model as the&lt;br&gt;
auditor and it was great at &lt;em&gt;judging&lt;/em&gt; evidence. Then I asked it to &lt;em&gt;generate&lt;/em&gt; a fix snippet and it&lt;br&gt;
returned… empty content. Every time. Turns out it clams up on "reply as strict JSON" code prompts.&lt;br&gt;
Rather than fight it, I pointed the code-suggestion tool at a different model that writes cleanly, and&lt;br&gt;
made the parser tolerant. Different jobs, different models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The reviewer caught the bug my fix missed.&lt;/strong&gt; This one I'm oddly proud of. Qodo reviewed my deploy&lt;br&gt;
PR and flagged that seeding the ledger wasn't transactional. I fixed it. Qodo re-reviewed and&lt;br&gt;
&lt;strong&gt;re-flagged it&lt;/strong&gt;: my fix still wrote the ledger file &lt;em&gt;before&lt;/em&gt; copying the evidence artifacts it&lt;br&gt;
pointed at — so a crash mid-copy would leave a chain that looks initialized but is actually broken,&lt;br&gt;
and every later boot would accept it. The real fix: copy artifacts first, commit the ledger marker&lt;br&gt;
last with an atomic rename, and add a recovery path. That's a review loop earning its keep.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measured, not asserted
&lt;/h2&gt;

&lt;p&gt;Somewhere in the middle I wrote "N flaws caught, 0 false alarms" in the README as a placeholder — and&lt;br&gt;
then made myself a rule: no number ships unless something runnable produces it. So &lt;code&gt;bench&lt;/code&gt; boots the&lt;br&gt;
real fixture, runs the real pipeline three times per branch, derives each verdict from actual HTTP&lt;br&gt;
responses, and &lt;strong&gt;exits non-zero if any verdict is wrong.&lt;/strong&gt; The headline in the README is whatever that&lt;br&gt;
last run printed. A failing &lt;code&gt;bench&lt;/code&gt; is a build breakage. If you claim a number, back it with a&lt;br&gt;
command.&lt;/p&gt;

&lt;h2&gt;
  
  
  Did it actually work?
&lt;/h2&gt;

&lt;p&gt;Yes — end to end, live. Pointed at the real PRs, Falcon provisioned a Daytona sandbox, cloned the&lt;br&gt;
exact commit, installed Node, booted the app, and: on the vulnerable PR, captured the unauthenticated&lt;br&gt;
&lt;code&gt;200&lt;/code&gt; + cross-tenant balances → &lt;strong&gt;EXPLOITED&lt;/strong&gt;, sealed to a hash-chained ledger. On the safe PR,&lt;br&gt;
&lt;code&gt;401/403/200&lt;/code&gt; → &lt;strong&gt;CLEAN&lt;/strong&gt;, proposed the merge, and &lt;strong&gt;paused for my approval&lt;/strong&gt;. The ledger re-verifies&lt;br&gt;
by re-reading the bytes; tamper with a row and verification catches it instantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell the next builder
&lt;/h2&gt;

&lt;p&gt;Three things. &lt;strong&gt;Let the harness do the work&lt;/strong&gt; — the best code I wrote this week is the code I &lt;em&gt;didn't&lt;/em&gt;&lt;br&gt;
write. &lt;strong&gt;Make your claims provable&lt;/strong&gt; — a captured exploit beats a severity score, and a runnable&lt;br&gt;
benchmark beats a sentence. And &lt;strong&gt;keep your critic independent&lt;/strong&gt; — if the thing that checks the work&lt;br&gt;
is the same thing that did the work, you don't have a check.&lt;/p&gt;

&lt;p&gt;Falcon is diff-scoped exploitation, built on TrueForge, reviewed at every step by Qodo. Proof, not&lt;br&gt;
guesses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mysticalseeker24/falcon-harness" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with an AI coding assistant under my direction and review — fittingly, since Falcon exists&lt;br&gt;
because AI writes clean-looking code that can be measurably riskier than it reads.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fal939vmboz4etq3dolx6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fal939vmboz4etq3dolx6.png" alt=" " width="799" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>trueforgeharness</category>
      <category>claude</category>
      <category>github</category>
    </item>
  </channel>
</rss>
