Skip to content

fix(security): honor MCP tool model visibility in Code Mode - #11425

Merged
lifeizhou-ap merged 1 commit into
mainfrom
jbg/security-code-mode-tool-visibility
Aug 21, 2026
Merged

lifeizhou-ap merged 1 commit into
mainfrom
jbg/security-code-mode-tool-visibility

Conversation

@jbg

@jbg jbg commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • exclude MCP tools marked app-only from the Code Mode callback catalog
  • apply the same model-visibility predicate used by ordinary inference before callback hashing and registration
  • cover explicit app-only, explicit model-visible, and unannotated tool behavior

Testing

  • cargo fmt --all -- --check
  • cargo test -p goose --features code-mode callback_configs_exclude_tools_hidden_from_model --lib
  • cargo build -p goose
  • cargo clippy -p goose --all-targets -- -D warnings
  • cargo clippy -p goose --features code-mode --all-targets -- -D warnings

This finding was discovered by Project Loupe

@lifeizhou-ap
lifeizhou-ap added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit d830653 Aug 21, 2026
24 checks passed
@lifeizhou-ap
lifeizhou-ap deleted the jbg/security-code-mode-tool-visibility branch August 21, 2026 02:43
lifeizhou-ap added a commit that referenced this pull request Aug 21, 2026
* main: (70 commits)
  cli: remove recipe secret discovery (#11435)
  fix(openrouter): escape Gemini tool response ref keys (#11276)
  fix(security): honor MCP tool model visibility in Code Mode (#11425)
  fix(providers): estimate cost for Azure Foundry models via inferred catalog pricing (#11264)
  feat(providers): add Gondola as declarative OpenAI-compatible provider (#11421)
  feat(otel): add request params, response metadata, tool call parity, and agent identification (#11261)
  fix(providers): coalesce consecutive Thinking blocks in collect_stream (#11317)
  feat(hooks): add PreToolUseResult event and stable tool_call_id across tool lifecycle (#11120)
  add MCP conformance tests to goose CI (combines #10800 + #10801) (#10940)
  feat(desktop): sort configured providers to the top of the provider list (#11409)
  fix(cli): refuse symlink diagnostics outputs (#11398)
  test(plugins): isolate GOOSE_PATH_ROOT in discovery tests (#11407)
  fix(config): serialize secret mutations (#11388)
  fix: decouple source file and tool response limits (#11391)
  chore(deps): bump pctx_code_mode from 0.4.1 to 0.5.0 (#11245)
  fix(security): suppress sensitive OTLP traces (#11381)
  feat(openrouter): forward session_id and add app category header (#10868)
  feat(acp): derive and forward thinking effort from the ACP harness (#10949)
  fix(aws_bedrock): replace flat model list with routing table, add Gemma 4 Mantle support (#10297)
  Add GPT-5.6 follow-up support for Codex and Responses API (#10460)
  ...
lifeizhou-ap added a commit to Wolfe-Jam/goose that referenced this pull request Aug 21, 2026
* main: (107 commits)
  fix(providers): inform user of clipboard copy and remove copilot auth retry on timeout (aaif-goose#11160)
  feat(desktop): select saved recipes when creating a schedule (aaif-goose#10892)
  More provider test scripts (aaif-goose#10515)
  cli: remove recipe secret discovery (aaif-goose#11435)
  fix(openrouter): escape Gemini tool response ref keys (aaif-goose#11276)
  fix(security): honor MCP tool model visibility in Code Mode (aaif-goose#11425)
  fix(providers): estimate cost for Azure Foundry models via inferred catalog pricing (aaif-goose#11264)
  feat(providers): add Gondola as declarative OpenAI-compatible provider (aaif-goose#11421)
  feat(otel): add request params, response metadata, tool call parity, and agent identification (aaif-goose#11261)
  fix(providers): coalesce consecutive Thinking blocks in collect_stream (aaif-goose#11317)
  feat(hooks): add PreToolUseResult event and stable tool_call_id across tool lifecycle (aaif-goose#11120)
  add MCP conformance tests to goose CI (combines aaif-goose#10800 + aaif-goose#10801) (aaif-goose#10940)
  feat(desktop): sort configured providers to the top of the provider list (aaif-goose#11409)
  fix(cli): refuse symlink diagnostics outputs (aaif-goose#11398)
  test(plugins): isolate GOOSE_PATH_ROOT in discovery tests (aaif-goose#11407)
  fix(config): serialize secret mutations (aaif-goose#11388)
  fix: decouple source file and tool response limits (aaif-goose#11391)
  chore(deps): bump pctx_code_mode from 0.4.1 to 0.5.0 (aaif-goose#11245)
  fix(security): suppress sensitive OTLP traces (aaif-goose#11381)
  feat(openrouter): forward session_id and add app category header (aaif-goose#10868)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants