T09 · Insecure Skill Coding Practices
- Location
scripts/evaluation.py:116- Finding
Unredacted MCP Tool Results and Exception Tracebacks Are Sent to Anthropic
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a coherent MCP-building guide, but its optional evaluation harness can send full MCP tool results and errors to Anthropic and does not strongly constrain remote or tool access.
Install only if you are comfortable using a Claude-based evaluation harness. Run it in an isolated environment, use only test or low-sensitivity MCP servers and credentials, prefer HTTPS remote URLs, avoid passing production authorization headers, and review saved evaluation reports before sharing or committing them because they may contain tool data.
scripts/evaluation.py:116Unredacted MCP Tool Results and Exception Tracebacks Are Sent to Anthropic
scripts/connections.py:86Remote MCP Transports Accept Authentication Headers Without Enforcing HTTPS
scripts/requirements.txt:1Third-Party Dependencies Use Unbounded Version Ranges
The declared purpose presents the skill as a documentation guide, but the detected behavior extends into operational actions such as connecting to live MCP servers, invoking tools, calling an external LLM API, parsing evaluation datasets, and writing reports. This mismatch is dangerous because users may authorize or run the skill under the assumption that it is passive guidance when it can actually trigger network access, data processing, and potentially sensitive external interactions.
Referenced artifact was not completely inspected
- [⚡ TypeScript Implementation Guide](./reference/node_mcp_server.md) - Node/TypeScript-specific best practices and examples
Referenced artifact was not completely inspected
- [⚡ TypeScript Implementation Guide](./reference/node_mcp_server.md) - Node/TypeScript-specific best practices and examples
Referenced artifact was not completely inspected
- [⚡ TypeScript Implementation Guide](./reference/node_mcp_server.md) - Node/TypeScript-specific best practices and examples
Referenced artifact was not completely inspected
- [⚡ TypeScript Implementation Guide](./reference/node_mcp_server.md) - Node/TypeScript-specific best practices and examples
Referenced artifact was not completely inspected
- [⚡ TypeScript Implementation Guide](./reference/node_mcp_server.md) - Node/TypeScript-specific best practices and examples
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
optional arguments:
-h, --help Show help message
-t, --transport Transport type: stdio, sse, or http (default: stdio)
-m, --model Claude model to use (default: claude-3-7-sonnet-20250219)
-o, --output Output file for report (default: print to stdout)
stdio options:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
**OAuth 2.1 Implementation:**
- Use secure OAuth 2.1 with certificates from recognized authorities
- Validate access tokens before processing requests
- Only accept tokens specifically intended for your server
- Reject tokens without proper audience claims
- Never pass through tokens received from MCP clients
The skill appears capable of writing files and interacting with MCP-related external capabilities, but it declares no explicit tool scope such as permissions or allowed-tools. That creates an avoidable trust gap: an agent or reviewer cannot easily tell what the skill is permitted to do, increasing the chance of overbroad execution or unintended side effects.
Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
After understanding the API and tools, USE the MCP server tools:
- Inspect content using READ-ONLY and NON-DESTRUCTIVE operations ONLY
- Goal: identify specific content (e.g., users, channels, messages, projects, tasks) for creating realistic questions
- Should NOT call any tools that modify state
- Will NOT read the code of the MCP server implementation itself
- Parallelize this step with individual sub-agents pursuing independent explorations
- Ensure each subagent is only performing READ-ONLY, NON-DESTRUCTIVE, and IDEMPOTENT operations
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
The MCP specification defines the following annotations for tools:
| Annotation | Type | Default | Description |
| ----------------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `title` | string | - | A human-readable title for the tool, useful for UI display |
| `readOnlyHint` | boolean | false | If true, indicates the tool does not modify its environment |
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
mcp = FastMCP("example_mcp")
# Constants
API_BASE_URL = "https://api.example.com/v1"
CHARACTER_LIMIT = 25000 # Maximum response size in characters
# Enums
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
mcp = FastMCP("example_mcp")
# Constants
API_BASE_URL = "https://api.example.com/v1"
CHARACTER_LIMIT = 25000 # Maximum response size in characters
# Enums
The guide explicitly demonstrates use of ctx.elicit(..., input_type="password") to request an API key from the user, but it provides no accompanying warning about secure credential handling, storage minimization, redaction, or safer alternatives such as environment-based auth. In a skill that teaches MCP server design, this can normalize collecting secrets interactively and lead downstream implementations to mishandle credentials or expose them through logs, memory, traces, or prompt context.
The evaluation prompt explicitly instructs the model to include each tool input and output in its generated summary. Because MCP tools may access external services and return sensitive data, this design causes unnecessary disclosure to Anthropic during processing and then re-exposes that data in the final report without any user warning or minimization. In the context of an MCP evaluation harness, this is more dangerous because the whole purpose is to exercise arbitrary tools, which may handle secrets, personal data, or proprietary API responses.
The prompt requires disclosure of full tool inputs and outputs in the summary, which is a direct data-spillage pattern. Any sensitive user input, authentication material, personal data, or confidential API response accessed via MCP tools may be copied into model output and ultimately the report, violating least-privilege and data-minimization principles. This is especially risky in an MCP builder/evaluation context because tool schemas and responses are highly variable and may not be privacy-safe by default.
The script forwards raw tool results and full exception tracebacks directly to the external model. This can leak sensitive data from tool responses, internal error details, stack traces, file paths, or credentials embedded in failures to a third-party API, even when those details are not needed to answer the evaluation question. Given this skill's purpose of testing arbitrary MCP servers, the exposure surface is broad and materially increases risk.
The generated report persists model-produced summary and feedback content to disk, and that content may include sensitive tool inputs/outputs because the prompt asked the model to reproduce them. Saving such data without warning or review can create an at-rest leakage channel, especially if reports are shared, committed, or stored in insecure locations. In an evaluation workflow, report artifacts are likely to be retained, amplifying exposure duration.
The documentation explicitly states 'Avoid any' as a TypeScript best practice, but earlier examples define makeApiRequest<any>, const response: any, and map over (user: any), and later include data?: any and params?: any. This is an active contradiction between the guide's stated coding intent and the example code it provides.
The checklist says 'No use of any type - use unknown or proper types instead', yet the guide's own sample tool and shared utility code use any in several places. That makes the checklist's stated requirement inconsistent with the actual implementation guidance given elsewhere in the file.
The dependency is specified with a lower bound only (anthropic>=0.39.0), which makes builds non-reproducible and can pull in different versions over time, including newly introduced vulnerable or breaking releases. In a security-sensitive skill for building MCP servers, this increases supply-chain risk because generated environments may unpredictably install affected SDK versions.
anthropic>=0.39.0
mcp>=1.1.0
The manifest references anthropic without pinning an exact version, while advisories exist for that package, so it is impossible to verify from this file whether deployment will install a vulnerable release. This does not prove exploitation by itself, but it creates uncertainty and can result in vulnerable environments being installed depending on resolution time.
The mcp package is also unpinned (mcp>=1.1.0), so installations may resolve to any newer release, including versions with known security issues or incompatible behavior. Because this skill is specifically about creating MCP servers that expose tools to external clients, dependency drift in the core MCP SDK is more dangerous than in a generic application and can directly affect server-side security controls.
anthropic>=0.39.0
mcp>=1.1.0
The mcp dependency has multiple known advisories, and because the manifest does not pin a version, there is no way to determine whether the installed SDK will include one of those flaws. Given that MCP server frameworks often mediate external tool execution and network-facing interactions, uncertainty around the exact mcp version materially raises the chance of deploying an exposed server with known weaknesses.