You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mcp): fastmcp's debug log of tool calls never records argument values #899
priority/p2-mediumPriority P2: standard workscope/mcpModel Context Protocol tools, system resources, and promptstype/securityType security: a vulnerability or a leak
Found in #862's review. FastMCP logs every tools/call's arguments at DEBUG (fastmcp/server/mixins/mcp_operations.py:211, 'Handler called: call_tool %s with %s'), including vault_set key_values and oidc_token, on a logger #862's redacting filter does not cover. At default levels it is silent (effective level INFO, and a sentinel probe found no record), but FASTMCP_LOG_LEVEL=DEBUG would write every secret argument to the log.
Acceptance criteria: with the FastMCP loggers at DEBUG, a vault_set call carrying a sentinel value leaves no log record containing it (caplog). uv run devops ci passes.
Placed in v0.2.30 on 2026-10-08 at the owner's request ("Populate 10 security and ci issues into each v0.2.30, v0.2.31, and v0.2.32 milestone"). This is a person's placement. Release theme: P1 secret and sandbox-boundary fixes, the review tools lock, kube-linter finding identity and a faster gate. Position 2 of 10 in the release's planned merge order. Its board Status is set to Ready, so the release-start fill keeps it.
FastMCP logs every tools/call and prompts/get with its arguments at DEBUG on fastmcp.server.mixins.mcp_operations, so with FASTMCP_LOG_LEVEL=DEBUG a vault_set call wrote its key_values to stderr.
ArgumentValueLogFilter (src/devops_cli/ai/mcp/argument_contract.py) is attached to that logger only. It replaces each mapping argument with <redacted> and keeps the record, so the log still names the tool or prompt: Handler called: call_tool vault_set with <redacted>.
The fastmcp_log test fixture now captures every FastMCP logger at DEBUG. The new test_no_tool_argument_reaches_a_debug_record checks that the DEBUG record is written and holds no sentinel. Two stale test docstrings are corrected.
The task-862 file is updated to match. This PR adds changelog.d/899.md (Security) and the task-899 file.
Acceptance Criteria of docs/agent/tasks/task-899-fastmcp-debug-log-redacts-tool-arguments.md:
With every FastMCP logger at DEBUG, a vault_set call carrying a sentinel value leaves no
log record containing it. test_no_tool_argument_reaches_a_debug_record
(tests/test_fastmcp_contracts.py) captures the fastmcp logger tree at DEBUG through fastmcp.Client(mcp), finds Handler called: call_tool vault_set, so the record was written,
and finds no sentinel, with the handler run once. Before the filter the record read call_tool vault_set with {'path': 'secret/app', 'key_values': ['API_KEY=sentinel-4b1d']}.
The fastmcp_log fixture now captures every FastMCP logger at DEBUG, so test_a_strict_refusal_is_rendered_like_a_schema_refusal also holds the DEBUG argument record
to no 4242, which it failed before the filter. test_no_rejected_input_reaches_a_log_record
holds FastMCP's own refusal warning to no rejected input, with no filter on that logger.
priority/p2-mediumPriority P2: standard workscope/mcpModel Context Protocol tools, system resources, and promptstype/securityType security: a vulnerability or a leak
Activity
fix(mcp): tools refuse coerced arguments before they run (#862) (#903)
feat(release): v0.2.24 (#905)
dan-petty commentedon Oct 8, 2026
Placed in v0.2.30 on 2026-10-08 at the owner's request ("Populate 10 security and ci issues into each v0.2.30, v0.2.31, and v0.2.32 milestone"). This is a person's placement. Release theme: P1 secret and sandbox-boundary fixes, the review tools lock, kube-linter finding identity and a faster gate. Position 2 of 10 in the release's planned merge order. Its board Status is set to Ready, so the release-start fill keeps it.
fix(mcp): fastmcp's debug log of tool calls never records argument va…
dan-petty-bot commentedon Oct 9, 2026
What changed
#1459, merged into
release/v0.2.30as 961c4d9.7 file(s) changed.
How it was verified
Check runs at 1f51446:
Acceptance Criteria of
docs/agent/tasks/task-899-fastmcp-debug-log-redacts-tool-arguments.md:vault_setcall carrying a sentinel value leaves nolog record containing it.
test_no_tool_argument_reaches_a_debug_record(
tests/test_fastmcp_contracts.py) captures thefastmcplogger tree at DEBUG throughfastmcp.Client(mcp), findsHandler called: call_tool vault_set, so the record was written,and finds no sentinel, with the handler run once. Before the filter the record read
call_tool vault_set with {'path': 'secret/app', 'key_values': ['API_KEY=sentinel-4b1d']}.fastmcp_logfixture now captures every FastMCP logger at DEBUG, sotest_a_strict_refusal_is_rendered_like_a_schema_refusalalso holds the DEBUG argument recordto no
4242, which it failed before the filter.test_no_rejected_input_reaches_a_log_recordholds FastMCP's own refusal warning to no rejected input, with no filter on that logger.
uv run devops cipasses.feat(release): v0.2.30 (#1473)