Skip to content

fix: OBOT_SERVER_DISALLOW_PRIVATE_IP_MCP reference - #7001

Open
arollyson wants to merge 1 commit into
obot-platform:mainfrom
arollyson:fix/ipmcp-env-reference
Open

fix: OBOT_SERVER_DISALLOW_PRIVATE_IP_MCP reference#7001
arollyson wants to merge 1 commit into
obot-platform:mainfrom
arollyson:fix/ipmcp-env-reference

Conversation

@arollyson

Copy link
Copy Markdown

Problem

The OBOT_SERVER_DISALLOW_PRIVATE_IP_MCP env var documented in the chart and docs had no effect. The cmd framework derives env var names with a regex that only splits lower→Upper boundaries, so DisallowPrivateIPMCP collapsed the IP/MCP acronym adjacency into OBOT_SERVER_DISALLOW_PRIVATE_IPMCP (no underscore).

Fix

Added an explicit env:"OBOT_SERVER_DISALLOW_PRIVATE_IP_MCP" tag to the field so the documented name is honored.

Copilot AI review requested due to automatic review settings June 19, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a configuration mismatch in the MCP loader options by explicitly binding DisallowPrivateIPMCP to the documented environment variable name OBOT_SERVER_DISALLOW_PRIVATE_IP_MCP, ensuring Helm chart/docs configuration actually takes effect.

Changes:

  • Added an explicit env:"OBOT_SERVER_DISALLOW_PRIVATE_IP_MCP" struct tag to DisallowPrivateIPMCP so the intended env var name is honored.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@entelligence-ai-pr-reviews

Copy link
Copy Markdown

EntelligenceAI PR Summary

Adds environment variable support for the MCP private IP restriction setting in pkg/mcp/loader.go.

  • Binds OBOT_SERVER_DISALLOW_PRIVATE_IP_MCP environment variable to the DisallowPrivateIPMCP field in the Options struct
  • Complements the existing command-line flag with an alternative environment-based configuration method

Confidence Score: 5/5 - Safe to Merge

Safe to merge — this PR makes a minimal, focused fix to pkg/mcp/loader.go by binding the OBOT_SERVER_DISALLOW_PRIVATE_IP_MCP environment variable to the DisallowPrivateIPMCP field in the Options struct, complementing the already-existing CLI flag. The change is a standard env-var binding pattern consistent with how other options are configured in this codebase, with no logic, control flow, or security implications beyond what the existing flag already handles. No issues were identified in review.

Key Findings:

  • The environment variable binding in pkg/mcp/loader.go follows the same pattern used for other configuration options, making this change low-risk and consistent with established conventions.
  • The change is purely additive — it does not alter existing behavior for users relying on the CLI flag, and only adds an alternative configuration method via environment variable.
  • No validation logic is needed here since the underlying DisallowPrivateIPMCP field is a boolean, and env-var binding frameworks handle the string-to-bool conversion safely.
Files requiring special attention
  • pkg/mcp/loader.go

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.

2 participants