Repository navigation
Description
Problem or Motivation
The guard of #3222 finds a secret parameter of an MCP tool by its name. Two published parameters hold free text that can carry a secret that a person gives, and no name word finds them: sandbox_deploy.env (KEY=VALUE pairs for the sandbox) and valkey_set.value (the value of a cache key). A model writes both. SECURITY.md rule 12 says that a tool publishes no parameter that takes a secret value.
Proposed Solution & Architectural Design
- Decide for each parameter: remove it from the tool (
_PATH_PARAM_RESTRICTIONS), or take a reference to a value in the secret store. - Check that no other tool publishes a free-text parameter that is copied into an environment, a file or a store (
env,values,value,data). - If a parameter stays, add a test that names it and the reason, as the allow-list of feat(security): refuse a secret value as an MCP tool parameter #3222 does.
Target Subsystem
src/devops_cli/ai/mcp/generator.py, src/devops_cli/config/constants.py, tests/ai/mcp/.
Existing Tool Considered
The guard test and the allow-list of #3222 cover the names. A parameter that holds an arbitrary value needs a decision for each tool, and no open tool makes it. Cost to build: about 30k tokens and 2 hours.
(Filed by an agent as a follow-up of #3222. devops roadmap intake could not run in the sandbox: gh returned HTTP 401.)
Proposed design
Problem statement
The MCP guard finds a secret parameter by its name. Two published free-text parameters, sandbox_deploy.env and valkey_set.value, can carry a secret and no name word finds them. The change removes both parameters from the MCP tools and adds a guard test for other free-text parameters that are copied into an environment, a file or a store.
Acceptance criteria
Requirement: Sandbox deploy omits env
The sandbox_deploy MCP tool SHALL not publish the env parameter.
Scenario: Published sandbox deploy schema
- WHEN The test generates the MCP tools and reads the schema of
sandbox_deploy. - THEN The schema has no
envproperty.
Requirement: Valkey set tool is absent
The MCP server SHALL not publish the valkey_set tool.
Scenario: Published valkey tools
- WHEN The test generates the MCP tools and lists their names.
- THEN The list holds no
valkey_settool.
Requirement: Denied restriction works
The MCP generator SHALL omit a parameter named in the denied set of a path restriction.
Scenario: Denied parameter in a path restriction
- WHEN A path restriction holds
deniedwithenvand the command publishes anenvoption. - THEN The generated tool schema has no
envproperty.
Requirement: Free-text sink guard
The MCP schema guard SHALL fail on a published text parameter named env, values, value or data that has no allow-list entry with a reason.
Scenario: Unallowed free-text sink parameter
- WHEN A test tool publishes a text parameter named
valueand the allow-list has no entry for it. - THEN The guard fails and names the tool and the parameter.
Requirement: Stale allow-list entry
The MCP schema guard SHALL fail on an allow-list entry that matches no published parameter.
Scenario: Stale free-text allow-list entry
- WHEN The allow-list holds an entry for a tool and parameter that the server does not publish.
- THEN The guard fails and names the stale entry.
Existing Tool Considered
No alternatives check has run. The guard test and allow-list of #3222 cover parameter names, not arbitrary values. No open, maintained tool decides this per-tool choice. Build cost: about 30k tokens and 2 hours.
Key questions
- Which MCP tools publish the free-text parameters that the issue names?:
sandbox_deploypublishesenvbecause its path has no restriction entry.valkey_setpublishesvaluebecause its restriction allows it. [sources: src/devops_cli/ai/mcp/generator.py, src/devops_cli/config/constants.py] - How should the generator remove
sandbox_deploy.env?: Add adeniedset to thesandbox_deployentry in_PATH_PARAM_RESTRICTIONSand omit each denied parameter. This keeps every other option published. (best practice) [sources: src/devops_cli/ai/mcp/generator.py, tests/ai/mcp/test_mcp.py, SECURITY.md]- Chosen: Denied set in
_PATH_PARAM_RESTRICTIONS. It removes onlyenvand needs no full list of the other options. - Rejected: Full allowed list. It needs every other option and fails when the command adds one.
- Rejected: Remove the
sandbox_deploytool. It removes useful sandbox deployment work that holds no secret parameter.
- Chosen: Denied set in
- How should the change handle
valkey_set.value?: Remove thevalkey_setrow fromCONST_MCP_EXPOSURE_TABLEand its_PATH_PARAM_RESTRICTIONSentry. The tool then publishes novalueparameter. (best practice) [sources: src/devops_cli/config/constants.py, src/devops_cli/ai/mcp/generator.py, SECURITY.md]- Chosen: Remove the
valkey_settool. The requiredvalueargument cannot be omitted, and the issue names no command change for reference resolution. - Rejected: Accept only
keyring:. The command does not resolve the reference, and passing the secret in argv would expose it. - Rejected: Allow
valuewith a reason. The model can put a secret invalue, so the allow-list would not remove the risk.
- Chosen: Remove the
- How should the guard test find other free-text sink parameters?: Read the published schema of every MCP tool. Fail on a text parameter named
env,values,valueordataunless a new allow-list entry gives a reason. Fail on an entry that matches no parameter. (best practice) [sources: SECURITY.md, tests/ai/mcp/test_mcp_tool_secrets.py, src/devops_cli/config/constants.py]- Chosen: Exact-name schema scan with allow-list. It mirrors the guard of feat(security): refuse a secret value as an MCP tool parameter #3222, catches new sink names, and avoids substring false positives.
- Rejected: Substring scan of parameter names. Names such as
field_valuewould fail for no sink reason. - Rejected: Manual review only. A new tool could publish a sink parameter with no failing test.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
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.It closes a security gap but the primary guard from #3222 already covers name-based detection.It prevents secrets in two specific free-text parameters but the main guard already handles the common case.The body estimates about 30k tokens and 2 hours of work.Both work on MCP tool parameters and secrets, but #3222 delivers the name-based guard while the candidate decides and implements handling for free-text parameters that bypass it.devops-cli-service commentedon Nov 2, 2026
Status set to Ready at 7072e35 (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
feat/3230-decide-the-free-text-mcp-parameters, draft pull request #3283. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
The plan run made 4 model request(s), and used 300772 input tokens and 12044 output tokens. The model made no tool call.
A model review of the plan found these points. They stop no draft, and a person judges them:
otherat group 2: The plan rejects a fullallowedlist forsandbox_deploy, then adds one besidedenied. The group also needs the full list of the other options, which the plan never names. Evidence: "Add the("sandbox", "deploy")entry to_PATH_PARAM_RESTRICTIONSwithdeniedholdingenvand anallowedset of the other options."otherat group 4: The plan says the generateddocs/MCP_TOOLS.mdstates the new guard, but no group changes or regenerates it. Group 4 only reads it and changesSECURITY.md. The catalog keeps the removedvalkey_settool. Evidence: "SECURITY.md rule 12 and the generateddocs/MCP_TOOLS.mdstate the new guard."docs(openspec): plan #3230 decide MCP free-text secret parameters
docs(openspec): plan #3230 decide MCP free-text secret parameters (#3283
25 remaining items
devops-cli-service commentedon Nov 5, 2026
Stopped at group 1.
Failure class:
refused_tool.Action taken: none.
Action left:
wait: wait for a person.Reason:
Last message of the agent (a claim that no check verified): Let me try to directly edit the generator file to add the denied parameter support:
The job discarded this work. Read it before you retry:
The item is Blocked, and the job will not run it. Fix the cause. Then comment
implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.devops-cli-service commentedon Nov 5, 2026
The runner Job devops-cli-runner-20261105-004422-a94f ended: succeeded.
Image digest: sha256:19e84d6536c1a68f698115ecaa7e06550e6442e4d64777764822c29bc349324e
The last lines of its log:
docs(openspec): plan #3304 Ask the plan for a count of a claimed set (#…
feat(roadmap): add a set count to every-member plan claims (#4089)
devops-cli-service commentedon Nov 25, 2026
Released in v0.213.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.213.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 02:42 UTC