DEV Community

Aditya Verma
Aditya Verma

Posted on

CodePulse AI — Real-Time Visual Architecture & API Security Auditor

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

Modern cloud infrastructure and microservice topologies are growing far too complex for manual, static security reviews. CodePulse AI is an open-source, local-first DevSecOps agent designed to bridge that gap.

It takes any architecture diagram or API flowchart, inspects its visual layout in real-time, detects security vulnerabilities (such as unprotected gateways, OWASP Top 10 vectors, or unencrypted database connections), and automatically writes executable Kubernetes NetworkPolicy and Terraform remediation patches to secure the system.

Demo

CodePulse AI Control Panel Dashboard

Code

GitHub logo AdityaVermaCode / codeplus-ai

Real-Time Multimodal Architecture & API Security Auditor built with Gemma 4 for Hacktoberfest x OSW Ahmedabad

CodePulse AI 🛡️

Real-Time Visual Architecture & API Security Auditor

Upload any architecture diagram, system design screenshot, or cloud infrastructure image — and get a full AI-powered security audit in seconds. Runs locally on your laptop. No paid subscriptions. No data sent to the cloud (unless you choose to).


How It Works

You upload an image → the AI reads it like a security expert → you get:

  • A Risk Score out of 100 (Critical / High / Medium / Low)
  • A list of every vulnerability found, with severity labels
  • A ready-to-use YAML/code fix for each issue
  • An OWASP Top 10 compliance check

The tool uses a 3-tier AI fallback so it never fails:

1. Local LM Studio (Gemma 4) — private, on-device, no internet needed
        ↓ if not running
2. Google Gemini 2.5 Flash — cloud fallback (requires API key)
        ↓ if unavailable
3. Anti-Gravity Built-in Engine —
…

How I Built It

  • Open-Source AI Core: Powered by local Gemma 4 vision inference running via LM Studio (/v1/chat/completions vision endpoint).
  • Backend Pipeline: Built with FastAPI, Pydantic, and Pillow, featuring dynamic MIME-type normalization to process multi-format image payloads (forcing webp/png payloads into compatible stream formats for local VLM execution) and customized request timeouts to prevent vision model bottlenecks.
  • Frontend: Interactive drag-and-drop audit control panel built with Next.js and Tailwind CSS.
  • Resilience: Implements a multi-tier fallback mechanism (Local Gemma 4 → Cloud Gemini 2.5 Flash → Anti-Gravity Autonomous Safety Net) ensuring 100% operational uptime during live audits.

Why Does Open Innovation Matter?

Security auditing on cloud and network diagrams involves highly sensitive, proprietary infrastructure blueprints that organizations cannot risk uploading to closed, third-party cloud APIs due to strict data privacy regulations.

By building around open-weight models like Gemma 4 with local inference, CodePulse AI proves that enterprise-grade visual threat modeling can be performed 100% on-device—keeping private infrastructure diagrams completely secure on the local host.

Prize Categories

  • Best Use of Gemma

Top comments (0)