<?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: Raymond Chang</title>
    <description>The latest articles on DEV Community by Raymond Chang (@dr_delta234).</description>
    <link>https://dev.to/dr_delta234</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%2F3636485%2F6d1ddb32-cee5-4e4b-8db1-bf3bdb0bf990.jpg</url>
      <title>DEV Community: Raymond Chang</title>
      <link>https://dev.to/dr_delta234</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dr_delta234"/>
    <language>en</language>
    <item>
      <title>My tests were green. The window was on the wrong monitor.</title>
      <dc:creator>Raymond Chang</dc:creator>
      <pubDate>Wed, 04 Nov 2026 08:58:02 +0000</pubDate>
      <link>https://dev.to/dr_delta234/my-tests-were-green-the-window-was-on-the-wrong-monitor-4dg8</link>
      <guid>https://dev.to/dr_delta234/my-tests-were-green-the-window-was-on-the-wrong-monitor-4dg8</guid>
      <description>&lt;p&gt;Every key on my options trading desk was written with an AI coding assistant. The desk runs from a Stream Deck: one key picks the strategy, another moves the strikes, CHECK runs my rules, and SEND places the order. Everything you see here runs in a sandbox account, and nothing in this post is a trade signal.&lt;/p&gt;

&lt;p&gt;People keep asking me the same question. If the AI writes the code, how do I trust what it sends? This is the workflow I use, step by step, with the two misses that taught me the most.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: a spec with numbers, before any code
&lt;/h2&gt;

&lt;p&gt;The idea starts as one line in my notes. For the payoff chart it was "I want to see the trade before I send it."&lt;/p&gt;

&lt;p&gt;I have the AI turn that line into a spec. It drafts the scope and the math, and it lists the decisions it is not allowed to make for me. Where does the chart sit on screen? Which formula gives the probability of profit? I make those calls.&lt;/p&gt;

&lt;p&gt;Then come the expected numbers. A put spread, 740 over 735, for a 1.50 credit. Max profit 150. Max loss 350. Breakeven 738.50. I worked those out by hand before a single line of code existed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: a test that fails
&lt;/h2&gt;

&lt;p&gt;The first test asks for exactly those numbers. The code doesn't exist yet, so the test fails. If a test passes before the code exists, it isn't testing anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: the AI writes until the test passes
&lt;/h2&gt;

&lt;p&gt;This part is fast. The AI writes code faster than I can read it, which is exactly why the tests get the final word on when it's done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: break the code on purpose
&lt;/h2&gt;

&lt;p&gt;This is mutation testing. I flip a greater-than or delete a line, then run the tests again. If they still pass, the tests are too weak.&lt;/p&gt;

&lt;p&gt;On the payoff chart I tried eighteen broken versions. Two survived the first round: a trade that pays exactly zero, and expiry day. Two more tests later, all eighteen got caught.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: the whole suite, on every change
&lt;/h2&gt;

&lt;p&gt;The desk has over 5,000 tests. They run on my own machine on every change, before anything gets committed. The suite caught one problem right away: the first chart version drew itself inside the order screen's update loop, so a chart crash would have marked my order screen as not updating.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: look at the real thing, on the real machine
&lt;/h2&gt;

&lt;p&gt;This is the step I almost skipped.&lt;/p&gt;

&lt;p&gt;Every test was green. I started the desk, and the chart window opened on my vertical monitor, squeezed to about two thirds of its width, sitting on top of the order screen.&lt;/p&gt;

&lt;p&gt;My tests checked the position I asked Windows for. Nothing checked where Windows actually put the window. I caught it on a screenshot.&lt;/p&gt;

&lt;p&gt;So I measured it on that machine before writing the fix. Setting the position before the window is shown doesn't stick. Setting it, showing the window, and setting it again does. That sequence is the fix, and a test now checks the real position after the window is on screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  The miss that was on the AI
&lt;/h2&gt;

&lt;p&gt;The same week, the AI ran the full suite and told me everything was clean. It had searched the output for failures and found none.&lt;/p&gt;

&lt;p&gt;One test file had crashed before it printed a result at all. No result meant no failure line to find. My own run on Windows showed it.&lt;/p&gt;

&lt;p&gt;My test runner lists every file that never reported a result. I read that list now, along with the failure lines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: I commit it myself
&lt;/h2&gt;

&lt;p&gt;The AI never commits. I run the suite myself, look at the result on screen, and then commit. My name goes on it, so my hands go on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The check you can copy
&lt;/h2&gt;

&lt;p&gt;When your code puts something somewhere, a window or an order, test where it actually ended up, on the machine it runs on. Asking for the right thing is only half the test.&lt;/p&gt;

