<?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: Sami Hussain</title>
    <description>The latest articles on DEV Community by Sami Hussain (@samihussaindev).</description>
    <link>https://dev.to/samihussaindev</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%2F4214545%2Fe611ad90-1719-432d-bde2-8df5261cbd52.jpg</url>
      <title>DEV Community: Sami Hussain</title>
      <link>https://dev.to/samihussaindev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samihussaindev"/>
    <language>en</language>
    <item>
      <title>Safe AI Coding: An Open-Source Security Toolkit for AI Coding Agents</title>
      <dc:creator>Sami Hussain</dc:creator>
      <pubDate>Thu, 29 Oct 2026 07:03:15 +0000</pubDate>
      <link>https://dev.to/samihussaindev/safe-ai-coding-an-open-source-security-toolkit-for-ai-coding-agents-2529</link>
      <guid>https://dev.to/samihussaindev/safe-ai-coding-an-open-source-security-toolkit-for-ai-coding-agents-2529</guid>
      <description>&lt;h1&gt;
  
  
  Safe AI Coding: An Open-Source Security Toolkit for AI Coding Agents
&lt;/h1&gt;

&lt;p&gt;AI coding agents are changing how developers build software. With tools like Claude Code, developers can generate features, refactor applications, debug errors, and automate repetitive tasks using natural language.&lt;/p&gt;

&lt;p&gt;But there is an important question we should ask:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do we make AI-assisted development safer without slowing down the development process?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI-generated code can contain security vulnerabilities, incorrect assumptions, missing implementations, or dangerous changes. Coding agents can also encounter malicious instructions hidden inside repositories, configuration files, or other project content.&lt;/p&gt;

&lt;p&gt;That is why I built &lt;strong&gt;Safe AI Coding&lt;/strong&gt; — a free, open-source project designed to add security-focused checks and review workflows to AI-assisted development.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub Repository:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/sami-hussain-dev/safe-ai-coding" rel="noopener noreferrer"&gt;https://github.com/sami-hussain-dev/safe-ai-coding&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What is Safe AI Coding?
&lt;/h2&gt;

&lt;p&gt;Safe AI Coding is a Claude Code skill designed to help developers identify risky operations, review AI-generated changes, and inspect repositories for potential security issues.&lt;/p&gt;

&lt;p&gt;It focuses on several areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Risk-aware workflows before potentially destructive operations.&lt;/li&gt;
&lt;li&gt;Detection of suspicious instructions and prompt-injection patterns.&lt;/li&gt;
&lt;li&gt;Checks for common security problems in code.&lt;/li&gt;
&lt;li&gt;Identification of potentially incomplete or hallucinated code references.&lt;/li&gt;
&lt;li&gt;Review of changes from technical and human perspectives.&lt;/li&gt;
&lt;li&gt;Optional PDF reports documenting findings and fixes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project is open source under the MIT License, so developers can explore the implementation and evaluate whether it fits their workflows.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why does secure vibe coding matter?
&lt;/h2&gt;

&lt;p&gt;Vibe coding makes it easier to turn an idea into a working application. However, generating code quickly does not automatically make that code secure or production-ready.&lt;/p&gt;

&lt;p&gt;Consider these examples:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Destructive commands&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An agent might propose deleting files, rewriting Git history, or running a database operation that could remove important data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Prompt injection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A repository may contain instructions that attempt to manipulate an AI agent into revealing secrets or performing unintended actions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Insecure application code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI-generated code may introduce SQL injection, cross-site scripting (XSS), unsafe redirects, weak authentication checks, or other vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Incomplete implementations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A generated feature might reference a missing class, route, method, configuration file, or view.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Dependency risks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Incorrect or unverified package references and suspicious installation hooks can introduce supply-chain risks.&lt;/p&gt;

&lt;p&gt;These are reasons to combine AI-assisted development with security checks, testing, explicit permissions, and human review.&lt;/p&gt;
&lt;h2&gt;
  
  
  Key features of Safe AI Coding
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Risk-aware operation checks
&lt;/h3&gt;

&lt;p&gt;The skill is designed to pause before potentially risky actions, explain the possible consequences, and request approval.&lt;/p&gt;

&lt;p&gt;Examples include file deletion, database writes, dependency installation, Git pushes, and changes to security-related configuration.&lt;/p&gt;

&lt;p&gt;The actual enforcement depends on the agent's environment and permissions. For stronger protection, the project also recommends configuring explicit Claude Code permission rules.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Prompt-injection and repository inspection
&lt;/h3&gt;

&lt;p&gt;Repositories can contain untrusted instructions in files such as &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;, and editor-specific AI rules.&lt;/p&gt;

&lt;p&gt;Safe AI Coding includes checks for suspicious instruction patterns, malicious Git configuration or hooks, symlinks to sensitive files, and hidden Unicode characters.&lt;/p&gt;

&lt;p&gt;The goal is to help developers identify potentially dangerous repository content before trusting it.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. AI-generated code review
&lt;/h3&gt;

&lt;p&gt;The skill checks for issues such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;References to missing classes, methods, routes, views, and imports.&lt;/li&gt;
&lt;li&gt;Placeholder comments that may indicate incomplete implementations.&lt;/li&gt;
&lt;li&gt;Pasted chat content or unresolved merge conflicts.&lt;/li&gt;
&lt;li&gt;Tests that have been weakened or skipped.&lt;/li&gt;
&lt;li&gt;Common application security vulnerabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These checks can help surface problems, but no automated review catches every defect.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Security and data-safety checks
&lt;/h3&gt;

