Repository navigation
Description
Problem or Motivation
The model writes the arguments of an MCP tool call. A secret in an argument passes through the model context, the provider, the LLM cache and the run trace, and a model can be induced to send it to another tool. SECURITY.md rule 11 treats a URL or host that a model gives to an MCP tool as untrusted. It has no rule for a credential. The server is to be reached by jobs through LiteLLM (see #3219), and the owner wants a credential for an execution to be set by the harness, with the permissions in the credential and not in the tool.
Proposed Solution & Architectural Design
- Add a rule to
SECURITY.md, next to rule 11: MCP Tool Secrets. A tool publishes no parameter that takes a secret value (a password, token, API key or private key). A credential for a call is carried on the connection, as a header the harness sets, or as an opaquecredential_refthat the server resolves from the secret store. A tool never returns or logs a credential. - Add a guard test under
tests/ai/mcp/that reads the published schema of every tool and fails when a parameter has a name that suggests a secret (password,secret,token,api_key,apikey,private_key,credential,bearer), unless the tool is on a short allow-list with a reason (for example a parameter that holds a path to a key file or a name of a setting, not a value). The allow-list is a constant, and a new entry needs a reason. - Fix any tool that fails today: the refine step lists them. A tool that needs a credential takes a
credential_refor reads the configured credential. - Mask the arguments in the run trace and the tool-call logs by name, with
mask_secretsas a second guard.
Open questions for the refine step: which tools fail the test today; whether any current tool takes a url or host with a credential (rule 11 covers the host); and whether the allow-list should be in the exposure table or a separate constant.
Target Subsystem
SECURITY.md, tests/ai/mcp/, src/devops_cli/ai/mcp/generator.py, src/devops_cli/config/constants.py.
Existing Tool Considered
No tool checks MCP tool schemas for secret parameters. The project already builds the tool schemas from the Click commands, so a test over the generated schema is small. Cost to build: about 50k tokens and 3 hours. To keep: a short allow-list.
Activity
devops-cli-service commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(security)scope of the title gives the scope.This is preventive security hardening with no active exploit or advisory, so it is important but not urgent.It closes a gap in the threat model for credentials passed as tool arguments, protecting users from secret leakage.The body estimates about 50k tokens and 3 hours, covering a rule, a guard test, and fixes to failing tools.Both harden MCP tool argument handling, but #862 refuses coerced or invalid argument values while the candidate rejects parameters whose names suggest a secret.docs(openspec): plan #3230 decide MCP free-text secret parameters (#3283
feat(security): Deny free-text MCP parameters that can carry a secret (…