Skip to content

feat(policy): preserve exact MCP revision allowlists - #3027

Open
shiju-nv wants to merge 3 commits into
NVIDIA:mainfrom
shiju-nv:feat/2954-mcp-revision-allowlists
Open

feat(policy): preserve exact MCP revision allowlists#3027
shiju-nv wants to merge 3 commits into
NVIDIA:mainfrom
shiju-nv:feat/2954-mcp-revision-allowlists

Conversation

@shiju-nv

Copy link
Copy Markdown
Contributor

Summary

OpenShell cannot apply revision-specific MCP rules unless each inspected endpoint carries the exact revisions it allows. This PR adds a nonempty mcp.versions allowlist and preserves its validated value through provider profiles, policy storage and composition, merge checks, hashing, history listing, sandbox configuration, and SDK conversions. Omitted lists become exactly ["2025-11-25"], explicit lists are sorted, and invalid or duplicate entries are rejected so a later registry change cannot widen a stored policy.

Related Issue

Closes #2954.
Part of #2174.

Changes

  • Define a closed registry for the supported stable revisions 2025-03-26, 2025-06-18, and 2025-11-25, including the batch-shape facts needed by runtime enforcement. Add an exact mcp.versions allowlist to protobuf, provider profiles, policy YAML, and the Go SDK. Empty lists, duplicates, padded strings, unsupported dates, draft, and latest are rejected. An omitted allowlist materializes as exactly ["2025-11-25"]; the stored default never follows the newest registry entry.
  • Preserve the normalized allowlist in provider snapshots, stored revisions, policy composition, coverage checks, deterministic hashes, sandbox configuration, and SDK deep copies.
  • Treat policies with disjoint revision allowlists as incompatible for MCP inspection so merge cannot discard either restriction. Reject active policies that name an unsupported revision or attach MCP options to an endpoint that is not inspected as MCP.
  • Keep invalid historical rows visible as failed list entries so one legacy record cannot hide the remaining revision history. Resolve a valid global policy before dormant invalid local state so operators retain the existing global-override recovery path and credential-policy protections.
  • Preserve forward compatibility for unknown outer endpoint-profile fields, validate the MCP options object strictly, and render conformance policy from the runner-selected supported revision.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Signed-off-by: Shiju <shiju@nvidia.com>
Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv
shiju-nv force-pushed the feat/2954-mcp-revision-allowlists branch from 3ffdf2e to cbc0b20 Compare September 2, 2026 18:10
Signed-off-by: Shiju <shiju@nvidia.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.

Preserve exact MCP revision allowlists through save, merge, and load

1 participant