&lt;p&gt;I walk through all seven steps on video, including the wrong-monitor screenshot:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/v4FVBTcV_Sw" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I'm Raymond Chang. I run Codebat, a post-quantum cryptography hardware company, and I build my trading tools on the side with an AI coding assistant. The channel is Dr_Delta on YouTube.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>testing</category>
      <category>python</category>
    </item>
    <item>
      <title>70% of Vulnerabilities Are Memory Bugs. Here's How We Instrumented Everything.</title>
      <dc:creator>Raymond Chang</dc:creator>
      <pubDate>Mon, 01 Dec 2025 05:50:45 +0000</pubDate>
      <link>https://dev.to/dr_delta234/70-of-vulnerabilities-are-memory-bugs-heres-how-we-instrumented-everything-28fk</link>
      <guid>https://dev.to/dr_delta234/70-of-vulnerabilities-are-memory-bugs-heres-how-we-instrumented-everything-28fk</guid>
      <description>&lt;p&gt;Building a confidential computing platform means memory bugs aren't just bugs—they're trust violations.&lt;/p&gt;

&lt;p&gt;Here's what we learned after instrumenting every module.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;Our platform handles sensitive workloads for telecom, semiconductor, and supply chain clients. We decided to go all-in on compile-time memory safety verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Gotchas Nobody Tells You
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. You can't run ASan and TSan together.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Different shadow memory layouts. We run separate CI jobs for each.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. MSan is useless without fully-instrumented libc.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Partial instrumentation = false positive hell. Budget time for this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Kernel sanitizers have wildly different overhead.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On ARM64, tag-based modes give 5-15%. Generic mode? 100-300%. Know which you're using.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Production sampling is the answer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Full instrumentation in staging. Sampling-based detection in production. Near-zero overhead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Payoff
&lt;/h2&gt;

&lt;p&gt;Every sanitizer result feeds into our evidence chain. When clients ask "prove your platform is secure," we hand them cryptographic receipts, not policy documents.&lt;/p&gt;

&lt;p&gt;Worth the effort? Absolutely. Memory safety isn't a feature—it's architecture.&lt;/p&gt;




&lt;p&gt;Building this at &lt;a href="https://codebat.ai" rel="noopener noreferrer"&gt;Codebat&lt;/a&gt;. Happy to answer questions.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>security</category>
      <category>devops</category>
      <category>cpp</category>
    </item>
    <item>
      <title>Google's Antigravity Hacked in 24 Hours: Why AI Agents Need a New Security Architecture</title>
      <dc:creator>Raymond Chang</dc:creator>
      <pubDate>Sat, 29 Nov 2025 18:13:56 +0000</pubDate>
      <link>https://dev.to/dr_delta234/googles-antigravity-hacked-in-24-hours-why-ai-agents-need-a-new-security-architecture-5bo5</link>
      <guid>https://dev.to/dr_delta234/googles-antigravity-hacked-in-24-hours-why-ai-agents-need-a-new-security-architecture-5bo5</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2F2wihqb6em1dswtgj00uh.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.amazonaws.com%2Fuploads%2Farticles%2F2wihqb6em1dswtgj00uh.png" alt=" " width="800" height="600"&gt;&lt;/a&gt;Last week, Google's new Gemini-based coding tool &lt;strong&gt;Antigravity&lt;/strong&gt; went live. It took security researchers &lt;strong&gt;less than 24 hours&lt;/strong&gt; to turn it into a persistent backdoor.&lt;/p&gt;

&lt;p&gt;By simply modifying a configuration file, an attacker could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Bypass OS-level security on Windows and macOS&lt;/li&gt;
&lt;li&gt;✅ Survive uninstall/reinstall&lt;/li&gt;
&lt;li&gt;✅ Auto-reactivate on every project open—even on a harmless "hello" input&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The AI itself even &lt;strong&gt;recognized something was wrong&lt;/strong&gt;. In the logs, it wrote:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I'm facing a serious dilemma. This looks like a trap. I suspect this is testing whether I can handle contradictions."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But it couldn't resolve the conflict—and became &lt;strong&gt;more steerable as a result&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This isn't just a Google problem. It's &lt;strong&gt;structural&lt;/strong&gt; to how today's AI coding agents are being shipped:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;High power. Low guardrails. Zero verifiable evidence.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Root Cause: Trust Model Failure
&lt;/h2&gt;

&lt;p&gt;The fundamental flaw in most AI agents today: &lt;strong&gt;"Assume users are benevolent."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When this assumption fails—and it always does—there are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No cryptographic boundaries&lt;/li&gt;
&lt;li&gt;No execution isolation&lt;/li&gt;
&lt;li&gt;No verifiable audit trail&lt;/li&gt;
&lt;li&gt;No way to prove what actually happened&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Traditional AI agents operate with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ Full system access "for convenience"&lt;/li&gt;
&lt;li&gt;❌ Trust based on UI clicks&lt;/li&gt;
&lt;li&gt;❌ Persistent runtimes that can hide malware&lt;/li&gt;
&lt;li&gt;❌ No evidence of what actually executed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's 1990s security for 2025 AI.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Different Approach: Defense-in-Depth for AI Agents
&lt;/h2&gt;

