Skip to content

OLS-2575: Remove service-side secret keyword tool filtering#2819

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
onmete:fix/remove-sensitive-tool-args
Mar 17, 2026
Merged

OLS-2575: Remove service-side secret keyword tool filtering#2819
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
onmete:fix/remove-sensitive-tool-args

Conversation

@onmete
Copy link
Copy Markdown
Contributor

@onmete onmete commented Mar 17, 2026

Description

Remove service-side substring filtering for "secret" in MCP tool arguments, and rely on MCP server-side denied_resources hardening for v1/Secret to prevent secret content leakage.

This change removes over-blocking of legitimate Kubernetes operations that only reference secrets by name/path (for example secretRef and /var/run/secrets/...).

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • uv run pytest -q tests/unit/tools/test_tools.py
  • Verified obsolete sensitive-argument tests were removed and the tools test suite passes.
  • Manual behavior validation from code path: no raise_for_sensitive_tool_args gate remains in _execute_single_tool_call.

Made with Cursor

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 17, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Mar 17, 2026

@onmete: This pull request references OLS-2575 which is a valid jira issue.

Details

In response to this:

Description

Remove service-side substring filtering for "secret" in MCP tool arguments, and rely on MCP server-side denied_resources hardening for v1/Secret to prevent secret content leakage.

This change removes over-blocking of legitimate Kubernetes operations that only reference secrets by name/path (for example secretRef and /var/run/secrets/...).

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • uv run pytest -q tests/unit/tools/test_tools.py
  • Verified obsolete sensitive-argument tests were removed and the tools test suite passes.
  • Manual behavior validation from code path: no raise_for_sensitive_tool_args gate remains in _execute_single_tool_call.

Made with Cursor

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Comment thread ols/src/tools/tools.py
)
status = "error"
logger.exception(tool_output)
break
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just try/except was removed here, the rest is an indentation shift.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 17, 2026

@onmete: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@blublinsky
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2026
@onmete
Copy link
Copy Markdown
Contributor Author

onmete commented Mar 17, 2026

/approve

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 17, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: onmete

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 17, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 969ca61 into openshift:main Mar 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants