Skip to content

feat(security): refuse a secret value as an MCP tool parameter - #3232

Merged
dan-petty merged 6 commits into
mainfrom
feat/3222-mcp-tool-secrets
Nov 2, 2026
Merged

dan-petty merged 6 commits into
mainfrom
feat/3222-mcp-tool-secrets

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

A model writes the arguments of an MCP tool call, so a secret in an argument passes through the model context, the provider, the LLM cache and the run trace. SECURITY.md has a new rule 12. A test reads the published schema of every tool and fails on a text parameter with a secret word in its name, unless a named constant lists it with a reason. vault_set is no tool, vault_get has no show option, docker_sign takes the OIDC token only as a keyring reference, and the run trace hides an argument by its name.

Closes #3222

Change: openspec/changes/archive/2026-11-02-3222-mcp-tool-secrets/


Generated by Claude Code

A model writes the arguments of an MCP tool call, so a secret in an argument passes through the
model context, the provider, the LLM cache and the run trace.

- SECURITY.md rule 12 and its section: a tool publishes no parameter that takes a secret value and
  never returns or logs a credential.
- A guard test reads the published schema of every tool and fails on a text parameter with a
  secret word in its name, unless a named constant lists it with a reason.
- vault_set is no tool, vault_get has no show option, and docker_sign takes the OIDC token only as
  a keyring reference.
- The run trace hides the value of an argument by its name.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
The token cap of a routed document is 8000 now, so rule 12 holds the whole text and no route or
section is needed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
…ency

deptry refuses the pydantic_core import (DEP003). The standard library
json writes the same compact text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
@dan-petty
dan-petty marked this pull request as ready for review November 2, 2026 17:11
@dan-petty
dan-petty merged commit 360a8c6 into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the feat/3222-mcp-tool-secrets branch November 2, 2026 17:12
dan-petty pushed a commit that referenced this pull request Nov 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.47.0](v0.46.1...v0.47.0)
(2026-11-02)


### Features

* **mcp:** serve role-scoped tools over streamable HTTP
([#3233](#3233))
([6923473](6923473))
* **security:** refuse a secret value as an MCP tool parameter
([#3232](#3232))
([360a8c6](360a8c6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(security): refuse a secret value as an MCP tool parameter

2 participants