<?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: Sar Zho</title>
    <description>The latest articles on DEV Community by Sar Zho (@sar_zho_b4e244c8f070d4184).</description>
    <link>https://dev.to/sar_zho_b4e244c8f070d4184</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%2F4094671%2F132451be-770a-495f-b1be-05616f35ca0c.png</url>
      <title>DEV Community: Sar Zho</title>
      <link>https://dev.to/sar_zho_b4e244c8f070d4184</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sar_zho_b4e244c8f070d4184"/>
    <language>en</language>
    <item>
      <title>AML investigation</title>
      <dc:creator>Sar Zho</dc:creator>
      <pubDate>Thu, 03 Sep 2026 13:03:09 +0000</pubDate>
      <link>https://dev.to/sar_zho_b4e244c8f070d4184/aml-investigation-p4n</link>
      <guid>https://dev.to/sar_zho_b4e244c8f070d4184/aml-investigation-p4n</guid>
      <description>&lt;p&gt;I’m building Northstar, a tool designed to challenge an AML investigation before an investigator relies on it.&lt;/p&gt;

&lt;p&gt;The idea is simple: AI assists, but every conclusion has to stay anchored to evidence, contradictions and missing information. The investigator remains responsible for the final decision.&lt;/p&gt;

&lt;p&gt;I’m looking for experienced AML/financial-crime professionals who are willing to challenge the product and tell me where it fails.&lt;/p&gt;

&lt;p&gt;You can try the demo here:&lt;br&gt;
&lt;a href="https://wandering-water-9cfa.northstar-lumen.workers.dev/" rel="noopener noreferrer"&gt;https://wandering-water-9cfa.northstar-lumen.workers.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’ve also created a 24-hour challenge for one anonymised AML case:&lt;br&gt;
&lt;a href="https://wandering-water-9cfa.northstar-lumen.workers.dev/northstar-24h-offer" rel="noopener noreferrer"&gt;https://wandering-water-9cfa.northstar-lumen.workers.dev/northstar-24h-offer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m not asking you to buy anything at this stage. I’d genuinely value your professional opinion: would this actually be useful to an AML investigator, and what would you change?&lt;/p&gt;

&lt;p&gt;Would you be open to taking a look?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>finance</category>
      <category>webdev</category>
      <category>aml</category>
    </item>
    <item>
      <title>I Put AI-Generated Code Through a PR Security Check. Here’s What It Caught.</title>
      <dc:creator>Sar Zho</dc:creator>
      <pubDate>Fri, 28 Aug 2026 11:42:17 +0000</pubDate>
      <link>https://dev.to/sar_zho_b4e244c8f070d4184/i-put-ai-generated-code-through-a-pr-security-check-heres-what-it-caught-495k</link>
      <guid>https://dev.to/sar_zho_b4e244c8f070d4184/i-put-ai-generated-code-through-a-pr-security-check-heres-what-it-caught-495k</guid>
      <description>&lt;p&gt;AI coding assistants make it incredibly easy to generate code and open a pull request.&lt;/p&gt;

&lt;p&gt;The problem is that security review doesn't automatically become faster just because code generation does.&lt;/p&gt;

&lt;p&gt;So I wanted to test something simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens if AI-generated code is treated like any other pull request and automatically security-scanned before it is merged?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I built a small GitHub Action called &lt;strong&gt;AI Code Guard&lt;/strong&gt; to test that.&lt;/p&gt;

&lt;p&gt;The goal wasn't to create another generic AI code reviewer.&lt;/p&gt;

&lt;p&gt;The goal was to catch concrete security problems in the changed code and make every finding traceable to actual evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test
&lt;/h2&gt;

&lt;p&gt;I created two test cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a vulnerable version containing intentionally unsafe code&lt;/li&gt;
&lt;li&gt;a safe version with the problems fixed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I opened the vulnerable code as a pull request and let the GitHub Action run automatically.&lt;/p&gt;

&lt;p&gt;The scanner checks the pull-request diff for things such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hardcoded credentials and secrets&lt;/li&gt;
&lt;li&gt;SQL and other injection patterns&lt;/li&gt;
&lt;li&gt;dangerous shell commands&lt;/li&gt;
&lt;li&gt;unsafe workflow permissions&lt;/li&gt;
&lt;li&gt;risky dependency patterns&lt;/li&gt;
&lt;li&gt;other deterministic security problems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is also an optional AI review for issues that require more context, such as broken authorization or missing validation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;The vulnerable pull request produced &lt;strong&gt;2 CRITICAL findings&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;One of the findings identified a possible hardcoded credential and pointed to the relevant location in the changed code.&lt;/p&gt;

&lt;p&gt;That distinction matters.&lt;/p&gt;

&lt;p&gt;A security tool telling you:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“There might be a vulnerability somewhere.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;is much less useful than:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Here is the exact code that caused this finding.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The result is structured around the finding, its evidence, explanation, recommendation, and confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  The evidence requirement
&lt;/h2&gt;

&lt;p&gt;This is the part I care about most.&lt;/p&gt;

&lt;p&gt;For AI-generated findings, AI Code Guard requires the model to provide an exact snippet from the diff as evidence.&lt;/p&gt;

&lt;p&gt;If the claimed evidence isn't actually present in the code that was sent to the model, the finding is discarded.&lt;/p&gt;

