Don't just review your code. Try to break it.
AI-powered edge-case investigation and verification agent for developers.
EdgeGuard is an AI investigation agent built as a VS Code extension. Unlike general-purpose chatbots and code review assistants that offer vague suggestions, EdgeGuard operates on a single rigorous premise:
"Try to break this code before production does."
EdgeGuard extracts deep structural and semantic context from your methods, screens for risk characteristics, models execution paths, synthesizes concrete counterexample data, generates runnable verification proof tests, and proposes defensive fixes with interactive diff inspection.
Reasoning βββ> Evidence βββ> Counterexample βββ> Verification βββ> Confirmation
Since EdgeGuard is currently in active development, you can install it manually via the .vsix package included in this repository.
π₯ Download EdgeGuard-0.6.0.vsix
How to install in VS Code:
- Click the download link above and hit the Download icon on GitHub to save the
.vsixfile. - Open VS Code and navigate to the Extensions view (
Ctrl+Shift+Xon Windows/Linux,Cmd+Shift+Xon Mac). - Click the
...(Views and More Actions) icon at the top right of the Extensions panel. - Select "Install from VSIX..." from the dropdown menu.
- Locate and select the downloaded
EdgeGuard-0.6.0.vsixfile. - Reload VS Code if prompted, and you are ready to hunt bugs!
EdgeGuard is an actively developed open-source project.
- C# / .NET
- Java
- TypeScript / JavaScript
The current release focuses on:
- Deterministic static risk screening
- Security taint analysis
- AI-assisted edge-case investigation
- Counterexample synthesis
- Executable verification proof tests
- Defensive fix suggestions with interactive diffs
EdgeGuard is designed to distinguish evidence from assumptions. False positives and incomplete data-flow paths are possible, especially when analyzing complex or externally dependent code.
When automatic proof cannot be established, findings are classified as LIKELY BUG or INCONCLUSIVE rather than being presented as confirmed defects.
EdgeGuard strictly separates facts from assumptions:
-
Evidence-Based Verdicts:
- π΄
CONFIRMED BUGβ Proven via automated verification test execution that reproduces the expected defect. - π
LIKELY BUGβ High-confidence risk supported by code evidence, concrete counterexample data, or deterministic taint data-flow trace. - π‘
INCONCLUSIVEβ Potential risk flagged, but unverified due to external dependencies or incomplete context. - π’
SAFEβ Method analyzed across boundary conditions with no defects discovered.
- π΄
-
Fail-Safe Dual-Engine Protection: Deterministic Security Taint Analysis & Static Edge-Case Heuristics execute alongside deep LLM reasoning. Even during network timeouts or when an LLM returns a false
SAFE, critical vulnerability patterns remain detectable through deterministic analysis. -
Zero Unsolicited Code Changes: EdgeGuard never mutates your code silently. Fixes are previewed via side-by-side diffs and require explicit developer confirmation.
EdgeGuard provides four distinct verification scopes to match your workflow:
[ π‘ EdgeGuard ] (Inline CodeLens) ββ> Verify Function
Command Palette / Sidebar UI ββ> Verify File | Verify Module | Verify Project
-
Verify Function (Inline CodeLens & Command):
- Click the
[ π‘ EdgeGuard ]CodeLens directly above any method in Java, TypeScript, JavaScript, or C# to verify that specific function immediately.
- Click the
-
Verify File:
- Discovers and analyzes all functions defined within the active editor file.
-
Verify Module:
- Detects project and module boundaries automatically (
pom.xml/build.gradlefor Java,.csprojfor C#,package.json/tsconfig.jsonfor TypeScript/JavaScript) and screens all enclosed source files.
- Detects project and module boundaries automatically (
-
Verify Project:
- Scans and screens all supported source files across the entire workspace.
To eliminate cross-language interference and prompt regressions, each language is fully isolated into its own self-contained module:
src/languages/
βββ types.ts # Common LanguageModule contract
βββ moduleRegistry.ts # LanguageModuleRegistry (Resolves Java / C# / TS)
βββ java/ # Dedicated Java Subsystem (Spring, Servlet, JDBC)
βββ csharp/ # Dedicated C# Subsystem (ASP.NET Core, EF Core, LINQ)
βββ typescript/ # Dedicated TypeScript Subsystem (Express, Node, Prisma)
| Language | AST & Context Parser | Failure Modes & Security Vulnerabilities | Verification Tests |
|---|---|---|---|
| Java | JavaParser & JavaContextProvider |
SQL Injection (JDBC, Statement.execute), Command Injection, Path Traversal, NullPointerException (items[0]), Collectors.toMap duplicate keys, SQL LIKE wildcards. |
JUnit 5 |
| C# (.NET) | CSharpParser & CSharpContextProvider |
SQL Injection (FromSqlRaw, SqlCommand), XPath Injection (SelectSingleNode), Command Injection, Path Traversal, LINQ multiple enumeration, ToDictionary duplicate keys, .Result deadlocks. |
xUnit (.NET) |
| TypeScript / JS | TypeScriptParser & TypeScriptContextProvider |
Template-literal SQL Injection (db.query), Command Injection (child_process.exec), Path Traversal, XSS, unhandled JSON.parse, missing await, unsafe array mutations (sort()). |
Mocha / Assert |
When verifying large modules or entire projects with hundreds of functions, individual LLM calls for every function do not scale. EdgeGuard employs an ultra-fast, local Static Risk Screening stage prior to deep investigation.
In local benchmarks, the screening stage can process 150+ functions in under 20ms with 0 LLM cost.
Discover Functions (e.g. 167 functions)
β
Static Risk Screening (Local AST & Heuristics, < 20ms)
β
Prioritization:
β’ 23 HIGH PRIORITY
β’ 51 MEDIUM PRIORITY
β’ 93 LOW PRIORITY
β
Developer Choice:
[ Investigate High Priority (23 functions) ] (Default)
[ Investigate All Functions (167 functions) ]
β
Fail-Safe Dual Analysis Pipeline (Taint + Heuristics + LLM)
β
Verification Proof Test & Defensive Patching
src/
βββ ui/
β βββ codeLensProvider.ts # Inline [ π‘ EdgeGuard ] CodeLens
β βββ findingsViewProvider.ts # Webview sidebar panel (Vietnamese UI)
βββ verification/
β βββ targetResolver.ts # Scope target resolver (Function, File, Module, Project)
β βββ scopeManager.ts # Unified execution manager (batching, prioritization, progress)
β βββ testGenerator.ts # Multi-language verification proof test generator
β βββ testRunner.ts # Test execution runner and verdict promoter
βββ analysis/
β βββ analysisEngine.ts # Fail-safe analysis coordinator
β βββ riskScreener.ts # Static risk screener and priority classifier
β βββ taint/ # Deterministic Security Taint Analysis Engine
β βββ securityTaintAnalyzer.ts
β βββ adapters/ # Language-specific taint adapters (Java, C#, TS)
βββ languages/ # Decoupled polyglot language modules
β βββ java/ # Java prompt, rules, tests, and fixes
β βββ csharp/ # C# prompt, rules, tests, and fixes
β βββ typescript/ # TypeScript prompt, rules, tests, and fixes
βββ context/
β βββ contextRegistry.ts # Context provider dispatcher
β βββ javaContextProvider.ts # Java context & AST parser
β βββ csharpContextProvider.ts # C# context & AST parser
β βββ typeScriptContextProvider.ts # TypeScript context & AST parser
βββ providers/llm/
β βββ modelRegistry.ts # Model catalog, pre-flight validation & discovery
β βββ geminiClient.ts # Google Gemini API client
β βββ anthropicClient.ts # Anthropic Claude API client
β βββ openaiClient.ts # OpenAI & compatible endpoint client
β βββ openrouterClient.ts # OpenRouter multi-model client
βββ fixes/
β βββ fixAdvisor.ts # Defensive patch advisor
β βββ diffViewer.ts # Side-by-side diff provider
βββ storage/
βββ secretStorage.ts # Encrypted API key storage
βββ cacheManager.ts # Document-change aware analysis cache
EdgeGuard is continuously tested against industry-standard vulnerable applications and large-scale architectures to evaluate detection quality, real-world behavior, and stability during static screening.
You can clone these repositories and test EdgeGuard yourself:
-
TypeScript / Node.js: OWASP/Juice Shop β Successfully screened 1,100+ functions, identifying critical
PATH_TRAVERSAL(CWE-22) and injection-related findings without overwhelming the LLM. -
C# / .NET: dotnet-architecture/eShopOnWeb β Tested against an enterprise-style architecture, with local static risk screening completing in under 20ms in benchmark runs and identifying Data Access and API surface risks.
-
Java: OWASP/Benchmark β Tested against complex taint flows, nested helper classes, raw JDBC SQL, and Command Injection patterns.
These projects are provided as practical test targets so developers can independently evaluate EdgeGuard against real-world and security-focused codebases.
MIT License. See LICENSE.txt for details.