Inspiration

Modern developers and students increasingly ship code written or assisted by AI, yet critical OWASP Top-10 vulnerabilities—such as SQL Injection (CWE-89), OS Command Injection (CWE-78), DOM XSS (CWE-79), and Hardcoded Production Secrets (CWE-798)—frequently slip into commits. Sending proprietary source code to external cloud LLM APIs creates severe IP/data-leakage risks, API costs, and multi-second latency bottlenecks.

We built SentinelAudit AI for GenHacks 2026 (AI, Agentic Systems, Cybersecurity, and Dev Tools) to solve this with a 100% offline, zero-data-leakage autonomous security agent that detects vulnerabilities in milliseconds, synthesizes attacker exploit payloads, applies deterministic security patches, and mathematically verifies risk reduction locally before deployment.

What it does

SentinelAudit AI executes a 3-Stage Closed-Loop Security Pipeline completely offline on CPU:

  • Stage 1 — Local ML & CWE Detector (7.5 ms latency): Scores source code risk in real time using a calibrated soft-voting ensemble classifier combined with MITRE CWE and CVSS v3.1 signature rules (CWE-89, CWE-78, CWE-79, CWE-798, CWE-22).
  • Stage 2 — Autonomous Symbolic Remediation Engine (< 1 ms): Isolates the exact attacker Exploit Proof-of-Concept (PoC), assesses security impact, and generates drop-in hardened replacement code (parameterized %s queries, shell=False argument arrays with shlex.quote, sanitized textContent DOM sinks, and os.environ secret management) with zero external API calls.
  • Stage 3 — Closed-Loop ML Verification: Unlike standard AI coding tools that blindly trust generated fixes, SentinelAudit AI automatically re-runs the patched code through its local ML model to verify that vulnerability risk drops from critical (94.2%) down to verified safe (3.4% — a -90.8% risk reduction).
  • Smart Zero-Cost Routing & Telemetry (gr.State): Clean, parameterized code is approved immediately at 3.4% risk without triggering unnecessary patching, while session-isolated telemetry tracks total scans, caught threats, and verified patches.

How we built it

  • Machine Learning Pipeline (Python & Scikit-Learn): Trained a Character N-gram TfidfVectorizer (3, 5) paired with a soft-voting VotingClassifier combining Calibrated LinearSVC, LogisticRegression, and RandomForestClassifier across vulnerable and hardened code patterns (1.0000 ROC-AUC on validation benchmark).
  • Symbolic Patching & CWE Engine: Engineered regex/AST pattern analyzers mapped to MITRE CWE identifiers and CVSS severity scores to generate deterministic, bug-free security patches offline.
  • Interactive Session-Isolated UI (Gradio): Built a responsive web interface utilizing gr.State so concurrent users maintain isolated scan counters and live audit telemetry.

Challenges we ran into

  • Eliminating Cloud Dependency & Data Leakage: Relying on external cloud LLMs introduced network latency, API key friction, and source-code privacy risks. Replacing cloud inference with a local calibrated ensemble and symbolic remediation engine made the entire pipeline run 100% offline in under 10 ms.
  • Preventing False Positives on Hardened Code: Initial regex signatures flagged safe parameterized queries containing special characters; we refined our parameter-binding and sink-sanitization checks so verified patches consistently score below 3.5% risk during closed-loop re-evaluation.

Accomplishments that we're proud of

  • Built a 100% offline, zero-API-key DevSecOps agent that anyone—including hackathon judges—can clone and run locally in 30 seconds with zero setup friction.
  • Demonstrated a true closed-loop verification workflow across 5 live test scenarios (5 Scans | 4 Threats Caught | 4 Verified Patches | 0 External API Calls), reducing vulnerability risk from 94.2% to 3.4% on every threat.

What we learned

Detecting a vulnerability is only half the battle—developers need an actionable, drop-in patch and mathematical proof that the fix actually neutralized the attack vector without introducing new risks.

What's next for SentinelAudit AI

  • Package SentinelAudit AI as a zero-latency pre-commit Git hook and GitHub Actions CI/CD bot to block vulnerable commits automatically.
  • Build a VS Code extension for real-time inline vulnerability highlighting and one-click closed-loop patching.
  • Expand offline symbolic patching rules to cover Server-Side Request Forgery (CWE-918), Insecure Deserialization (CWE-502), and multi-file repository auditing.

Built With

Share this project:

Updates

Submission history