Skip to content

Back to the catalog

blog.kubeek.comwriteup

deep scan tuto

Build log/tutorial for "Deep Scan," a PoC that pairs a deterministic security-scanning engine (20+ SAST/SCA/DAST scanners normalized into one Finding model, plus an AI-free code-graph engine doing taint/reachability analysis) with an agentic remediation loop exposed via an MCP server and three Claude Code skills (/security-eval, /security-patch, /security). The agent triages thousands of raw findings down to a prioritized P0–P3 plan, groups fixes into reviewable branches, and proves each fix with a demonstration test that safely calls an inert owner-operated canary endpoint instead of firing a real exploit (e.g., rm -rf /). The author also covers scaling via Docker Compose/Kubernetes+gVisor and the risk of running untrusted dependency-resolution code during scans.

TL;DR A solo-built PoC wires 20+ deterministic scanners into an MCP server so Claude Code agents can triage, prioritize, and auto-branch security fixes, proving each with a safe canary-endpoint exploit test instead of a live payload.
Document

What it is

Deep Scan, a PoC AppSec platform (deepscan-core / -cli / -mcp / -api) built as a uv workspace on Python 3.13. The blog post is its build log and tutorial, giving the concrete invocation and setup the summary omits. Explicitly a PoC: rough edges, no auth, much left to finetune.

How it works

Wrapped tools are downloaded pinned and SHA-256-verified rather than curl | bash-ed at runtime. Each scanner runs in a sandboxed subprocess, emits its native format (mostly SARIF), and is parsed into one Finding model. Findings deduplicate on the (location, message) key and render to six formats from one in-memory Report. A separate AI-free code-graph pass builds a call/data-flow graph and runs taint/reachability/choke-point analysis, flagging (not suppressing) findings no entry point can reach; a companion reachable-deps applies the same idea to SCA/CVEs.

What to do

Install and run:

uv sync
uv run deepscan tools install all   # pinned, checksum-verified binaries
uv run deepscan scan ./my-project
uv run deepscan scan http://127.0.0.1:3000

Static vs. dynamic mode is auto-detected. Reports land in reports/scan_<timestamp>_<mode>/report.{json,md,html,sarif}. As a CI gate:

uv run deepscan scan ./my-project --fail-on high   # exit 1 on any HIGH-or-above

Run the offline code-graph taint pass on its own:

uv run deepscan scan ./my-project --scanner analysis

Connect an agent by dropping an .mcp.json into the project (server runs at 127.0.0.1:8000):

{
  "mcpServers": {
    "deepscan": {
      "type": "http",
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

The agent then calls the same engine over MCP and opens one review branch per fix, each with a test proving the vulnerability is closed.

Caveats

The author is explicit that "deterministic" does not mean "correct" — the wrapped scanners over-report and produce false positives by design; the agentic triage half exists precisely because of that noise. The code-graph engine is described as work-in-progress. No authentication on the MCP/API surface, so keep it bound to localhost.

Techniques named here

  • SQL injection
  • Command injection
  • Taint analysis / reachability analysis
  • Software Composition Analysis reachability
  • Finding triage and prioritization
  • Automated remediation via branch-per-fix
  • Safe exploit demonstration via canary endpoints
  • Sandboxed/isolated scanning of untrusted code