<?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: Andres</title>
    <description>The latest articles on DEV Community by Andres (@hyusband).</description>
    <link>https://dev.to/hyusband</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%2F4279316%2Fdce2e596-a9e9-4462-95da-ba6d17ce85bb.jpg</url>
      <title>DEV Community: Andres</title>
      <link>https://dev.to/hyusband</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hyusband"/>
    <language>en</language>
    <item>
      <title>The demo that attacks itself: four bugs CI caught before anyone else could</title>
      <dc:creator>Andres</dc:creator>
      <pubDate>Wed, 02 Dec 2026 22:16:04 +0000</pubDate>
      <link>https://dev.to/hyusband/the-demo-that-attacks-itself-four-bugs-ci-caught-before-anyone-else-could-2anl</link>
      <guid>https://dev.to/hyusband/the-demo-that-attacks-itself-four-bugs-ci-caught-before-anyone-else-could-2anl</guid>
      <description>&lt;p&gt;When you open-source a security product, the first thing a skeptic does is&lt;br&gt;
not read your README. It is running your demo. If the demo is broken, your&lt;br&gt;
launch is broken — and you will find out in the worst possible venue: the&lt;br&gt;
comments section, in public, in real time.&lt;/p&gt;

&lt;p&gt;Proxea ships with a docker-compose playground: the edge, the control plane,&lt;br&gt;
a deliberately attack-worthy target, and attack scripts — enumeration,&lt;br&gt;
credential stuffing, SQLi — so you can attack yourself and watch the defender&lt;br&gt;
work. There was one problem: none of my machines can run Docker, so the stack&lt;br&gt;
had never been executed end-to-end. Not once.&lt;/p&gt;

&lt;p&gt;The fix was obvious in hindsight: if I cannot run the demo, make CI run it.&lt;br&gt;
GitHub Actions gives you a Linux box with Docker for free. So I wrote a&lt;br&gt;
workflow that builds the whole stack, boots it, attacks it with the real&lt;br&gt;
attack scripts, and then asserts what the control plane actually recorded —&lt;br&gt;
events, scores, deny decisions, honeypot hits. It runs on every push.&lt;/p&gt;

&lt;p&gt;Then it started catching things. Four things, in four runs.&lt;/p&gt;

&lt;p&gt;Bug 1: the demo had never worked&lt;/p&gt;

&lt;p&gt;The very first run failed immediately: the target application crashed on&lt;br&gt;
boot. FastAPI needed python-multipart for its /login form endpoint, and&lt;br&gt;
the Dockerfile never installed it. Every single request to the upstream was&lt;br&gt;
a 502.&lt;/p&gt;

&lt;p&gt;That means the demo — the thing I was about to point the entire internet at —&lt;br&gt;
had never once worked for anyone. This is the most embarrassing class of bug&lt;br&gt;
there is, and it is also the most common one in launch week. CI caught it in&lt;br&gt;
the first ten minutes.&lt;/p&gt;

&lt;p&gt;Bug 2: the oracle the product exists to kill was still alive&lt;/p&gt;

&lt;p&gt;This one was worse, because it was not a crash — it was a design flaw in the&lt;br&gt;
core promise.&lt;/p&gt;

&lt;p&gt;Proxea's ghost mode makes every denial byte-identical to the 404 page of a&lt;br&gt;
stock nginx with no site configured. The point is to erase the oracle that&lt;br&gt;
scanners rely on: the difference between "this path does not exist" and&lt;br&gt;
"this path exists but you are not allowed". If those two cases produce&lt;br&gt;
distinguishable responses, the attacker can map your application while you&lt;br&gt;
think they are blind.&lt;/p&gt;

&lt;p&gt;The smoke test probes both a honeypot path (denied by the edge) and a random&lt;br&gt;
nonexistent path (passed through to the backend, which 404s). It compares the&lt;br&gt;
two bodies byte for byte. They did not match: the edge's denial was the nginx&lt;br&gt;
page, but the backend's own 404 was FastAPI's JSON — which also fingerprints&lt;br&gt;
the framework you are running, a bonus leak.&lt;/p&gt;

