<?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: Istiak Mahmud</title>
    <description>The latest articles on DEV Community by Istiak Mahmud (@noobbatman).</description>
    <link>https://dev.to/noobbatman</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%2F3992718%2F9cda0b98-925a-4914-bf6c-b90ba905628b.jpg</url>
      <title>DEV Community: Istiak Mahmud</title>
      <link>https://dev.to/noobbatman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/noobbatman"/>
    <language>en</language>
    <item>
      <title>I built an open-source AI that security-reviews every pull request — and maps each bug to PCI-DSS, SOC 2 &amp; GDPR</title>
      <dc:creator>Istiak Mahmud</dc:creator>
      <pubDate>Fri, 19 Jun 2026 14:20:46 +0000</pubDate>
      <link>https://dev.to/noobbatman/i-built-an-open-source-ai-that-security-reviews-every-pull-request-and-maps-each-bug-to-pci-dss-49ob</link>
      <guid>https://dev.to/noobbatman/i-built-an-open-source-ai-that-security-reviews-every-pull-request-and-maps-each-bug-to-pci-dss-49ob</guid>
      <description>&lt;p&gt;Code review is where most security bugs are &lt;em&gt;supposed&lt;/em&gt; to get caught. In practice it's slow, inconsistent, and depends entirely on who happens to be looking that day. So I built &lt;strong&gt;GuardianCI&lt;/strong&gt; — a CI check that reviews every pull request for security issues automatically, comments inline at the exact line, and blocks the merge on anything CRITICAL.&lt;/p&gt;

&lt;p&gt;It's open source (MIT), works on &lt;strong&gt;GitHub and GitLab&lt;/strong&gt;, and runs for &lt;strong&gt;free&lt;/strong&gt; on Google Gemini's tier — or your own OpenAI, Anthropic, Groq, or local Ollama endpoint.&lt;/p&gt;

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

&lt;p&gt;I planted vulnerabilities in a real project and opened a PR. Every one got caught, with an inline comment at the exact line:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Planted&lt;/th&gt;
&lt;th&gt;Caught&lt;/th&gt;
&lt;th&gt;Severity&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hardcoded DB URL + OpenAI key&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;CRITICAL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hardcoded JWT secret&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;CRITICAL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL injection (f-string)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;CRITICAL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Command injection (&lt;code&gt;shell=True&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;CRITICAL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JWT &lt;code&gt;alg=none&lt;/code&gt; bypass&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;CRITICAL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disabled TLS (&lt;code&gt;verify=False&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;WARN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wildcard CORS &lt;code&gt;["*"]&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;WARN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Debug logging of a password&lt;/td&gt;
&lt;td&gt;✅ → escalated to CRITICAL&lt;/td&gt;
&lt;td&gt;CRITICAL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The most interesting one: the password-logging issue was labelled WARN in my own rules, but the model &lt;strong&gt;escalated it to CRITICAL&lt;/strong&gt; — correctly arguing that logging a plaintext password is a data-exposure issue (PCI-DSS 3.4, SOC 2 CC7.2, GDPR Art. 32), not just a config smell. That's reasoning, not pattern-matching.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works — defense in depth
&lt;/h2&gt;

&lt;p&gt;GuardianCI doesn't trust the LLM alone. It runs three layers on each diff:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Local regex pre-scan&lt;/strong&gt; (free, no API call) — catches hardcoded secrets, &lt;code&gt;alg=none&lt;/code&gt;, SQL f-strings, &lt;code&gt;verify=False&lt;/code&gt;, sensitive logging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;gitleaks&lt;/strong&gt; — dedicated secret detection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM review&lt;/strong&gt; — the reasoning layer that catches what patterns can't (command injection, broken CORS, missing auth checks) and maps each finding to a &lt;strong&gt;PCI-DSS 4.0 / SOC 2 / GDPR&lt;/strong&gt; control.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Findings from all layers are deduped, validated against the changed lines (so the model can't invent issues outside the diff), and posted as inline review comments. CRITICAL findings block the merge; it can even open a &lt;strong&gt;draft fix PR&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It's built to be cheap and safe in CI: large diffs only send high-risk files to the LLM, already-reviewed commits are skipped, the diff is wrapped in delimiters to resist prompt injection, and any quota/parse error fails &lt;em&gt;open&lt;/em&gt; with an explanatory comment instead of breaking your pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it (about 5 minutes)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Copy the workflow + &lt;code&gt;scripts/&lt;/code&gt; + &lt;code&gt;requirements/&lt;/code&gt; into your repo.&lt;/li&gt;
&lt;li&gt;Add a &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; secret (free key from Google AI Studio).&lt;/li&gt;
&lt;li&gt;Open a PR.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Full setup, including OpenAI/Anthropic/GitLab config, is in &lt;a href="https://github.com/noobbatman/GuardianCI/blob/main/SETUP.md" rel="noopener noreferrer"&gt;SETUP.md&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;p&gt;I'd rather you trust it because I'm upfront about where it stops:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The regex layer is heuristic — false positives happen (there's a one-click dismissal mechanism that remembers them).&lt;/li&gt;
&lt;li&gt;The LLM is &lt;strong&gt;assistive, not a guarantee&lt;/strong&gt; — every finding is still reviewed by a human before merge.&lt;/li&gt;
&lt;li&gt;It's v0.1.0. Proven working, but young.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  I'd love your help
&lt;/h2&gt;

&lt;p&gt;Especially after PRs for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;New detectors&lt;/strong&gt; (e.g. &lt;code&gt;pickle.loads&lt;/code&gt;, SSRF patterns)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New CI platforms&lt;/strong&gt; (Bitbucket, Azure DevOps)&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;end-to-end test&lt;/strong&gt; for the main review pipeline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are &lt;code&gt;good first issue&lt;/code&gt; labels to start from. Repo and contributing guide here:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/noobbatman/GuardianCI" rel="noopener noreferrer"&gt;https://github.com/noobbatman/GuardianCI&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you give it a spin, I'd genuinely love to hear your false-positive rate — that's the number that decides whether a tool like this is worth keeping in CI. Drop it in the comments.&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%2F3lpbzdybzdc94v3g8rno.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%2F3lpbzdybzdc94v3g8rno.png" alt=" " width="800" height="730"&gt;&lt;/a&gt;&lt;/p&gt;

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