
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
@guardbee/mcp-unbounded-consumption-auditor
Advanced tools
MCP server that scans LLM/agent application code for Unbounded Consumption ("denial of wallet") anti-patterns from OWASP LLM Top 10 2026's #6 category: missing output token limits, missing timeouts on hand-rolled LLM HTTP calls, unbounded agent tool-calli
🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch
An MCP (Model Context Protocol) server that scans LLM/agent application code for Unbounded Consumption — OWASP LLM Top 10 2026's #6 category, also known as "denial of wallet": nothing stops the application from making unlimited billable calls.
This package sends usage telemetry by default (tool name + short parameters, scanned code is never included — see
@guardbee/mcp-telemetry). Disable withGUARDBEE_TELEMETRY=0.
Claude ──► unbounded-consumption-auditor ──► your LLM/agent source
│
├─ missing-token-limit (no cap on how much the model can generate)
├─ missing-timeout (a hand-rolled call to an LLM endpoint that can hang forever)
├─ unbounded-loop (an agent/retry loop with no iteration cap)
├─ disabled-safety-limit (a framework's own loop cap explicitly turned off)
└─ missing-rate-limit (an MCP tool making billable calls with no throttling)
OWASP's own write-up on this category gives a concrete cost example worth keeping in mind while reading findings: "A research assistant agent without any recursion limit or call budget ended up making 500 tool calls with a simulated cost of $10... An agent with a call budget, a recursion depth limit and an agentic circuit breaker... completed one tool call, spending just $0.02."
Every pattern here was checked against real SDK source or real code before being written — not guessed from training-data assumption.
.chat.completions.create(...) calls (OpenAI Python/JS) with neither max_tokens nor max_completion_tokens set. It's deliberately scoped to OpenAI-shaped calls only: Anthropic's own SDK makes max_tokens a required constructor argument — it raises before the request is even sent — so a matching check there would be 100% false positives. Reasoning models (o1+) silently ignore max_tokens and need max_completion_tokens instead, so the check only flags a call missing both.requests/axios/fetch calls whose own argument span mentions a known LLM endpoint (api.openai.com, api.anthropic.com, /chat/completions, /v1/messages). The official OpenAI/Anthropic SDKs already ship a bounded client-level default (openai-node: 600s) — flagging those would just be noise. requests.post()'s own Quickstart warns that an unset timeout can leave a program waiting indefinitely; axios and bare fetch have the same no-default-timeout shape.while True:/while(true) agent loop that dispatches tool_calls with nothing nearby suggesting an iteration cap (the exact shape quoted from a public 70-line-agent walkthrough), and a retry loop that catches an exception, calls straight back into an LLM, and continues with no attempt counter (OWASP's own write-up calls this out by name: "a failed step might be retried repeatedly"). The retry-loop check is deliberately scoped to loops that actually call an LLM — an early version without that scoping flagged ordinary polling/retry code in a real open-source codebase during testing (see Development below).max_iterations=None (LangChain's AgentExecutor) and max_turns=None (openai-agents-python's Runner.run/run_sync) — both verified against real source before shipping. LangChain's AgentExecutor defaults max_iterations to 15, and its own _should_continue() only enforces the cap if self.max_iterations is not None — so None genuinely disables it. openai-agents-python's own issue tracker states plainly that max_turns=None disables the turn limit. LangGraph's recursion_limit has no equivalent — it requires a concrete number — so no pattern is shipped for it, rather than guessing at an unverified "disable" mechanism.server.tool()/@mcp.tool(), implying there's no framework default to fall back on. This check can't see a rate limiter enforced elsewhere (an API gateway, middleware in another file) — see Limitations.Relationship to ai-code-scanner: that package already has a coarser unbounded_agent_loop pattern (any while(true)/for(;;) within 200 characters of a .chat.completions.create/.messages.create call, under its excessive-agency category) — it doesn't check whether the loop actually dispatches tool calls, and doesn't check for a nearby iteration-cap hint, so it would also flag a loop that's already properly bounded. This package's unbounded_tool_calling_loop is narrower and cost-specific: it requires an actual tool_calls/toolCalls reference (the real agentic-dispatch shape) and explicitly skips loops with a visible cap hint nearby.
IBM/mcp-context-forge) plus this monorepo's own 495 files — zero false positives in production code. Two real false positives were found and fixed during that verification, before shipping: an early, wider loop-body window let an unrelated except/continue elsewhere in the same file get mistaken for part of a nearby loop (fixed by requiring an LLM-call hint in the window and shrinking it), and a disabled max_iterations=None a few lines below a loop was briefly mistaken for a legitimate nearby iteration cap (fixed by stripping disabled-cap assignments before testing for a real one).{
"mcpServers": {
"guardbee-unbounded-consumption-auditor": {
"command": "npx",
"args": ["-y", "@guardbee/mcp-unbounded-consumption-auditor"]
}
}
}
npx @guardbee/mcp-unbounded-consumption-auditor scan . --fail-on=high --format=sarif > results.sarif
| Tool | Description |
|---|---|
scan_text | Scan a code snippet for Unbounded Consumption anti-patterns |
scan_file | Scan a single file |
scan_directory | Recursively scan a directory |
list_patterns | List every pattern this auditor detects, grouped by category |
| Pattern | Category | Severity | Meaning |
|---|---|---|---|
openai_chat_completion_missing_max_tokens | missing-token-limit | medium | An OpenAI chat completion call has neither max_tokens nor max_completion_tokens set |
raw_http_call_to_llm_endpoint_missing_timeout | missing-timeout | medium | A hand-rolled HTTP call to a known LLM endpoint has no timeout/AbortSignal |
unbounded_tool_calling_loop | unbounded-loop | medium | A hand-rolled while(true)/while True: loop dispatches tool_calls with no visible iteration cap |
unbounded_retry_loop | unbounded-loop | medium | A retry loop around an LLM call catches an exception and continues with no attempt counter |
langchain_max_iterations_disabled | disabled-safety-limit | high | LangChain's AgentExecutor max_iterations explicitly set to None |
openai_agents_max_turns_disabled | disabled-safety-limit | high | openai-agents-python's Runner max_turns explicitly set to None |
mcp_tool_billable_call_no_rate_limit | missing-rate-limit | medium | An MCP tool handler makes a billable LLM call with nothing suggesting per-caller rate limiting |
guardbee.yml)unbounded-consumption-auditor:
fail-on: high # any | critical | high | medium | low | none
max-files: 5000
exclude:
- ".test.ts"
while True:/while(true), not the actual loop body — a loop with an unusually long body, or one whose cap check lives outside that window, can be missed. Testing against real code found the reverse failure mode too (an unrelated except/continue further down getting mistaken for part of a nearby loop) and tightened the window accordingly; it's still a heuristic, not a parser.recursion_limit isn't checked. Unlike LangChain and openai-agents-python, LangGraph's recursion limit requires a concrete number — there's no verified "set it to disable" mechanism, so no pattern is shipped for it rather than guessing at one.npm run build
npm test # 25 unit tests
MIT — GuardBee
FAQs
MCP server that scans LLM/agent application code for Unbounded Consumption ("denial of wallet") anti-patterns from OWASP LLM Top 10 2026's #6 category: missing output token limits, missing timeouts on hand-rolled LLM HTTP calls, unbounded agent tool-calli
The npm package @guardbee/mcp-unbounded-consumption-auditor receives a total of 0 weekly downloads. As such, @guardbee/mcp-unbounded-consumption-auditor popularity was classified as not popular.
We found that @guardbee/mcp-unbounded-consumption-auditor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.