Senshi (戦士)
AI-powered SAST + DAST security scanner for bug bounty hunters
Senshi uses LLMs to generate context-aware payloads, analyze responses intelligently, eliminate false positives, and chain findings into exploitable attack paths — all from a single CLI.
Created by Manthan Ghasadiya — creator of mcpsec (4 CVEs including CVSS 10.0) and igris.
Why Senshi?
Traditional scanners fire generic payloads and drown you in false positives. Senshi is different:
- 🧠 AI-First — LLMs generate payloads tailored to the target's tech stack and context
- 🚫 FP Elimination — A skeptical 2nd-pass AI reviewer slashes false positives
- 🔗 Chain Builder — Links individual findings into high-impact exploit chains
- 📋 Bounty Reports — LLM writes your HackerOne/MSRC submission for you
- 🔌 Provider Agnostic — DeepSeek, OpenAI, Groq, Ollama, Anthropic — your choice
Features
| Feature | Description |
|---|---|
| Autonomous Pentesting | Think \u2192 Act \u2192 Observe LLM agent loop with browser execution |
| DAST | Crawl, probe, inject, and analyze live endpoints |
| SAST | Deep source code analysis with multi-language support |
| 10+ DAST Scanners | XSS, SSRF, IDOR, SQLi, CMDi, SSTI, Open Redirect, Auth bypass, Deserialization, Info Disclosure |
| 5 SAST Scanners | Injection, Auth, Crypto, Config, AI pattern detection |
| Auto-Recon | Endpoint discovery, JS analysis, tech fingerprinting |
| Browser Recon & Testing | Headless Chromium captures traffic and confirms vulnerabilities via Playwright |
| Smart Routing | Scanners only run on relevant endpoints (~2x speedup) |
| Batch Analysis | 1 LLM call per endpoint per scanner (~6x fewer API calls) |
| Progressive Save | Results saved to disk as found \u2014 Ctrl+C preserves findings |
| 4 Output Formats | JSON, Markdown, SARIF (CI/CD), Bounty Report |
Installation
pip install senshi
Or from source:
git clone https://github.com/manthanghasadiya/senshi.git
cd senshi
pip install -e ".[dev,browser,websocket]"
Quick Start
1. Set your API key
export DEEPSEEK_API_KEY="sk-..."
# or: export OPENAI_API_KEY="sk-..."
# or: export GROQ_API_KEY="gsk_..."
2. Scan
# Autonomous Black-Box Pentest (v0.5.0)
senshi pentest https://target.com --provider deepseek --browser --verbose
# DAST \u2014 scan live targets
senshi dast https://target.com --provider deepseek
# With auth + Burp proxy
senshi dast https://target.com/api \
--auth "Cookie: session=abc" \
--proxy http://127.0.0.1:8080
# Specific scanners only
senshi dast https://target.com --modules xss,ssrf,injection
# SAST — analyze source code
senshi sast ./my-project
senshi sast https://github.com/user/repo.git
# Recon only
senshi recon https://target.com --depth 3
# Browser-based recon (captures XHR/fetch traffic)
senshi recon https://target.com --browser --output endpoints.json
# DAST with pre-discovered endpoints
senshi dast https://target.com --endpoints endpoints.json
# Generate payloads
senshi payloads --vuln xss --target "POST /api/chat" --param message
# Generate bounty report from findings
senshi report findings.json --platform hackerone --output report.md
CLI Reference
| Command | Description |
|---|---|
senshi pentest <url> |
Run autonomous pentest agent |
senshi dast <url> |
Scan live web endpoints |
senshi sast <path> |
Analyze source code (dir, git URL, or zip) |
senshi recon <url> |
Discover endpoints (no scanning) |
senshi payloads |
Generate payloads for manual testing |
senshi report <file> |
Generate bounty report from findings JSON |
senshi config |
Configure API keys and settings |
| Scanner | Vulnerability Types |
|---|---|
ssti |
Template injection (Jinja, Twig, etc.) |
deserialization |
Insecure object handling (Java, PHP, Python) |
cmdi |
OS Command Injection (Unix/Windows) |
sqli |
SQL Injection (Error, Boolean, Blind) |
xss |
Reflected, context-aware payload testing |
ssrf |
Cloud metadata & OOB callbacks |
idor |
Parameter manipulation & resource enumeration |
auth |
Missing auth on sensitive endpoints |
open_redirect |
Unvalidated external redirections |
info_disclosure |
Regex-based secret detection |
SAST Scanners
| Scanner | Focus |
|---|---|
| Injection | SQLi, command injection, SSRF, path traversal in code |
| Auth | Hardcoded creds, missing auth checks, broken access control |
| Crypto | Weak hashing (MD5/SHA1), hardcoded keys, insecure random |
| Config | Debug mode, CORS misconfiguration, missing security headers |
| AI | Prompt injection sinks, unsafe eval of LLM output |
Output Formats
- JSON — Machine-readable, re-importable with
senshi report - Markdown — Human-readable with severity indicators and evidence blocks
- SARIF — CI/CD integration (GitHub Code Scanning, Azure DevOps)
- Bounty Report — LLM-written submission tailored to your platform
Supported LLM Providers
| Provider | Environment Variable | Default Model |
|---|---|---|
| DeepSeek | DEEPSEEK_API_KEY |
deepseek-chat |
| OpenAI | OPENAI_API_KEY |
gpt-4o-mini |
| Groq | GROQ_API_KEY |
llama-3.3-70b-versatile |
| Ollama | — (local) | llama3.1 |
| Anthropic | ANTHROPIC_API_KEY |
claude-3.5-sonnet |
Architecture
Architecture
Senshi operates on an autonomous Think \u2192 Act \u2192 Observe loop, building context across iterations:
graph TD
Start([senshi pentest]) --> Recon[Automated Recon]
Recon --> Loop
subgraph Agent Loop
Loop((Pentest Context)) --> Think[AgentPlanner: Decide Next Action]
Think --> Act[ActionExecutor]
Act --> Scanners[DAST Scanners]
Act --> Browser[Browser Exploiter]
Act --> Custom[IDOR / WS / Auth]
Scanners --> Observe[Analyze & Update Context]
Browser --> Observe
Custom --> Observe
Observe --> Loop
end
Think -->|Task Complete| PoC[PoC Generation]
PoC --> Report([Final Report & Chains])
Development
git clone https://github.com/manthanghasadiya/senshi.git
cd senshi
pip install -e ".[dev]"
# For browser recon support
pip install -e ".[browser]"
playwright install chromium
pytest tests/ -v
See CONTRIBUTING.md for details.
Legal
[!CAUTION] Senshi is intended for authorized security testing only. Only scan targets you have explicit written permission to test. Unauthorized scanning is illegal. See SECURITY.md.
License
MIT License — see LICENSE for details.
Release files for senshi 0.6.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| senshi-0.6.8.tar.gz | 148.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| senshi-0.6.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 343.7 kB
Release files / senshi-0.6.8.tar.gz
| Download URL | senshi-0.6.8.tar.gz |
|---|---|
| Size | 148.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcc2b8afb8f7613b75703671b87a81cd54f73578aef6737680065ab5116ad8fc
|
|
BLAKE2b-256 checksum How to use checksums |
3d170c7c9453a91f5a72a6d9630c899e2d709f882459dba2bf42ca67175e62b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / senshi-0.6.8-py3-none-any.whl
| Download URL | senshi-0.6.8-py3-none-any.whl |
|---|---|
| Size | 195.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d70029a9088988548be29d83d5bd1d0911e449c502ac279170d0cbb7d7f84b5
|
|
BLAKE2b-256 checksum How to use checksums |
0f63de56c803d669e5da1c1bd93d584411478cdad87ea5ed11d050a2c32bd596
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|