AIToday
AI Coding AssistantsOpen-Source AIHacker NewsPublished: Jul 25, 2026, 19:00 JST

getdebug 0.4.0 adds Python AI-app security patterns, outperforms generic SAST tools

getdebug 0.4.0 adds Python AI-app security patterns, outperforms generic SAST tools

3 Key Points

  1. What happened

    getdebug CLI 0.4.0 released Python regex-based prefilters for five AI-app anti-patterns (prompt-injection, unsafe-role-merge, pii-in-prompt, unbounded-stream, unsafe-tool-output) alongside existing JS/TS detection. The tool runs deterministically with no LLM call, in milliseconds, at zero cost.

  2. Why it matters

    In a benchmark against Bandit, Semgrep, and vulnhuntr on real code (Simon Willison's 49-file llm CLI), getdebug surfaced 6 AI-app-specific findings while Bandit returned 1,228 noise alerts (mostly assert_used warnings on pytest) and Semgrep found 3 generic hits with no AI-app coverage. Vulnhuntr selected zero files because it targets web-app entry points, not CLIs. For teams shipping Python apps that call LLMs, getdebug fills a gap the general-purpose security tools don't address.

  3. What to watch

    getdebug also offers optional local-LLM SAST via Ollama (free, on-device) and hosted Claude-based scanning (paid). A newer version (0.5.5) introduced a stricter detector that now flags one previously-safe fixture as a critical issue, signaling the tool is still tightening its allowlist logic. Benchmark corpus and methodology are open on GitHub (CodeSecBench) and at getdebug.dev/bench; PRs welcome.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

getdebug is addressing a genuine blind spot in the open-source security-linting landscape. Bandit and Semgrep are mature, widely-used tools designed for general Python security and cross-language SAST respectively; they excel at catching SQL injection, unsafe deserialization, and missing integrity checks. But neither was built to understand LLM-specific risks—serializing user objects into prompts, streaming without timeouts, merging incompatible role fields in message arrays. The benchmark reveals the cost of that generality: Bandit's 1,228 assert_used warnings on a 49-file codebase are noise for most production environments, and Semgrep's three findings are real but generic, not AI-app specific.

vulnhuntr, positioned as the category leader for LLM-driven AI-app analysis, takes a different approach by invoking an LLM to infer entry points and vulnerabilities. The tradeoff is scope: it selects files based on web-app heuristics, leaving CLI tools unanalyzed. getdebug's regex-based layer sidesteps that by running on any Python that touches an LLM SDK, whether web or command-line. The trade-off in the other direction is that hand-written regex patterns can miss novel attack surfaces that an LLM might infer; the tool's designers acknowledge this and invite open community feedback.

The public benchmark methodology and open-source corpus (CodeSecBench on GitHub) set a high bar for transparency. In the real-world test on simonw/llm, getdebug's seven findings included two that depend on threat model (prompt-injection between two CLI-user inputs in a single-user tool) and role-merge logic routed through API responses rather than request input. The tool surfaces everything flagged, lets teams triage via .getdebug-ignore files, and acknowledges the borderline cases—a stance that trades off noise reduction for completeness.

FAQ
How does getdebug detect AI-app vulnerabilities without calling an LLM?
getdebug 0.4.0 uses deterministic regex patterns that match SDK idioms—for example, it looks for tool_call.input.X references reaching a shell=True sink in subprocess.run(), or messages arrays with system-role prompts containing user-supplied variables. These patterns require zero LLM calls and run in milliseconds at no cost.
Why did vulnhuntr find nothing on the test repo?
vulnhuntr's file-selection heuristic targets network-exposed entry points (web apps), not CLIs. Since simonw/llm is a command-line tool, vulnhuntr selected zero files to analyze. It is not broken—just scoped to a different target than getdebug, which runs on any Python touching an LLM.
What does getdebug catch that Bandit and Semgrep don't?
Bandit and Semgrep both fired on a safe pattern where subprocess.run(shell=True) was called on an allowlisted value, not model output. getdebug's regex requires the tool_call.input.X reference to appear in the sink argument, avoiding that false positive. Both tools also miss four behavioural categories entirely: pii-in-prompt, unsafe-role-merge, prompt-injection, and unbounded-stream—patterns specific to LLM-calling apps.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleSouth Korea launches AI cooperation plan as Nvidia ties grow