Autonomous Code Inspection Across CI/CD and Local Workflows
Kavach AI functions as an autonomous static security inspector and surgical code repair engine. It operates across GitHub Pull Requests, CI/CD pipelines, local CLI, VS Code, and Web Console to eliminate critical security hazards including SQL injection, hardcoded credentials, and buffer overflows. Unlike conventional scanners that generate noisy stylistic warnings, Kavach AI focuses exclusively on real vulnerabilities.
Zero-Noise Filtering: What Kavach AI Discards Automatically
Kavach AI applies a strict zero-noise policy. Lockfiles such as package-lock.json and poetry.lock, minified bundles, images, and formatting diffs are discarded automatically. The engine flags only real hazards, ignoring cosmetic issues that typically cause developers to override scanning tools.
Five Hazard Categories Detected with Precision
Hardcoded Credentials & Tokens (CWE-798): The engine identifies AWS keys, GitHub personal access tokens, and secret keys for OpenAI, Stripe, and other services in Python and JavaScript code.
Raw SQL Injections (CWE-89): Detection targets raw string interpolation within database queries, a common vector for injection attacks.
Arbitrary OS Command Injection (CWE-78): The system flags untrusted shell inputs passed to os.system or child_process.exec, which can enable remote command execution.
Fatal Runtime Exceptions (CWE-369, CWE-95): ZeroDivisionError crashes and dynamic eval() execution are classified as critical runtime risks.
Resource Descriptor Leaks (CWE-775): Unmanaged open() handles missing with context managers are identified as medium-severity resource leaks.
From Detection to 1-Click GitHub Patches
When the analyzer detects a vulnerability, it outputs native GitHub markdown suggestion blocks. Team leads can merge these patches in a single click within the GitHub UI, eliminating the need for manual fix composition.
100% Offline Engine for Code Privacy
The engine runs entirely offline and in-memory. No code snippets, metadata, or project data are transmitted to third-party cloud services or LLM vendors. The tool can operate within a GitHub runner, a virtual private cloud, or on a local developer workstation, supporting air-gapped deployments. This architecture enables SOC 2 and ISO 27001 compliance by providing deterministic static checks without third-party data processing agreements.
Benchmarked Against Traditional Scanners on 105K Lines
Testing on an enterprise codebase of 105,024 lines of Python across 100 modules produced the following results:
| Metric | Kavach AI (v1.4.1) | Traditional Scanners (Bandit / Flake8) | Cloud SAST (Snyk / SonarQube) |
|---|---|---|---|
| Scan Duration (105k LOC) | 46.7 seconds | 12.4 seconds | 3+ minutes (cloud queue) |
| Throughput | 2,249 LOC/second | ~8,000 LOC/sec (regex only) | Cloud-limited |
| Peak Engine RAM | 6.50 MB | 45 MB | Cloud infrastructure |
| False Positive Rate | 0.0% (zero noise) | 28%–35% false alarms | 15%–25% |
| 1-Click Auto-Remediation | YES (surgical AST patches) | NO (error logs only) | NO (manual developer work) |
| Cloud Dependency | ZERO (100% offline) | Local | Mandatory cloud upload |
Integrating Kavach AI Into Any Repository
A GitHub Actions workflow can be added in 30 seconds by creating .github/workflows/kavach.yml with the provided YAML configuration. The workflow triggers on pull requests and pushes to main, master, and dev branches. Each scan inspects the changeset in under 0.05 seconds without external network latency. The tool posts an official PR review comment with exact line numbers and 1-click GitHub commit suggestions. The step summary includes executive metrics and CWE classifications. The CI status check fails if critical vulnerabilities are detected, blocking the merge.
For local use, the repository can be cloned and requirements installed with pip install -r requirements.txt. A directory can be scanned with python cli.py ./my-project --patch kavach.patch, and the resulting patch applied via git apply kavach.patch. A Streamlit user interface runs with streamlit run app.py, accessible at http://localhost:8502. The pytest suite runs with pytest -o pythonpath=. tests/kavach-ai/.
CWE Classifications and Automatic Remediation Rules
| CWE ID | Vulnerability Class | Language | Severity | Kavach AI Remediation |
|---|---|---|---|---|
| CWE-798 | Hardcoded Credentials & Tokens | Python / JS | Critical | Moves secrets to environment variables |
| CWE-89 | SQL Injection (Raw formatting) | Python / JS | Critical | Converts to parameterized queries |
| CWE-78 | OS Command Injection | Python / JS | High | Converts string interpolation to discrete arrays |
| CWE-95 | Arbitrary Code Execution (eval) | JavaScript | Critical | Replaces with strict JSON parser |
| CWE-775 | Unmanaged Resource Descriptor | Python | Medium | Enforces with open(...) context manager |
| CWE-369 | Unchecked Zero Division | Python | High | Inserts defensive conditional guard |
The software is licensed under the PolyForm Noncommercial License 1.0.0. Community use is free forever for individuals, students, open-source projects, and noncommercial research. Commercial deployment, SaaS hosting, or redistribution requires a commercial license. Enterprise licensing inquiries should be directed to Raja Rajak at rajabhaiyarajak2008@gmail.com. Copyright 2026 Raja Rajak.