&lt;p&gt;The fix became ghost_pass_upstream_404: by default, upstream 404s are&lt;br&gt;
rewritten to the identical nginx page; set it to true if your API contract&lt;br&gt;
legitimately depends on JSON 404 bodies. It shipped in v1.8.1, and the smoke&lt;br&gt;
test now verifies byte-identity in a real deployment on every push.&lt;/p&gt;

&lt;p&gt;Bug 3: the README was lying&lt;/p&gt;

&lt;p&gt;The demo README said: each docker compose run spawns a fresh container with&lt;br&gt;
a fresh IP, so you can attack again after being banned. CI proved this false.&lt;br&gt;
Docker's IPAM reuses the just-released address, so the second attack run&lt;br&gt;
inherited the exact IP that the first run had just gotten banned at layer 4.&lt;br&gt;
Every probe blackholed — connection timeouts with no answer at all.&lt;/p&gt;

&lt;p&gt;Which is, of course, exactly what being banned is supposed to feel like. The&lt;br&gt;
fix was honest documentation: the blackhole is the point, and if you want to&lt;br&gt;
attack again immediately, recreate the edge — a fresh network namespace means&lt;br&gt;
fresh firewall state, which is also how CI resets between scenarios now.&lt;/p&gt;

&lt;p&gt;Bug 4: the tarpit worked too well&lt;/p&gt;

&lt;p&gt;My favorite. Once the credential-stuffing scenario finally ran against a&lt;br&gt;
fresh defender, the logs told the exact story the demo was designed to tell:&lt;/p&gt;

&lt;p&gt;[01..05] status=401        the real target rejecting passwords&lt;br&gt;
[06..08] status=404 nginx  scored out — the login "stopped existing"&lt;br&gt;
[09+]    the tarpit holds  — and then the attack script crashed&lt;/p&gt;

&lt;p&gt;The script crashed because the tarpit was working. The edge accepts the&lt;br&gt;
connection and drip-feeds the response body so slowly that the client burns&lt;br&gt;
its timeout mid-read. The attack script's error handling did not expect a&lt;br&gt;
response that starts and never finishes — an exception inside the exception&lt;br&gt;
handler, the one place nothing catches it. The fix was three lines, but the&lt;br&gt;
crash itself was the best evidence the tarpit is real: it was eating the&lt;br&gt;
attacker's time so effectively that it broke the measurement.&lt;/p&gt;

&lt;p&gt;The math&lt;/p&gt;

&lt;p&gt;Four bugs, each of them fatal to credibility in a different way: a demo that&lt;br&gt;
never booted, a design flaw in the core promise, a lie in the documentation,&lt;br&gt;
and a crash in the attack tooling. Total cost: some hours of CI iteration,&lt;br&gt;
in private, before anyone was watching.&lt;/p&gt;

&lt;p&gt;The cost of discovering any one of them on launch day, in public, is not&lt;br&gt;
measured in hours.&lt;/p&gt;

&lt;p&gt;And the workflow does not stop existing now that launch is over. It runs on&lt;br&gt;
every push, permanently. The demo cannot silently rot — the moment a commit&lt;br&gt;
breaks the boot, the convergence, the scoring, the bans, or the control&lt;br&gt;
plane's sight, CI goes red. For a security product, I cannot think of a&lt;br&gt;
better sentence to be able to write than that one.&lt;/p&gt;

&lt;p&gt;The workflow is &lt;a href="https://github.com/proxea/proxea/blob/main/.github/workflows/demo-smoke.yml" rel="noopener noreferrer"&gt;.github/workflows/demo-smoke.yml&lt;/a&gt;&lt;br&gt;
and the assertions live in &lt;a href="https://github.com/proxea/proxea/blob/main/demo/ci_smoke.py" rel="noopener noreferrer"&gt;demo/ci_smoke.py&lt;/a&gt;.&lt;br&gt;
Both are boring to read, which is exactly the point.&lt;/p&gt;

</description>
      <category>security</category>
      <category>devops</category>
      <category>opensource</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
