Every engineering team has felt the fatigue of classic static application security testing (SAST). You run a scan across a repository, and five minutes later you are staring at a multi-hundred-item CSV filled with theoretical edge cases, dead paths, and outright hallucinations. Triage becomes a full-time job of proving tools wrong rather than fixing real flaws. Offensive security firm SecureLayer7 is attacking this exact bottleneck with Sandyaa Open Source Autonomous Security Bug Hunter, an MIT-licensed engine designed to replace statistical guesswork with recursive verification and automated proof generation.
Instead of throwing unvalidated warnings over the wall, Sandyaa traces end-to-end data flows, confirms reachability from untrusted sources, and writes verifiable proof-of-concept (PoC) harnesses to validate its findings.
The Eight-Phase Recursive Pipeline
Traditional scanners parse Abstract Syntax Trees (ASTs) in a single linear pass. Sandyaa flips this workflow on its head by implementing what SecureLayer7 terms a RecursiveLM architecture.
When pointed at a local directory or remote Git URL, the engine initiates an automated multi-stage loop. It does not require interactive prompting. Instead, it breaks down the target codebase into density-aware chunks, managing token constraints dynamically while repeatedly circling back over execution paths to refine its deductions.
The entire analysis lifecycle is structured into eight recursive phases:
- Call-Chain Tracing: Mapping the execution tree across multiple files and modules.
- Data-Flow Expansion: Tracking how untrusted variables traverse internal boundaries.
- Self-Verification: Stress-testing internal hypotheses about discovered anomalies.
- Vulnerability Chaining: Determining if minor weaknesses can be linked into high-impact vectors.
- PoC Refinement: Synthesizing isolated Python scripts tailored to replicate the failure state.
- Contradiction Detection: Actively hunting for conflicting logic in the codebase that would invalidate an exploit.
- Assumption Validation: Confirming that environmental prerequisites actually hold true.
- Exploitability Proof: Validating the end-to-end viability of the security flaw.
To keep noise levels near zero, an isolated attacker reachability analyzer intercepts findings before they progress. If a potentially dangerous function sink cannot be triggered by external, untrusted input, Sandyaa discards it entirely.
Comprehensive Vulnerability Coverage
Sandyaa targets a wide surface area across modern system architectures and application stacks:
| Vulnerability Category | Detected Vulnerability Examples |
|---|---|
| Memory Safety | Use-after-free, buffer overflow, type confusion, double-free |
| Business Logic | Authentication bypass, TOCTOU, state machine errors |
| Injection | SQL, command, XSS, SSRF, path traversal |
| Cryptographic Misuse | Cryptographic implementation and usage flaws |
| Race Condition | Concurrency races |
| Integer | Integer overflow, signedness issues |
| Unsafe APIs | Deserialization, XXE, prototype pollution |
Tipping the Verification Balance
For static analysis tools, trust is earned through precision. Kamble, CTO at SecureLayer7, points out that the team withheld Sandyaa from live environments until the verification pipeline matured. The objective was practical: push the false-positive rate low enough that triaging the tool's output became significantly faster than auditing raw source code manually.
That verification threshold has already borne fruit in production open-source ecosystems. Sandyaa uncovered two independently disclosed security vulnerabilities inside the Spring AI project:
- A SQL injection residing in
metadataStore - A JSONPath injection located within
AbstractRetriever
Each valid discovery yields a dedicated artifact directory inside a poc folder. Rather than an ambiguous alert message, the developer receives an analysis breakdown, a Python PoC, step-by-step setup documentation, and a README.md that maps every deduction directly to exact file paths and source lines.
Safe PoC Execution and Credential-Free Auth
Giving an automated system the ability to construct and run exploits against a local environment introduces obvious operational risks. Sandyaa addresses this through strict structural guardrails:
- Execution Guardrails: Dynamic PoC execution is strictly opt-in and disabled by default.
- Pre-Execution Reachability Checks: The reachability analyzer executes before any exploit generation begins, guaranteeing computational cycles are never wasted synthesizing PoCs for dead code paths.
From a developer tooling perspective, Sandyaa avoids the friction of managing separate API tokens. The engine piggybacks directly onto an active Claude Code CLI session. Once a developer logs into Claude Code CLI locally, Sandyaa reuses the underlying authentication state.
For workloads delegating specific phases to Gemini, Sandyaa interfaces with the system's native gcloud CLI binary in the user's PATH without additional configuration keys. The GEMINI_API_KEY environment variable is reserved exclusively for model tier resolution during initial startup.
Under the Hood: Recursive Language Model Architecture
The core driver behind Sandyaa is the RecursiveLM subsystem. To operate beyond the limits of standard context windows, the architecture utilizes a Python REPL (Read-Eval-Print Loop) environment.
+-------------------------------------------------------------+
| RecursiveLM Loop |
| |
| +--------------+ +------------------+ |
| | Repository | ---> | Python REPL | |
| | Source Tree | | (Regex & Chunks) | |
| +--------------+ +------------------+ |
| | |
| v |
| +--------------------+ |
| | Sub-LLM Queries | |
| +--------------------+ |
| | |
| v |
| +-----------------------------------------------------+ |
| | Context Fusion & Contradiction / Reachability Checks| |
| +-----------------------------------------------------+ |
| | |
| v |
| +-----------------------------------------------------+ |
| | Verified `poc/` Artifact | |
| +-----------------------------------------------------+ |
+-------------------------------------------------------------+
Through this REPL, the engine dynamically executes regex filters, segments files according to contextual boundaries, and dispatches focused sub-queries. The returned data is continuously fused back into the central context, allowing Sandyaa to audit massive codebases with sustained precision.
Runtime Requirements & Setup
Sandyaa is open source and hosted on GitHub under the MIT license.
System Prerequisites
- Runtime: Node.js v18+
- Version Control:
git - Authentication: Claude Code CLI (installed and authenticated)
- OS Support: Actively tested on macOS. Linux environments are compatible though unvalidated; Windows requires WSL2 due to native Unix command dependencies and direct Claude CLI process spawning.
Configuration is handled through a straightforward config.json file:
json{ "target_path": "./src", "chunk_size": 2048, "min_severity": "medium", "exploitability_threshold": 0.8, "output_options": { "dir": "poc" } }
By coupling recursive context expansion with strict reachability validation, Sandyaa marks a clear transition away from noisy, speculative static analysis toward verifiable, reproduction-first vulnerability auditing.
