Skip to content

Commit 3c65949

Browse files
authored
docs: surface BadHost detector in readmes
Add the FastAPI/Starlette BadHost detector to README and PyPI README detection scope so release-visible docs match the merged scanner capability. Update the visible rule count from 18 to 19 without changing scanner logic or release metadata. Implemented with assistance from Codex.
1 parent 8087fc8 commit 3c65949

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

PYPI_README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ That is the whole flow. The scanner is read-only: it does not modify your
1818
files, run your code, or send data over the network.
1919

2020
Python agent detection is enabled for bounded `.py` source analysis.
21+
FastAPI / Starlette middleware detection is enabled for BadHost-style
22+
path-auth risk: Lurkr flags security middleware that reads
23+
`request.url.path` without same-file `TrustedHostMiddleware` evidence.
2124
Bounded TypeScript / JavaScript MCP analysis is enabled for canonical
2225
Model Context Protocol `registerTool` handler shapes; see
2326
[Detection scope](#detection-scope) for the exact patterns covered.
@@ -106,6 +109,7 @@ All current rules are reported as `high` severity.
106109
| [`agent.python_subprocess_in_tool`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.python_subprocess_in_tool.md) | Subprocess or shell calls inside supported Python tool functions | Supported Python tool functions |
107110
| [`agent.python_tool_without_approval`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.python_tool_without_approval.md) | Python agent tool declarations without an approval marker | LangChain, LangGraph, CrewAI, MCP, OpenAI tool calling, Anthropic tool use, LlamaIndex, Gemini |
108111
| [`agent.python_unrestricted_file_access`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.python_unrestricted_file_access.md) | File write or delete calls inside Python tool functions | Supported Python tool functions |
112+
| [`agent.python_fastapi_path_auth_no_host_validation`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.python_fastapi_path_auth_no_host_validation.md) | FastAPI / Starlette middleware reading `request.url.path` without same-file `TrustedHostMiddleware` evidence | FastAPI / Starlette HTTP middleware |
109113
| [`agent.unverified_mcp_endpoint`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.unverified_mcp_endpoint.md) | MCP server URLs pointing to non-allowlisted external hosts | MCP manifests |
110114
| [`agent.javascript_child_process_in_tool`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.javascript_child_process_in_tool.md) | Node.js `child_process` commands inside canonical MCP `registerTool` handlers (TS/JS) | Canonical MCP `registerTool` handlers in TS/JS |
111115
| [`agent.javascript_file_mutation_in_tool`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.javascript_file_mutation_in_tool.md) | Node.js `fs` / `fs/promises` write/delete calls inside canonical MCP `registerTool` handlers (TS/JS) | Canonical MCP `registerTool` handlers in TS/JS |
@@ -152,9 +156,10 @@ The goal: find high-severity capabilities worth controlling before they become p
152156

153157
### Available now
154158

155-
18 high-severity rules across:
159+
19 high-severity rules across:
156160
- GitHub workflows + agent manifests + identity files
157161
- Python agent code: LangChain / LangGraph, CrewAI, MCP (FastMCP and Server-style), OpenAI tool calling, Anthropic tool use, LlamaIndex, Gemini
162+
- FastAPI / Starlette middleware that can make path-based auth decisions from host-poisoned `request.url.path`
158163
- Bounded TypeScript / JavaScript MCP tool handlers: `child_process`, `fs` / `fs/promises` mutation, secret-like `process.env`, and outbound network calls (`fetch` / `axios` / `got` / `undici` / `http(s)`). Coverage is limited to canonical Model Context Protocol `registerTool` registration shapes and bounded same-file + relative-import handler resolution
159164
- Declared-vs-imported capability delta across MCP/CrewAI/AutoGen/LangChain manifests, Python tool registrations, AND bounded TS/JS MCP `registerTool` extraction (identifier-bound, chained, typed helper-wrapper parameters, namespace-qualified, parenthesized, with same-file top-level `const` name resolution)
160165
- AI-specific static checks for credential flow into LLM context, direct prompt interpolation, and external MCP endpoints

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ That is the whole flow. The scanner is read-only: it does not modify your
4444
files, run your code, or send data over the network.
4545

4646
Python agent detection is enabled for bounded `.py` source analysis.
47+
FastAPI / Starlette middleware detection is enabled for BadHost-style
48+
path-auth risk: Lurkr flags security middleware that reads
49+
`request.url.path` without same-file `TrustedHostMiddleware` evidence.
4750
Bounded TypeScript / JavaScript MCP analysis is enabled for canonical
4851
Model Context Protocol `registerTool` handler shapes; see
4952
[Detection scope](#detection-scope) for the exact patterns covered.
@@ -114,6 +117,7 @@ All current rules are reported as `high` severity.
114117
| [`agent.python_subprocess_in_tool`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.python_subprocess_in_tool.md) | Subprocess or shell calls inside supported Python tool functions | Supported Python tool functions |
115118
| [`agent.python_tool_without_approval`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.python_tool_without_approval.md) | Python agent tool declarations without an approval marker | LangChain, LangGraph, CrewAI, MCP, OpenAI tool calling, Anthropic tool use, LlamaIndex, Gemini |
116119
| [`agent.python_unrestricted_file_access`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.python_unrestricted_file_access.md) | File write or delete calls inside Python tool functions | Supported Python tool functions |
120+
| [`agent.python_fastapi_path_auth_no_host_validation`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.python_fastapi_path_auth_no_host_validation.md) | FastAPI / Starlette middleware reading `request.url.path` without same-file `TrustedHostMiddleware` evidence | FastAPI / Starlette HTTP middleware |
117121
| [`agent.unverified_mcp_endpoint`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.unverified_mcp_endpoint.md) | MCP server URLs pointing to non-allowlisted external hosts | MCP manifests |
118122
| [`agent.javascript_child_process_in_tool`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.javascript_child_process_in_tool.md) | Node.js `child_process` commands inside canonical MCP `registerTool` handlers (TS/JS) | Canonical MCP `registerTool` handlers in TS/JS |
119123
| [`agent.javascript_file_mutation_in_tool`](https://github.com/agentveil-protocol/lurkr/blob/main/docs/rules/agent.javascript_file_mutation_in_tool.md) | Node.js `fs` / `fs/promises` write/delete calls inside canonical MCP `registerTool` handlers (TS/JS) | Canonical MCP `registerTool` handlers in TS/JS |
@@ -160,9 +164,10 @@ The goal: find high-severity capabilities worth controlling before they become p
160164

161165
### Available now
162166

163-
18 high-severity rules across:
167+
19 high-severity rules across:
164168
- GitHub workflows + agent manifests + identity files
165169
- Python agent code: LangChain / LangGraph, CrewAI, MCP (FastMCP and Server-style), OpenAI tool calling, Anthropic tool use, LlamaIndex, Gemini
170+
- FastAPI / Starlette middleware that can make path-based auth decisions from host-poisoned `request.url.path`
166171
- Bounded TypeScript / JavaScript MCP tool handlers: `child_process`, `fs` / `fs/promises` mutation, secret-like `process.env`, and outbound network calls (`fetch` / `axios` / `got` / `undici` / `http(s)`). Coverage is limited to canonical Model Context Protocol `registerTool` registration shapes and bounded same-file + relative-import handler resolution
167172
- Declared-vs-imported capability delta across MCP/CrewAI/AutoGen/LangChain manifests, Python tool registrations, AND bounded TS/JS MCP `registerTool` extraction (identifier-bound, chained, typed helper-wrapper parameters, namespace-qualified, parenthesized, with same-file top-level `const` name resolution)
168173
- AI-specific static checks for credential flow into LLM context, direct prompt interpolation, and external MCP endpoints

0 commit comments

Comments
 (0)