<?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: Anavay Sharma</title>
    <description>The latest articles on DEV Community by Anavay Sharma (@supersaiyan101).</description>
    <link>https://dev.to/supersaiyan101</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%2F4205960%2Fd07ccb81-3c12-40a8-8439-170892184961.jpg</url>
      <title>DEV Community: Anavay Sharma</title>
      <link>https://dev.to/supersaiyan101</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/supersaiyan101"/>
    <language>en</language>
    <item>
      <title>SecureScope: Building a Privacy-First AI Code Security Agent with Google Gemma 2, SerpApi &amp; ElevenLabs</title>
      <dc:creator>Anavay Sharma</dc:creator>
      <pubDate>Sun, 25 Oct 2026 08:42:48 +0000</pubDate>
      <link>https://dev.to/supersaiyan101/securescope-building-a-privacy-first-ai-code-security-agent-with-google-gemma-2-serpapi--4e7</link>
      <guid>https://dev.to/supersaiyan101/securescope-building-a-privacy-first-ai-code-security-agent-with-google-gemma-2-serpapi--4e7</guid>
      <description>&lt;p&gt;&lt;em&gt;This project is submitted for the **Hacktoberfest 2026 — Week 3: Open-Source AI Challenge&lt;/em&gt;* (&lt;code&gt;#hf26challenge&lt;/code&gt;).*&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 The Dilemma: Why Code Security Demands Open-Source AI
&lt;/h2&gt;

&lt;p&gt;In the spirit of Hacktoberfest's 'Slow and Steady' sloth philosophy: moving too fast and breaking things is how API keys leak and injection flaws reach production. SecureScope brings steady, methodical, privacy-preserving AI audits to your workflow — because slow and steady wins the security race. 🦥&lt;/p&gt;

&lt;p&gt;Every developer knows the sinking feeling of discovering an unintentional security vulnerability in production. Maybe it was an unescaped SQL parameter, a leaked API key in a configuration file, or an insecure deserialization call that slipped past code review.&lt;/p&gt;

&lt;p&gt;Naturally, the industry has turned to AI for code analysis. But today's commercial AI code scanners present a painful paradox:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;To find vulnerabilities in your private code, you must upload your entire proprietary codebase to a third-party closed-source cloud.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For individual open-source developers, privacy-conscious startups, and regulated industries (fintech, healthcare, defense), this is often an unacceptable trade-off. Your intellectual property is transferred over the wire, subject to third-party retention policies, vendor rate limits, and recurring subscription bills.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;&lt;a href="https://github.com/SuperSaiyan101/securescope" rel="noopener noreferrer"&gt;SecureScope&lt;/a&gt;&lt;/strong&gt; to break this trade-off.&lt;/p&gt;

&lt;p&gt;SecureScope is an open-source, local-first code security intelligence agent built with &lt;strong&gt;Google Gemma 2&lt;/strong&gt; at its core. It scans code across 6+ languages, screens vulnerabilities with a microsecond regex pre-filter, verifies threats using specialized open-weight AI personas, audits dependencies against the open-source &lt;strong&gt;Google OSV&lt;/strong&gt; database, grounds findings in live &lt;strong&gt;SerpApi&lt;/strong&gt; CVE data, generates unified git diff patches, enforces Git pre-commit hooks, and synthesizes executive voice briefings with &lt;strong&gt;ElevenLabs&lt;/strong&gt; — all while keeping your source code strictly under your control.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏆 Target Prize Categories
&lt;/h2&gt;

&lt;p&gt;SecureScope was intentionally engineered to highlight open-weight AI and partner ecosystems:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Partner / Tech&lt;/th&gt;
&lt;th&gt;How SecureScope Leverages It&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🌟 &lt;strong&gt;Best Use of Gemma ($200)&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Google Gemma 2&lt;/strong&gt; (&lt;code&gt;gemma2-9b-it&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Primary open-weight foundation model driving vulnerability verification, false-positive elimination, confidence scoring, and drop-in code fix generation.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🌐 &lt;strong&gt;Best Use of SerpApi ($100)&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;SerpApi&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Live search agent querying NIST NVD, MITRE CWE, and GitHub Advisories to enrich findings with verified CVE data and security research links.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🎙️ &lt;strong&gt;Best Use of ElevenLabs ($100)&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;ElevenLabs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Executive voice audio security briefing (&lt;code&gt;--voice&lt;/code&gt;), converting complex scan diagnostics into clear spoken debriefs (&lt;code&gt;.mp3&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🐙 &lt;strong&gt;Best Use of GitHub ($100)&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;GitHub Ecosystem&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Complete GitHub integration: &lt;strong&gt;SARIF 2.1.0&lt;/strong&gt; alerts in GitHub Code Scanning, automated CI/CD security gating workflow, and one-click &lt;strong&gt;Git Pre-Commit Hooks&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  💡 Why Open Innovation Matters for SecureScope
&lt;/h2&gt;

&lt;p&gt;The core prompt for Week 3 asks: &lt;em&gt;Where does an open-based approach work better than a closed one?&lt;/em&gt; Here is the direct engineering reality:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Does it run on a laptop with no internet?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Yes, 100%.&lt;/strong&gt; Using Ollama, SecureScope downloads Google Gemma 2 once and runs completely offline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python cli.py &lt;span class="nt"&gt;--path&lt;/span&gt; ./my-project &lt;span class="nt"&gt;--provider&lt;/span&gt; ollama &lt;span class="nt"&gt;--model&lt;/span&gt; gemma2 &lt;span class="nt"&gt;--output&lt;/span&gt; all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whether you are on an airplane, in an air-gapped lab, or working remotely without Wi-Fi, the entire audit pipeline — from file discovery to AI reasoning, SARIF export, and HTML report generation — executes locally on your CPU/GPU.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Does it keep data off servers you don't control?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Absolutely.&lt;/strong&gt; Your code never leaves localhost. No proprietary logic, internal database connection strings, or architectural secrets are transmitted to closed-model API providers or stored in external prompt logs.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Does it allow model swapping and custom agent behavior?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Yes.&lt;/strong&gt; Closed platforms lock you into their choice of model. SecureScope uses a modular adapter architecture. Want to switch from Google Gemma 2 to CodeGemma, or test a custom security fine-tune? Simply pass a flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python cli.py &lt;span class="nt"&gt;--path&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--provider&lt;/span&gt; ollama &lt;span class="nt"&gt;--model&lt;/span&gt; codegemma
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The specialized security prompts (&lt;code&gt;analyzer/prompts.py&lt;/code&gt;) are fully open-source and customizable for team-specific coding standards.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Does it cost nothing to run?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Zero marginal cost.&lt;/strong&gt; Running commercial API audits across high-frequency CI/CD pipelines can cost hundreds of dollars monthly in token usage. Running Gemma 2 locally or via generous free open-model endpoints means maintainers and students can run unlimited scans for $0.&lt;/p&gt;




&lt;h3&gt;
  
  
  📊 Direct Comparison: Closed SaaS vs. SecureScope
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;Traditional Closed SaaS SAST&lt;/th&gt;
&lt;th&gt;SecureScope (Open-Weight AI)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Code Privacy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Code uploaded to vendor cloud&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Zero code leaves your machine&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Offline Execution&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Impossible&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ 100% offline with Ollama&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model Transparency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Black-box commercial LLM&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Open-weight Google Gemma 2&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CVE Validation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Static rule matching&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Live SerpApi search + NIST links&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Supply Chain (SCA)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Expensive add-on tier&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Free Google OSV database audit&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Auto-Remediation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Static hints&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Unified Git patches (&lt;code&gt;.patch&lt;/code&gt;) &amp;amp; auto-fix (&lt;code&gt;.bak&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Pre-Commit Guard&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Complex enterprise setup&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;One-click install (&lt;code&gt;--install-hook&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Audio Debrief&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ None&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;ElevenLabs Executive Briefing&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GitHub Native&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Proprietary dashboards&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;OASIS SARIF 2.1.0 Code Scanning&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost at Scale&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$50 – $500 / month / seat&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.00 (Self-hosted &amp;amp; open-source)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🏗️ Architecture: How SecureScope Operates
&lt;/h2&gt;

&lt;p&gt;SecureScope avoids brute-forcing entire repositories into an LLM context window. Instead, it utilizes an efficient &lt;strong&gt;multi-stage security pipeline&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;                      ┌───────────────────────────────┐
                      │    Target Codebase / Repo     │
                      └──────────────┬────────────────┘
                                     │
                         1. Git-Aware File Walker
                            (respects .gitignore,
                             supports --diff mode)
                                     │
                                     ▼
                         2. Regex Pre-Filter Engine
                            (Screens 200+ patterns;
                             skips clean files in &amp;lt;1ms)
                                     │
                                     ▼
                      3. Google Gemma 2 Analysis
                       (Multi-Role AI Security Agent)
                  ┌──────────────────┼──────────────────┐
                  ▼                  ▼                  ▼
           Role 1: Secrets    Role 2: Injection  Role 3: Auth &amp;amp; SSRF
                  └──────────────────┬──────────────────┘
                                     │
                      4. Live Threat Grounding (SerpApi)
                         (Fetches NIST NVD &amp;amp; MITRE CVEs)
                                     │
                                     ▼
                      5. Supply Chain Auditing (Google OSV)
                         (Audits requirements.txt &amp;amp; package.json)
                                     │
                                     ▼
                         6. OWASP Top 10 Mapping
                            (A01:2021 to A10:2021)
                                     │
                                     ▼
                        7. Multi-Modal Reporting
                  ┌────────────┬─────────────┬─────────────┐
                  ▼            ▼             ▼             ▼
            Rich Terminal  SARIF 2.1.0  Interactive   ElevenLabs
              Dashboard     (GitHub)     HTML Report   Voice Debrief
                                     │
                                     ▼
                      8. Automated Remediation Engine
                         (Unified .patch &amp;amp; safe .bak fixing)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Stage 1: Git-Aware File Traversal &amp;amp; Diff Mode
&lt;/h3&gt;

&lt;p&gt;The file walker (&lt;code&gt;scanner/file_walker.py&lt;/code&gt;) queries &lt;code&gt;git ls-files&lt;/code&gt; to automatically honor &lt;code&gt;.gitignore&lt;/code&gt; rules, skips build artifacts (&lt;code&gt;node_modules&lt;/code&gt;, &lt;code&gt;dist&lt;/code&gt;, &lt;code&gt;venv&lt;/code&gt;), and includes a &lt;code&gt;--diff&lt;/code&gt; mode that scans only staged files in milliseconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 2: Sub-Millisecond Regex Pre-Filter
&lt;/h3&gt;

&lt;p&gt;Scanning clean files with an LLM is slow and wasteful. SecureScope runs language-specific regex rules (&lt;code&gt;scanner/languages.py&lt;/code&gt;) covering Python, JavaScript, TypeScript, Go, Java, and PHP. Clean files are bypassed instantly; only suspicious snippets with surrounding context are packaged for AI review.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 3: Multi-Role Reasoning with Google Gemma 2
&lt;/h3&gt;

&lt;p&gt;Candidate snippets are dispatched to Google Gemma 2 (&lt;code&gt;analyzer/ai_client.py&lt;/code&gt;). Specialized auditor personas analyze each flaw:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Injection Auditor&lt;/strong&gt;: Traces whether untrusted inputs flow into &lt;code&gt;sqlite3.execute()&lt;/code&gt;, &lt;code&gt;child_process.exec()&lt;/code&gt;, or &lt;code&gt;eval()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Credential &amp;amp; Secret Detector&lt;/strong&gt;: Distinguishes between real high-entropy API tokens and harmless test dummy strings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access &amp;amp; Cryptographic Reviewer&lt;/strong&gt;: Flags weak hashing (&lt;code&gt;MD5&lt;/code&gt;, &lt;code&gt;SHA1&lt;/code&gt;), disabled TLS validation, and unsafe deserialization (&lt;code&gt;pickle.loads&lt;/code&gt;, unsafe YAML).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Stage 4: Live Threat Grounding via SerpApi
&lt;/h3&gt;

&lt;p&gt;When Gemma 2 confirms a vulnerability, SecureScope queries SerpApi (&lt;code&gt;analyzer/cve_search.py&lt;/code&gt;) against the National Vulnerability Database (NVD) and MITRE CWE:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;search_query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;vulnerability&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; (site:cve.mitre.org OR site:nvd.nist.gov)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This attaches verified CVE IDs, severity scores, and direct research links to every report.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 5: Software Composition Analysis (SCA) via Google OSV
&lt;/h3&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%2Fzz54dwg8vgd8akofwrtx.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%2Fzz54dwg8vgd8akofwrtx.png" alt=" " width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over 80% of real-world vulnerabilities stem from third-party dependencies. SecureScope parses &lt;code&gt;requirements.txt&lt;/code&gt; and &lt;code&gt;package.json&lt;/code&gt;, querying Google's Open Source Vulnerabilities (OSV) API to detect known CVEs, exact line numbers, and recommended patched version numbers (&lt;code&gt;&amp;gt;= x.y.z&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 6: Automated Remediation Engine
&lt;/h3&gt;

&lt;p&gt;SecureScope doesn't just detect vulnerabilities—it fixes them. Using &lt;code&gt;remediator/patcher.py&lt;/code&gt;, developers can generate a unified Git diff (&lt;code&gt;securescope.patch&lt;/code&gt;) or apply safe automated fixes directly to source files with &lt;code&gt;.bak&lt;/code&gt; safety backups.&lt;/p&gt;




&lt;h2&gt;
  
  
  📸 The Multi-Modal Reporting Experience
&lt;/h2&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%2F50uysr4gm1upaxele86a.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%2F50uysr4gm1upaxele86a.png" alt=" " width="799" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SecureScope delivers findings across four complementary output channels:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rich Terminal Dashboard&lt;/strong&gt;: Color-coded severity gauges, OWASP Top 10 breakdown tables, and highlighted code snippets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Standalone HTML Report&lt;/strong&gt;: Zero-dependency dark-mode dashboard with expandable vulnerability cards, fix suggestions, and clickable CVE badges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OASIS SARIF 2.1.0 Export&lt;/strong&gt;: Direct ingestion into GitHub Advanced Security and GitHub Code Scanning alerts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ElevenLabs Audio Security Briefing&lt;/strong&gt;: Synthesizes an executive spoken overview (&lt;code&gt;.mp3&lt;/code&gt;) summarizing critical risks for engineering leads on the go.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🌐 Real-Time Web Dashboard (&lt;code&gt;--serve&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;For developers who prefer an interactive visual interface, SecureScope includes a built-in, zero-dependency local web server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python cli.py &lt;span class="nt"&gt;--serve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running this command spins up a local dashboard at &lt;code&gt;http://localhost:8080&lt;/code&gt; where you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trigger live audits across any directory path.&lt;/li&gt;
&lt;li&gt;Filter findings by Severity (Critical, High, Medium, Low) and instant text search.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Download Git Patch"&lt;/strong&gt; to grab a ready-to-commit &lt;code&gt;.patch&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Auto-Fix Files"&lt;/strong&gt; to remediate code directly with automatic safety backups.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔬 Real-World Example: Finding &amp;amp; Fixing an Injection Flaw
&lt;/h2&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%2Fctcu607b05amy0dqmf3q.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%2Fctcu607b05amy0dqmf3q.png" alt=" " width="799" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To test the system, I ran SecureScope against a deliberately vulnerable fixture containing an unsafe SQL query:&lt;/p&gt;

&lt;h3&gt;
  
  
  Vulnerable Input Code (&lt;code&gt;app.py&lt;/code&gt;):
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;search_users&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sqlite3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;users.db&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;cursor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="c1"&gt;# Flaw: Direct string interpolation into SQL query
&lt;/span&gt;    &lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT * FROM users WHERE name = &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;'"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetchall&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  SecureScope Terminal Output:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;╭──────────────── #1 — SQL Injection via String Formatting ────────────────╮
│ Severity: 🔴 CRITICAL                                                    │
│ OWASP: A03:2021 — Injection                                              │
│ Confidence: HIGH                                                         │
│ File: app.py (line 45)                                                   │
│                                                                          │
│ Description: User-controlled 'username' parameter is directly formatted │
│ into the SQL query string, allowing arbitrary SQL command execution.    │
│                                                                          │
│ 💡 Fix: Use parameterized queries:                                       │
│ cursor.execute("SELECT * FROM users WHERE name = ?", (username,))        │
│                                                                          │
│ 🌐 Live CVE: CWE-89 (https://cwe.mitre.org/data/definitions/89.html)     │
╰──────────────────────────────────────────────────────────────────────────╯
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Auto-Remediation with Unified Patching:
&lt;/h3&gt;

&lt;p&gt;Running &lt;code&gt;python cli.py --patch&lt;/code&gt; generates a clean Git patch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;--- a/app.py
&lt;/span&gt;&lt;span class="gi"&gt;+++ b/app.py
&lt;/span&gt;&lt;span class="p"&gt;@@ -45,1 +45,1 @@&lt;/span&gt;
&lt;span class="gd"&gt;-    cursor.execute(f"SELECT * FROM users WHERE name = '{username}'")
&lt;/span&gt;&lt;span class="gi"&gt;+    cursor.execute("SELECT * FROM users WHERE name = ?", (username,))
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply with &lt;code&gt;git apply securescope.patch&lt;/code&gt; or pass &lt;code&gt;--fix&lt;/code&gt; to patch the file automatically!&lt;/p&gt;

&lt;h3&gt;
  
  
  Generated ElevenLabs Voice Briefing Transcript:
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Attention security team. This is your SecureScope automated security audit briefing. We scanned 2 files in 0.1 seconds, identifying 1 critical vulnerability: SQL Injection via String Formatting in app.py. AI-suggested parameterized query patches have been compiled in your HTML report."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🪝 Zero-Config Git Pre-Commit Hook
&lt;/h2&gt;

&lt;p&gt;Prevent vulnerable code and leaked secrets from ever reaching your Git history with a single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install the hook into your current Git repository:&lt;/span&gt;
python cli.py &lt;span class="nt"&gt;--install-hook&lt;/span&gt;

&lt;span class="c"&gt;# Now git commit automatically screens your staged diff in &amp;lt;0.2s:&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"feat: user search"&lt;/span&gt;
&lt;span class="c"&gt;# 🔐 [SecureScope] Auditing staged code and dependencies before commit...&lt;/span&gt;
&lt;span class="c"&gt;# 🚨 [SecureScope] Commit rejected: Security issues detected in staged changes!&lt;/span&gt;
&lt;span class="c"&gt;#    • Run 'python cli.py --diff' to view full findings.&lt;/span&gt;
&lt;span class="c"&gt;#    • Run 'python cli.py --fix' to automatically apply remediations.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⚡ Quickstart &amp;amp; How to Run
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Installation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/SuperSaiyan101/securescope.git
&lt;span class="nb"&gt;cd &lt;/span&gt;securescope
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Instant Local Scan (No API Key Required)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python cli.py &lt;span class="nt"&gt;--path&lt;/span&gt; ./tests/fixtures/vulnerable_app &lt;span class="nt"&gt;--skip-ai&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Full AI Scan with Google Gemma 2
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GROQ_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gsk_..."&lt;/span&gt;  &lt;span class="c"&gt;# Windows: $env:GROQ_API_KEY="gsk_..."&lt;/span&gt;
python cli.py &lt;span class="nt"&gt;--path&lt;/span&gt; ./my-project &lt;span class="nt"&gt;--output&lt;/span&gt; all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. 100% Offline Local Scan with Ollama
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull gemma2
python cli.py &lt;span class="nt"&gt;--path&lt;/span&gt; ./my-project &lt;span class="nt"&gt;--provider&lt;/span&gt; ollama &lt;span class="nt"&gt;--model&lt;/span&gt; gemma2 &lt;span class="nt"&gt;--output&lt;/span&gt; all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Generate Voice Briefing with ElevenLabs
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ELEVENLABS_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_key"&lt;/span&gt;
python cli.py &lt;span class="nt"&gt;--path&lt;/span&gt; ./my-project &lt;span class="nt"&gt;--voice&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. Auto-Remediation &amp;amp; Patching
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Generate unified git diff patch:&lt;/span&gt;
python cli.py &lt;span class="nt"&gt;--path&lt;/span&gt; ./my-project &lt;span class="nt"&gt;--patch&lt;/span&gt;

&lt;span class="c"&gt;# Or auto-fix source files with safety backups (.bak):&lt;/span&gt;
python cli.py &lt;span class="nt"&gt;--path&lt;/span&gt; ./my-project &lt;span class="nt"&gt;--fix&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  7. Launch Real-Time Web Dashboard
&lt;/h3&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%2Flmrxs0ma8w5ymdbhu9dm.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%2Flmrxs0ma8w5ymdbhu9dm.png" alt=" " width="800" height="408"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python cli.py &lt;span class="nt"&gt;--serve&lt;/span&gt;
&lt;span class="c"&gt;# Open http://localhost:8080 in your browser&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🐙 CI/CD Integration: GitHub Actions &amp;amp; SARIF Code Scanning
&lt;/h2&gt;

&lt;p&gt;SecureScope includes a drop-in workflow (&lt;code&gt;.github/workflows/securescope.yml&lt;/code&gt;) that audits every pull request, exports SARIF 2.1.0 results into the native &lt;strong&gt;GitHub Security Tab&lt;/strong&gt;, and blocks merges on critical flaws:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SecureScope Security Scan&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
  &lt;span class="na"&gt;security-events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;write&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;security-scan&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-python@v5&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;python-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3.12'&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;pip install -r requirements.txt&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run SecureScope Audit&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;GROQ_API_KEY&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GROQ_API_KEY }}&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;python cli.py --path . --output all --report-file securescope_report --fail-on critical&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Upload SARIF to GitHub Code Scanning&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;github/codeql-action/upload-sarif@v3&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;sarif_file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;securescope_report.sarif&lt;/span&gt;
        &lt;span class="na"&gt;continue-on-error&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🛠️ How I Built It (Show Your Work)
&lt;/h2&gt;

&lt;p&gt;This project was developed iteratively using &lt;strong&gt;OpenCode&lt;/strong&gt;, an open-source terminal coding agent harness connecting to open-weight LLMs. &lt;/p&gt;

&lt;p&gt;Using OpenCode, I:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Architected the hybrid engine&lt;/strong&gt;: Combined regex pre-filtering with Google Gemma 2 for speed and precision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standardized on Open Formats&lt;/strong&gt;: Implemented OASIS SARIF 2.1.0 to integrate seamlessly with GitHub Advanced Security.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Engineered Auto-Remediation&lt;/strong&gt;: Built a unified diff patch generator and direct AST file patcher with automatic &lt;code&gt;.bak&lt;/code&gt; backups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrated Supply Chain Auditing&lt;/strong&gt;: Connected directly to the Google OSV API to inspect &lt;code&gt;requirements.txt&lt;/code&gt; and &lt;code&gt;package.json&lt;/code&gt; with zero API keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crafted Developer Guards&lt;/strong&gt;: Designed a one-click Git pre-commit hook and a zero-dependency local web server for visual security audits.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Building an open security tool using an open agent harness felt like the ultimate demonstration of what open-source AI makes possible in 2026.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Code &amp;amp; Repository
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/SuperSaiyan101/securescope" rel="noopener noreferrer"&gt;https://github.com/SuperSaiyan101/securescope&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License&lt;/strong&gt;: MIT License&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;What are your biggest pain points with modern code security scanners? Try running SecureScope on your project, and share your thoughts and feedback below!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>hacktoberfest</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
