Why We Built an Offline AST Security Gate That Reviews PRs in 16ms
Every developer has experienced SAST alert fatigue. You open a pull request with 30 lines of business logic, and the security scanner spits out 45 warnings: "Missing function docstring" "Variable name too short" "Line
Every developer has experienced SAST alert fatigue.
You open a pull request with 30 lines of business logic, and the security scanner spits out 45 warnings:
- "Missing function docstring"
- "Variable name too short"
- "Line exceeds 88 characters"
- "Potential vulnerability in unused test mock"
Developers quickly learn to ignore these alerts. And then, a real SQL injection or hardcoded Stripe secret slips into main because the real danger was buried under 400 lines of noise.
That is why we built Kavach AI.
rajrajak99
/
kavach-ai
π‘οΈ Autonomous sub-16ms AST security gate with 0% false positives & 1-click surgical auto-patching for PRs
π‘οΈ Kavach AI
Autonomous High-Precision Code Armor & 1-Click Surgical Patcher
Kavach AI is an autonomous, high-speed static security inspector and surgical code repair engine. Operating like an impenetrable armor across your GitHub Pull Requests (CI/CD), local CLI, VS Code editor, and Web Console, it eliminates critical security hazards (CWE-89 SQLi, CWE-798 Secret Leaks, CWE-120 Buffer Overflows) and generates 1-click ready-to-merge patches with zero-regression self-healing verification.
β‘ Core Philosophy: Zero-Noise Precision
Most static code scanners overwhelm developers with hundreds of stylistic warnings (missing docstrings, trailing whitespace). Developers end up ignoring them.
Kavach AI operates on a strict zero-noise policy:
-
Ignores Noise: Lockfiles (
package-lock.json,poetry.lock), minified bundles, images, and formatting diffs are discarded automatically. -
Flags Real Hazards Only:
- π‘οΈ Hardcoded Credentials & Tokens (CWE-798): AWS keys, GitHub PATs, OpenAI/Stripe secret keys in Python and JavaScript.
- π‘οΈ Raw SQL Injections (CWE-89): Raw string interpolation inside queries.
- π‘οΈβ¦
π‘οΈ The Philosophy: 0% False Positives or Nothing
We set 3 strict engineering constraints:
- Sub-16ms Execution: Must run instantly inside your GitHub runner without external API latency.
- 0% Noise Policy: Only deterministic AST matches for critical hazards (CWE-89 SQLi, CWE-798 Secret Leaks, CWE-78 Command Injections). If it's not a verified vulnerability, we don't flag it.
- 1-Click Self-Healing: Instead of telling developers "Go fix this yourself", Kavach generates native GitHub commit suggestions that team leads can merge in 1 click right from the PR review UI.
β‘ Benchmark: 105,000 Lines of Code in 46 Seconds
We ran Kavach AI against an enterprise codebase of 105,024 lines of Python across 100 modules:
- Scan Duration: 46.7 seconds
- Throughput: 2,249 LOC / second
- Peak RAM: 6.50 MB
- False Positives: 0.0%
π 30-Second Setup in GitHub Actions
You don't need an account, an API key, or a credit card. Just drop this into .github/workflows/kavach.yml:
yaml
name: Kavach AI Security Review
on: [pull_request]
permissions:
contents: read
pull-requests: write
jobs:
kavach:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rajrajak99/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}S
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.