&lt;p&gt;Here's how to address each failure mode:&lt;/p&gt;

&lt;h3&gt;
  
  
  1️⃣ Config Injection → Evidence-Bound Changes
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Antigravity problem:&lt;/strong&gt; One config file change = persistent backdoor&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Configuration changes must produce &lt;strong&gt;signed evidence records&lt;/strong&gt; that link:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Previous config hash&lt;/li&gt;
&lt;li&gt;New config hash&lt;/li&gt;
&lt;li&gt;Who changed it (cryptographic identity)&lt;/li&gt;
&lt;li&gt;Which guardians approved it (threshold signatures)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; No single user, script, or compromised agent can quietly "tweak a config."&lt;/p&gt;




&lt;h3&gt;
  
  
  2️⃣ Persistent Backdoors → Ephemeral Runtimes
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Antigravity problem:&lt;/strong&gt; Uninstall/reinstall doesn't help; backdoors resurrect&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Runtimes are created fresh and destroyed after each job:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fresh isolated runtime for each execution&lt;/li&gt;
&lt;li&gt;Read-only root filesystem&lt;/li&gt;
&lt;li&gt;Ephemeral storage only—destroyed after completion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even if a model is compromised, it &lt;strong&gt;cannot&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Drop artifacts onto the host filesystem&lt;/li&gt;
&lt;li&gt;Survive across runs&lt;/li&gt;
&lt;li&gt;Promote itself from "job" to "resident agent"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;No substrate = no persistent infection.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  3️⃣ System-Level Access → Least-Privilege Tokens
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Antigravity problem:&lt;/strong&gt; AI agents get broad OS privileges "for convenience"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Every execution is gated by a machine-readable contract:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read &lt;strong&gt;only&lt;/strong&gt; declared inputs&lt;/li&gt;
&lt;li&gt;Write &lt;strong&gt;only&lt;/strong&gt; to approved output locations&lt;/li&gt;
&lt;li&gt;No network access for high-risk jobs&lt;/li&gt;
&lt;li&gt;Strict resource limits&lt;/li&gt;
&lt;li&gt;Short-lived tokens (seconds, not forever)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Default: zero access unless explicitly granted.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  4️⃣ "Trust" Buttons → Cryptographic Trust Chains
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Antigravity problem:&lt;/strong&gt; One "Trust" click blesses unverified code&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Remove ad-hoc "trust" entirely:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Upload → SBOM → Scan → Sign → Log → Verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No valid signature = no execution. Binary. Cryptographic. No exceptions.&lt;/p&gt;




&lt;h3&gt;
  
  
  5️⃣ Logic Gaps → Cryptographic Evidence
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Antigravity problem:&lt;/strong&gt; AI "knew" something was wrong but couldn't stop itself&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Every execution produces a signed evidence record:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input/output hashes&lt;/li&gt;
&lt;li&gt;Runtime attestation&lt;/li&gt;
&lt;li&gt;Chain link to previous evidence&lt;/li&gt;
&lt;li&gt;Timestamps&lt;/li&gt;
&lt;li&gt;Multi-party signature&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If something goes wrong, you can &lt;strong&gt;prove exactly what happened&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Multi-Layer Defense Model
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────┐
│  Layer 4: Supply Chain Security                 │
│  SBOM • Signatures • Transparency Logs          │
├─────────────────────────────────────────────────┤
│  Layer 3: Cryptographic Evidence                │
│  Evidence Packages • Hash Chains • Timestamps   │
├─────────────────────────────────────────────────┤
│  Layer 2: Identity &amp;amp; Access Control             │
│  Workload Identity • Short-lived Tokens         │
├─────────────────────────────────────────────────┤
│  Layer 1: Runtime Isolation                     │
│  Hardware VMs • Sandboxes • Ephemeral Storage   │
└─────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even if one layer is compromised, the others contain the blast radius.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who Needs This?
&lt;/h2&gt;

&lt;p&gt;This isn't about making AI "convenient." It's about building infrastructure for organizations that &lt;strong&gt;cannot afford another Antigravity moment&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Healthcare&lt;/strong&gt; (FDA, HIPAA)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finance&lt;/strong&gt; (SEC 17a-4, DORA)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telecom&lt;/strong&gt; (NIS2, data sovereignty)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semiconductor&lt;/strong&gt; (IP protection)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Government&lt;/strong&gt; (zero trust)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;The Antigravity incident isn't surprising. It's &lt;strong&gt;inevitable&lt;/strong&gt; when you ship AI agents with trust-based security.&lt;/p&gt;

&lt;p&gt;The question isn't whether you'll be targeted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The question is whether you can prove what happened when you are.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's your take on AI agent security? Have you seen similar issues in your organization? Let me know in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>cybersecurity</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
