Inspiration

As developers increasingly rely on AI coding assistants, massive volumes of proprietary code, internal business logic, and exposed API credentials are routinely sent to third-party cloud servers. Enterprise engineering teams face an unacceptable dilemma: sacrifice code velocity or leak confidential intellectual property.

We built DevShield to eliminate this tradeoff. By pairing on-device Chrome Gemini Nano (via Firebase AI Logic) with secure Firebase Cloud Gemini escalation, DevShield delivers zero-data-egress security auditing right inside the developer's browser silicon.

What it does

DevShield is an autonomous, privacy-preserving hybrid code security engineer:

  • Zero-Egress On-Device Silicon Auditing: Analyzes code on local device silicon using Chrome's built-in Gemini Nano (window.ai). Zero bytes of proprietary code leave the machine during scans.
  • Real-Time OWASP Top 10 Detection: Scans AST trees in under 500ms for SQL injection, hardcoded credentials, JWT secrets, XSS, and command injection.
  • One-Click AST-Hardened Mitigations: Automatically generates and applies cryptographically hardened fixes.
  • Interactive Monaco Visual Diff Inspector: Side-by-side Monaco diff editor lets developers review and approve line-by-line mitigations before patching.
  • Air-Gapped Secret Redaction: Detects and masks AWS secret keys, private tokens, and credentials on-device before any network transfer.
  • Executive Compliance Certification: Calculates security health grades (A+ to F) and exports OWASP Top 10 compliance audits in Markdown and JSON.
  • Secure Cloud Escalation with Firebase App Check: When developers request automated security regression unit test suites, only sanitized, secret-redacted payloads are escalated to Firebase Cloud Gemini, protected by App Check attestation and Remote Config policy enforcement.

How we built it

  • Frontend & Visual Architecture: React 19, TypeScript, Vite, Tailwind CSS with custom glassmorphism cyber tokens, and interactive Three.js 3D Fibonacci Particle Shield visualization.
  • On-Device AI Engine: Chrome Gemini Nano via Firebase AI Logic experimental browser APIs with automated structured prompt injection.
  • Cloud Backend & Security Attestation: Firebase Cloud Gemini (gemini-2.5-flash), Firebase App Check (reCAPTCHA Enterprise & Custom Provider), and Firebase Remote Config for real-time compliance rule sync.
  • Diff & Code Inspection: Integrated @monaco-editor/react side-by-side visual diff editor.

Challenges we ran into

  1. Deterministic Structured JSON from Gemini Nano: On-device models have strict token limits and variable response formatting. We engineered strict few-shot AST schema extraction prompts and an error-tolerant regex repair layer to ensure reliable output.
  2. Air-Gapped Secret Sanitization: Ensuring zero plaintext credentials ever leak required client-side regex tokenizers and synthetic masking before any cloud escalation call.
  3. Monaco Side-by-Side Lifecycle in React 19: Resolved editor widget disposal collisions during rapid tab switching and one-click AST patch application.

Accomplishments that we're proud of

  • Achieved sub-500ms audit latency with 0 bytes transmitted to any external server during on-device scans.
  • Implemented a complete end-to-end AST mitigation pipeline with real-time Monaco side-by-side visual diffing.
  • Delivered an executive OWASP Top 10 compliance report generator with one-click export.
  • Crafted a cohesive high-tech HUD experience featuring interactive 3D particle physics and live telemetry.

What we learned

  • Built-in browser silicon (Gemini Nano) is capable of enterprise-grade AST security triage when guided by structured prompt engineering.
  • Hybrid AI architectures offer the optimal combination: local silicon provides zero latency and absolute privacy, while cloud LLMs provide deep generation capabilities for complex regression test suites.

What's next for DevShield

  • VS Code & JetBrains IDE extensions using the same zero-egress hybrid architecture.
  • Pre-commit git hooks and local CI/CD CLI for air-gapped enterprise build environments.
  • Support for automated dependency vulnerability scanning via local OSV databases.

Built With

Share this project:

Updates

Submission history