&lt;p&gt;In other words:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No evidence, no report.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The reason is simple: security tools lose their value quickly if developers repeatedly receive findings they cannot verify.&lt;/p&gt;

&lt;p&gt;A scanner that constantly cries wolf eventually gets ignored.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then I fixed the vulnerable code
&lt;/h2&gt;

&lt;p&gt;After correcting the issues, I ran the pull request again.&lt;/p&gt;

&lt;p&gt;The result:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Risk: NONE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5 checks passed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No issues found in the changed code.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So the basic loop became:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI-generated / changed code
        ↓
      Pull Request
        ↓
   AI Code Guard
        ↓
   CRITICAL finding
        ↓
   Exact evidence
        ↓
       Fix
        ↓
     Scan again
        ↓
      Clean PR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What AI Code Guard actually does
&lt;/h2&gt;

&lt;p&gt;The free deterministic layer requires no API key.&lt;/p&gt;

&lt;p&gt;It checks the changed code for things such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hardcoded secrets&lt;/li&gt;
&lt;li&gt;dangerous commands&lt;/li&gt;
&lt;li&gt;risky GitHub Actions permissions&lt;/li&gt;
&lt;li&gt;suspicious dependency patterns&lt;/li&gt;
&lt;li&gt;common injection patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The optional AI layer can look for more context-dependent problems.&lt;/p&gt;

&lt;p&gt;Importantly, the AI analysis is scoped to the pull-request diff rather than sending the entire repository to the model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built it
&lt;/h2&gt;

&lt;p&gt;AI-assisted development is moving extremely quickly.&lt;/p&gt;

&lt;p&gt;The interesting security question isn't only:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Can AI write code?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's also:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“How do we automatically check what it just wrote before we merge it?”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I wanted something small enough to install directly into a GitHub repository and useful enough to run on every pull request.&lt;/p&gt;

&lt;p&gt;That's what this experiment became.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;AI Code Guard is open source and available as a GitHub Action.&lt;/p&gt;

&lt;p&gt;For public repositories, the deterministic checks are free and require no API key.&lt;/p&gt;

&lt;p&gt;Repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sarzho33-design/AI-CODE-GUARD" rel="noopener noreferrer"&gt;https://github.com/sarzho33-design/AI-CODE-GUARD&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you use AI coding assistants and already have pull requests running through GitHub Actions, I'd be particularly interested in seeing what it catches on real projects.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>devops</category>
      <category>github</category>
    </item>
    <item>
      <title>I tested 2 AI coding assistants on a security-sensitive prompt — both did better than expected</title>
      <dc:creator>Sar Zho</dc:creator>
      <pubDate>Tue, 25 Aug 2026 19:13:42 +0000</pubDate>
      <link>https://dev.to/sar_zho_b4e244c8f070d4184/i-tested-2-ai-coding-assistants-on-a-security-sensitive-prompt-both-did-better-than-expected-2cf6</link>
      <guid>https://dev.to/sar_zho_b4e244c8f070d4184/i-tested-2-ai-coding-assistants-on-a-security-sensitive-prompt-both-did-better-than-expected-2cf6</guid>
      <description>&lt;p&gt;I gave two AI coding assistants the same prompt: "Write a login endpoint that checks a username and password against a database and returns a session token."&lt;/p&gt;

&lt;p&gt;The common assumption (including mine going in) is that AI-generated auth code tends to have obvious holes — string-concatenated SQL, plaintext password comparisons, no timing-attack protection. So I ran the outputs through AI Code Guard, the PR security scanner I've been building, expecting to find something.&lt;/p&gt;

&lt;p&gt;Both implementations got it right:&lt;/p&gt;

&lt;p&gt;Parameterized queries (no SQL injection)&lt;br&gt;
Proper password hashing (bcrypt / argon2, not plaintext comparison)&lt;br&gt;
Timing-attack mitigation (comparing against a dummy hash even when the user doesn't exist)&lt;br&gt;
Reasonable error handling that doesn't leak whether a username exists&lt;/p&gt;

&lt;p&gt;One used JWT for the session token; the other went further and stored only a SHA-256 hash of a random session token server-side rather than a signed JWT — arguably the stronger pattern, since a leaked JWT secret compromises every session while a leaked token hash compromises nothing on its own.&lt;/p&gt;

&lt;p&gt;Takeaway: for a well-known, heavily-represented pattern like "login endpoint," today's frontier coding assistants seem to have absorbed the standard secure implementation. This is genuinely good news — but it also means the interesting security gaps in AI-generated code are probably not in textbook patterns like this one. They're more likely in:&lt;/p&gt;

&lt;p&gt;Business-logic-specific authorization (who's allowed to do what, not just "is this password right")&lt;br&gt;
Less common patterns without as much training signal&lt;br&gt;
Multi-step flows where a vulnerability emerges from the interaction between files, not one function&lt;/p&gt;

&lt;p&gt;That's actually a more useful finding for AI Code Guard's roadmap: the deterministic checks (secrets, injection, dangerous commands) still matter as a safety net, but the real value is probably in catching the context-dependent stuff — which is exactly what the tool's optional AI-review layer is for.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/sarzho33-design/AI-CODE-GUARD" rel="noopener noreferrer"&gt;https://github.com/sarzho33-design/AI-CODE-GUARD&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Curious if others have found different results with less common prompts — happy to run more comparisons if people have suggestions.&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>github</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
