DEV Community

kxrn_gupta
kxrn_gupta

Posted on

ForgeGuard: Building an Autonomous AI DevSecOps Side Hustle with Open-Weight Models

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.

What I Built

ForgeGuard is an autonomous AI-powered security scanner, STRIDE threat modeler, and self-healing patch engine designed specifically for freelance DevSecOps consultants and engineering teams.

As an independent builder and consultant, offering security audits to startups and indie founders is one of the highest-value technical side hustles. However, manual vulnerability auditing, calculating attack surfaces, and writing threat models typically takes 10+ hours per repository.

ForgeGuard turns this into a high-margin, automated workflow:

  • Scans entire Python codebases via recursive AST visitors in under 10ms.
  • Maps discovered entry points against all 6 STRIDE threat categories (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege).
  • Synthesizes automated, AST-verified remediation patches powered by open-weight AI with guaranteed zero broken builds and 1-click snapshot rollbacks.

Clients realistically pay $500 to $2,000 per audit before product launches or funding rounds to guarantee they aren't leaking hardcoded secrets, exposing SQL/command injection flaws, or violating OWASP Top 10 standards.

Demo

  • 🎥 Video Walkthrough (YouTube): Watch the Full 3.5-Minute Demo
  • 🖥️ Interactive Cyberpunk Dashboard: Live Tailwind CSS dark-mode UI with real-time CVSS 3.1 gauges, interactive STRIDE blast-radius matrix, and a side-by-side AST-verified code diff studio.

Code

# Clone the repository
git clone https://github.com/karan5028ji/forgeguard.git
cd forgeguard

# Run a high-speed SAST scan in sub-10ms
python -m forgeguard.cli scan examples/vulnerable_app/app.py

# Generate full executive audit with STRIDE threat model
python -m forgeguard.cli audit examples/vulnerable_app/ --json audit_report.json

# Preview autonomous patches
python -m forgeguard.cli patch examples/vulnerable_app/ --dry-run

# Launch local interactive cyberpunk dashboard
python -m forgeguard.cli serve examples/vulnerable_app/ --port 8899
Enter fullscreen mode Exit fullscreen mode

How I Built It

ForgeGuard uses a tri-agent collaborative architecture powered by open-weight AI:

  1. Agent 1: Deterministic Security Auditor: Runs native Python AST visitors and taint-flow tracking to detect OWASP Top 10 / CWE vulnerabilities (SQL injection, pickle deserialization, shell command injections, path traversal, hardcoded secrets).
  2. Agent 2: Automated STRIDE Threat Modeler: Analyzes structural data flows to evaluate asset blast radius and maps entry points across STRIDE categories.
  3. Agent 3: Autonomous Remediation Engineer: Connects to Meta-Llama-3.1-8B-Instruct (via Featherless.ai with an offline heuristic fallback) to generate unified diffs. Every suggested patch is passed through a strict Python AST syntax gate before writing to disk, ensuring no broken builds.

Why Does Open Innovation Matter?

For an AI-powered security side hustle, relying on closed proprietary cloud APIs is a major barrier:

  1. Total Code Privacy: Enterprise clients and security-conscious founders will never allow their proprietary, unreleased intellectual property to be sent to closed third-party cloud servers with uncertain training policies. Open-weight models (Llama 3.1) can be run locally or in private environments with zero data leakage.
  2. Zero Marginal Cost per Audit: Scanning large codebases with thousands of AST nodes through closed per-token APIs destroys consulting margins. Open-weight models offer unlimited inference with zero per-token cost anxiety.
  3. Offline & Deterministic Reliability: Security tools cannot fail if an internet connection drops or API rate-limits hit. ForgeGuard's architecture guarantees that even in complete offline isolation, local heuristics and open-weight models keep the audit pipeline running.

Prize Categories

  • Most Creative Side Hustle
  • Best Use of Open-Source / Open-Weight AI

Top comments (0)