DeepSec
Audits AI-generated code for hallucinated packages and missing safeguards, then automates authorized penetration testing end to end.
- Source repo
- Unclecheng-li/DeepSec
- Stars
- ★ 410
- Last updated
- 3mo ago
- FARS reviewed
- Sep 10, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 45/100 · Major gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformOpenAI API · Claude APIClaude.ai (Partial support)
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A team shipping AI-assisted backend code that must catch hallucinated dependency names and hardcoded secrets before merge.
- Not a fit if
- Teams looking for a vendor-hosted SaaS: DeepSec ships only as a self-run CLI, TUI and IDE plugins
- Testers without a written list of authorized targets: Spear only attacks entries in scope.json
- Maintenance
- Commits in the last 6 monthslast commit 2026-08-24
- Source review
- 45/100 · Major gaps
What does this agent do, and when should you use it?
DeepSec is a self-hosted AI security platform built from two halves: Shield, a code auditor for AI-generated code, and Spear, an authorization-gated pentest engine, both behind one Typer CLI, one Rust/ratatui terminal workbench and a set of IDE plugins. Shield detects in three tiers: L1 uses regex, entropy analysis and a seed catalog to flag hallucinated packages, hardcoded secrets and AI pattern errors under 50ms; L2 parses with Tree-sitter WASM AST for SQL injection, XSS, SSRF, path traversal and command injection under 2s; L3 calls an LLM for missing auth, rate limiting or validation semantics with a local heuristic fallback. Spear chains Recon → Explore → Fact → Reflect → Report → PoC with 40+ skill packs and five roles, but only executes against targets listed in scope.json, while private and loopback ranges are blocked through prohibited_cidrs. Findings export as text, JSON, SARIF, Markdown or HTML, and an embedded MCP Server exposes scanning to clients such as Claude Desktop and Cursor. The core is Python 3.10+ under MIT, installable from source or from prebuilt TUI binaries and a wheel in Releases.
deepsec shield scan <path> reads code tier by tier: L1 applies regex, entropy analysis and seed-catalog matching, L2 builds a Tree-sitter WASM AST, and L3 sends semantic questions to a provider such as DeepSeek, Claude, OpenAI or Ollama with a local heuristic fallback; --format sarif emits SARIF and --stream feeds the TUI. Companion commands include deepsec shield agent-audit <path> for agent configuration, deepsec shield supply-chain check . for dependency risk, and deepsec shield watch for continuous scanning. On the offense side, deepsec spear run <target> --authorized <scope.json> drives Recon → Explore → Fact → Reflect → Report → PoC, invoking nmap, dirsearch, subfinder, nuclei, sqlmap, ffuf, httpx and feroxbuster under five roles (pentester, redteam, auditor, blueteam, ctf_player), then writes Markdown/SARIF/JSON/HTML reports with attack-chain visualization. The Rust TUI offers a three-panel layout with slash commands such as /shield scan, /spear run, /scope add and /report, Plan/Agent/YOLO modes, Side-Git snapshots and session persistence. VSCode and JetBrains plugins publish live diagnostics and Quick Fixes over LSP, and MCPServer().run() exposes scanning and recon to MCP clients.
- A team shipping AI-assisted backend code that must catch hallucinated dependency names and hardcoded secrets before merge.
- A DevSecOps engineer already running SonarQube, Snyk, Semgrep or CodeQL who wants new findings as SARIF, deduplicated against existing alerts.
- An authorized red teamer who needs an auditable, time-bounded target whitelist before launching automated exploitation.
- A VSCode or JetBrains user who wants AI pattern errors surfaced inline with one-click Quick Fixes.
- A developer wiring scanning into an MCP client such as Claude Desktop or Cursor.
- An AI application developer doing a one-off audit of agent configuration files via agent-audit.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
pip install -edocker run --rm -v "$PWD:/workspace" deepsec:local shield scan /workspace
- Environment variables
DEEPSEEK_API_KEY- Config files
tui/Cargo.toml~/.deepsec/targets/scope.json./scope.json- Install notes cover
- Windows · Linux · Docker
How do you install or deploy this agent?
Install the Python core and CLI from source:
pip install -e .Optional components each need their own toolchain — Rust for the TUI, Node.js for the VSCode extension, Gradle for JetBrains.
# Rust TUI (optional)
cargo build --manifest-path tui/Cargo.toml
# VSCode extension: press F5 in the repo root to launch an Extension Development Host
npm install
npm run build
# JetBrains plugin (JetBrains 2025.2+)
cd jetbrains && ./gradlew buildPluginTo skip compilation, download deepsec-tui-windows.exe, deepsec-tui-linux or deepsec-0.2.0-py3-none-any.whl from Releases. Docker works for scanning too:
docker build -t deepsec:local .
docker run --rm -v "$PWD:/workspace" deepsec:local shield scan /workspaceL1 and L2 run offline; L3 and MCP-driven semantic checks need an LLM API key.
How do you use this agent?
Initialize the shared config and pick an LLM provider (only needed for L3).
deepsec config init
deepsec config set llm.provider deepseek
deepsec config set llm.api_key "sk-xxx"Run a Shield scan — offline L1+L2 first, then L3 or SARIF output when needed:
deepsec shield scan ./src
DEEPSEEK_API_KEY=... deepsec shield scan ./src --layer l3
deepsec shield scan . --format sarif --output deepsec.sarifBefore Spear will run, the target must exist in the scope whitelist's targets array:
deepsec scope verify ~/.deepsec/targets/scope.json
deepsec spear recon https://authorized-target.example --authorized ./scope.json
deepsec spear run https://authorized-target.example --authorized ./scope.jsonScope file layout (~/.deepsec/targets/scope.json):
{
"version": 1,
"targets": ["https://your-authorized-domain.com"],
"valid_from": "2026-07-26T00:00:00Z",
"valid_until": "2026-08-25T00:00:00Z",
"prohibited_cidrs": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8", "169.254.0.0/16"]
}Start the terminal workbench and drive scope plus pentest from slash commands; Plan mode is read-only, so switch to Agent or YOLO before arming Spear:
deepsec tui/scope add https://your-authorized-domain.com
/scope list
/spear run https://your-authorized-domain.com --authorized ~/.deepsec/targets/scope.jsonSafety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
What are this agent's strengths and limitations?
- Cost boundaries are explicit: L1 finishes offline in under 50ms, L2 uses Tree-sitter AST under 2s, and only the L3 semantic tier triggers LLM calls.
- Shield and Spear share one CLI, one TUI and one
~/.deepsec/config.yaml, so auditing and authorized pentesting do not need two separate toolchains. - Provider choice is broad — 13+ LLM backends including DeepSeek, Anthropic Claude, OpenAI, Zhipu GLM, Kimi, Qwen, SiliconFlow and Ollama — with a local heuristic fallback instead of vendor lock-in.
- The authorization gate is concrete rather than advisory: a
targetswhitelist,prohibited_cidrsblocking private/loopback/link-local ranges, and an optional validity window are all enforced before execution. - Findings export as text/JSON/SARIF/Markdown/HTML, and the VSCode, JetBrains and MCP Server surfaces let results flow into existing workflows.
- Primary documentation is Chinese-first; the migration design and TUI development docs are Chinese-only, so English readers must cross-read README_EN.md.
- The TUI, rust-lsp, VSCode and JetBrains plugins each need cargo, Node.js 22 or Gradle, making a full source build a multi-step process.
- Spear depends on external binaries (nmap, dirsearch, subfinder, nuclei, sqlmap and others); the README only lists per-tool version checks, not cross-platform install steps.
- Test coverage reported is modest — 23 Python tests and 41 Rust TUI tests passing — and no false-positive rate or benchmark accuracy for the L2/L3 detectors is published.
- Scope signing is relaxed by default:
signature/signerare kept but ignored, so strict verification requires exportingDEEPSEC_SCOPE_SIGNING_KEYand re-signing.
How does this agent compare with similar options?
The README explicitly mentions deduplicating with SonarQube, Snyk, Semgrep and CodeQL (the deepsec.dedupWithExistingTools VSCode setting), positioning those established SAST tools as coexisting neighbours. DeepSec's differentiators are detection aimed at AI-generated code (hallucinated packages), the L3 semantic tier, and a bundled authorized penetration engine; the repository offers no head-to-head accuracy or performance benchmarks against those tools.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| DeepSec This agent | 45 · Major gaps | CLIFree + model costs | ★ 410 | 3mo ago | Python | OpenAI API · Claude API |
| NeuroSploit | 39 · Major gaps | — | ★ 1.6k | today | Rust | OpenAI API · Claude API |
| HexStrike AI MCP | 36 · Major gaps | MCP serverFree | ★ 14k | 4mo ago | Python | Claude.ai |
| CyberStrike — Open-Source AI Penetration Testing & Red Team Platform | 39 · Blocked | CLIFree + model costs | ★ 3.9k | 1d ago | TypeScript | — |
How does FollowAgents rate this agent?
Why each dimension lost points
Spear ships an authorization whitelist, default prohibited_cidrs blocking private/loopback ranges, read-only Plan mode, and a Y confirmation gate — positive evidence. However, HMAC scope signing was explicitly relaxed to optional with signature fields ignored, weakening authorization integrity; YOLO full-auto mode lowers the confirmation bar; API key handling is only partially documented (VSCode SecretStorage). Deductions: relaxed signing, thin data-flow documentation.
CI covers Python/Node/Rust/JetBrains/Docker; but README claims ('23 tests passing', 'TypeScript clean') are unverifiable static assertions, and the dual-track config (legacy vibeguard.* settings, ~/.vibeguard default paths alongside deepsec.*) shows incomplete migration that can cause configuration ambiguity. Deductions: legacy/new config duality, unverifiable test claims.
Audience is clear (AI-code developers, authorized pentesters); five roles including a read-only auditor show capability boundaries; 13+ LLM providers show scenario breadth. Deductions: trigger precision (L1 regex false-positive rate) and cross-platform behavior rest on claims, not evidence.
Good documentation architecture: bilingual README, quickstart, architecture diagram, CLI reference, Docker. MIT license present and PyPI publishing uses trusted publishing (id-token). Deductions: LICENSE copyright line still says 'VibeGuard contributors' vs README's 'DeepSec contributors'; no CHANGELOG; naming residue (~/.vibeguard paths, vibeguard.* settings) uncleaned; no dedicated known-limitations section.
Strong usability surface: multi-format reports, IDE integration, snapshot/restore, a bundled vulnerable demo file for zero-risk evaluation. Deductions: core value claims (L1 <50ms, '2 seconds to findings', 40+ skill packs) are static assertions; marginal value vs existing tools (Semgrep/CodeQL) is not argued; LLM API cost is not discussed.
Demo file and CI workflows support partial rechecking; the release workflow binds tags to pyproject version. Deductions: performance figures, test-pass counts, and '40+ skill packs' are not traceable within the provided files, and fact/inference are not separated.
- Use Spear only against assets you own or are authorized in writing to test; scope signing is now optional, so the whitelist gate is only as strong as local file security.
- YOLO mode runs fully automatically — use in controlled environments; L3 semantic analysis sends code to external LLM providers, posing sensitive-code exfiltration risk.
- The repo carries VibeGuard→DeepSec migration residue (default ~/.vibeguard paths, inconsistent LICENSE copyright attribution); verify legacy vs new config precedence before use.
FAQ
Does it work fully offline?
Am I locked into DeepSeek?
Can Spear hit a target I have not authorized?
targets and refuses otherwise; private, loopback and link-local ranges are blocked by prohibited_cidrs by default.Is scope signing mandatory?
signature/signer are retained but ignored; only the targets whitelist and the optional time window are validated. For strict checking, export DEEPSEC_SCOPE_SIGNING_KEY and run deepsec scope sign.Can I run it in CI?
deepsec shield scan . --format sarif --output deepsec.sarif produces SARIF for an existing pipeline. The repo runs its own CI workflow but ships no packaged GitHub Action.Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.