<?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>Forem: Raymond Chang</title>
    <description>The latest articles on Forem by Raymond Chang (@hofong428).</description>
    <link>https://forem.com/hofong428</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3636485%2F5768bc34-b46d-4609-81ad-1e84e0b7c5b8.jpeg</url>
      <title>Forem: Raymond Chang</title>
      <link>https://forem.com/hofong428</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/hofong428"/>
    <language>en</language>
    <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://forem.com/hofong428/70-of-vulnerabilities-are-memory-bugs-heres-how-we-instrumented-everything-28fk</link>
      <guid>https://forem.com/hofong428/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://forem.com/hofong428/googles-antigravity-hacked-in-24-hours-why-ai-agents-need-a-new-security-architecture-5bo5</link>
      <guid>https://forem.com/hofong428/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="599"&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>