&lt;p&gt;The project documents checks for several risk categories, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQL, command, and path injection.&lt;/li&gt;
&lt;li&gt;Cross-site scripting (XSS) and server-side request forgery (SSRF).&lt;/li&gt;
&lt;li&gt;Exposed API keys, tokens, and sensitive identifiers.&lt;/li&gt;
&lt;li&gt;Unsafe database operations and destructive migrations.&lt;/li&gt;
&lt;li&gt;Removed authentication checks and potentially inefficient database queries.&lt;/li&gt;
&lt;li&gt;Suspicious dependency and package-installation configurations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  5. Two-perspective code review
&lt;/h3&gt;

&lt;p&gt;Safe AI Coding is designed to review changes from two perspectives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Technical perspective:&lt;/strong&gt; What could break, introduce a vulnerability, or behave incorrectly?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human perspective:&lt;/strong&gt; Is the change understandable, appropriate, and ready for review or release?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The documented review outcomes are &lt;code&gt;Ready&lt;/code&gt;, &lt;code&gt;Ready with notes&lt;/code&gt;, and &lt;code&gt;Not ready&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;These outcomes are review guidance, not a guarantee that the application is free from vulnerabilities.&lt;/p&gt;
&lt;h3&gt;
  
  
  6. Optional PDF reports
&lt;/h3&gt;

&lt;p&gt;Developers can request a PDF report summarizing identified issues, changes, fixes, and supporting evidence.&lt;/p&gt;

&lt;p&gt;The repository documents English and Roman Urdu report options, which can make the results more accessible to different developers.&lt;/p&gt;
&lt;h3&gt;
  
  
  7. Built-in self-tests
&lt;/h3&gt;

&lt;p&gt;The README documents a self-test suite containing 95 cases intended to check detection behavior, legitimate code, and handling of potentially malicious repositories.&lt;/p&gt;

&lt;p&gt;Developers should run the self-test in their own environment and review the results before relying on the tool in a production workflow.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to install Safe AI Coding
&lt;/h2&gt;

&lt;p&gt;The recommended installation method is through the Claude Code plugin marketplace.&lt;/p&gt;

&lt;p&gt;Open Claude Code and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/plugin marketplace add sami-hussain-dev/safe-ai-coding
/plugin install safe-ai-coding@safe-ai-coding
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, on Windows PowerShell, you can clone the repository into your personal Claude skills directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;clone&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--depth&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://github.com/sami-hussain-dev/safe-ai-coding.git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="s2"&gt;\.claude\skills\safe-ai-coding"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use one installation method rather than both. Follow the repository's README for prerequisites, updates, and troubleshooting.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use it
&lt;/h2&gt;

&lt;p&gt;After installation, you can use the documented commands for common workflows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scan a project:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/safe-ai-coding:safe-ai-coding scan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use this when beginning work in an unfamiliar repository and looking for potentially suspicious instructions or configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build a feature:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/safe-ai-coding:safe-ai-coding build Add employee attendance API
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use this workflow to request a feature and have the changes reviewed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Review changes before merging:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/safe-ai-coding:safe-ai-coding review main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use this to request a review against the &lt;code&gt;main&lt;/code&gt; branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run the self-test:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/safe-ai-coding:safe-ai-coding self-test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review the output and confirm that the expected checks work in your environment.&lt;/p&gt;

&lt;p&gt;Check the repository documentation for the current command syntax and supported setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does Safe AI Coding replace security testing?
&lt;/h2&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;A coding skill can provide useful guidance and automated checks, but it cannot guarantee that an AI agent will never make a mistake or that every vulnerability will be detected.&lt;/p&gt;

&lt;p&gt;For a stronger development workflow, combine it with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Explicit permissions and restrictions for dangerous commands.&lt;/li&gt;
&lt;li&gt;Automated tests and static analysis.&lt;/li&gt;
&lt;li&gt;Dependency and secret scanning.&lt;/li&gt;
&lt;li&gt;Human review of sensitive changes.&lt;/li&gt;
&lt;li&gt;Backups and a controlled deployment process.&lt;/li&gt;
&lt;li&gt;Security testing appropriate to the application.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Safe AI Coding is intended to support these practices, not replace them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who can benefit from this project?
&lt;/h2&gt;

&lt;p&gt;The project may be useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developers who use Claude Code for everyday programming.&lt;/li&gt;
&lt;li&gt;Vibe coders building applications with AI assistance.&lt;/li&gt;
&lt;li&gt;Laravel, PHP, JavaScript, TypeScript, and Python developers.&lt;/li&gt;
&lt;li&gt;Developers reviewing unfamiliar or untrusted repositories.&lt;/li&gt;
&lt;li&gt;Teams that want more structured checks around AI-generated changes.&lt;/li&gt;
&lt;li&gt;Open-source contributors interested in AI agent security.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although the project documents support for multiple programming stacks, its current implementation and compatibility should be evaluated for your particular environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it and share your feedback
&lt;/h2&gt;

&lt;p&gt;I built Safe AI Coding to explore how security checks and review workflows can fit into AI-assisted development without making the process unnecessarily complicated.&lt;/p&gt;

&lt;p&gt;I welcome feedback, bug reports, feature suggestions, and contributions from developers who want to help improve the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explore the source code, review the documented checks, and try it in a test project before using it in critical workflows.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/sami-hussain-dev/safe-ai-coding" rel="noopener noreferrer"&gt;https://github.com/sami-hussain-dev/safe-ai-coding&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What security risk concerns you most when using AI coding agents: prompt injection, insecure generated code, exposed secrets, or destructive operations?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'd love to hear your thoughts and learn from your experiences.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Author: Sami Hussain | Software Engineer and creator of Safe AI Coding&lt;/em&gt;&lt;/p&gt;

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