Skip to content

[FEATURE] Org policy: require a pinned version for registry MCP servers (mcp.require_pinned_version) #5542

Backlog

Description

Is your feature request related to a problem? Please describe.

apm.yml lets a registry MCP server declare version: (manifest schema 4.2.2), but apm-policy.yml has no way to require it. A server written as a plain registry reference, or with version: latest, resolves to the registry's newest release whenever it is installed or updated. For organizations, that means the MCP server a developer runs can change without any change to apm.yml and without review.

APM already offers the equivalent for packages (dependencies.require_pinned_constraint) and for hashes (security.integrity.require_hashes). MCP servers are the one primitive type where an org cannot ask "must be pinned". The mcp.allow list restricts which servers are allowed, but not which release.

Who hits this: enterprise admins who run apm audit --ci as a branch gate and want reviewable, reproducible MCP server versions.

Describe the solution you'd like

An opt-in boolean, default false, modelled on require_pinned_constraint:

# apm-policy.yml
mcp:
  require_pinned_version: true
  • Judged: each registry MCP server declared in the root apm.yml. A missing, empty or latest version: is a violation of a new mcp-pinned-version check, routed through policy.enforcement (warn / block) at apm install and in apm audit --ci.
  • Not judged: self-defined servers (registry: false; they have no registry release, and apm approve already pins them by content hash) and transitive servers (a consumer cannot edit another package's manifest, the same reason require_pinned_constraint skips transitive deps).
  • Inheritance: a child policy cannot relax a parent that enables it (logical OR).
  • Output: violations use the existing diagnostic and audit JSON/SARIF shape; no new output format.

How we would know it works: unit tests for the check, parser, inheritance and cache round trip, an install-preflight test that blocks an unpinned server under enforcement: block, and a docs row in policy-schema.md.

Boundaries: it does not verify that a pinned version is immutable in the registry, and does not govern runtime behaviour or tool permissions.

Describe alternatives you've considered

  • Fold the rule into mcp.allow by allowing name@version patterns. This changes the meaning of an existing list and needs matcher changes; a boolean is smaller and mirrors the dependency rule.
  • Rely on apm install --frozen plus the lockfile mcp_configs baseline. That detects drift after a lock exists but does not stop an author from committing an unpinned declaration.
  • A subprocess or external-engine hook in policy (rejected upstream in feat(policy): add custom_checks for arbitrary subprocess validation in apm-policy.yml #519).

Additional context

Related: EPIC #3618 (Policy and governance), EPIC #3619 (Supply-chain integrity), dependencies.require_pinned_constraint, #3224, #3775.

I would like to help implement and test this. A small prototype (about 55 source lines plus tests and docs) exists on a fork branch; I will not open a PR until a maintainer records scope approval. If you prefer a different shape (for example a different check name, or folding it into an existing check), I will follow it.

Activity

  1. github-actions commented on Nov 27, 2026

    @github-actions

    Thanks for the well-argued proposal. An opt-in mcp.require_pinned_version, default false and modeled on dependencies.require_pinned_constraint, fits the existing policy surface. Suggested scope: judge registry MCP servers in the root apm.yml (missing, empty or latest version), routed through policy.enforcement at install and apm audit --ci. Open points for review: the policy schema change, the check name, and docs. A maintainer for audit/policy should confirm capacity. This is a recommendation only, not scope approval.

    Generated by Triage Panel · copilot · auto · 27.6 AIC · ⌖ 0.724 AIC · ⊞ 12.5K · ◷

  2. added
    area/audit-policy
    pillar/govern
    triage/recommended
    type/feature
    on Nov 27, 2026
  3. sattyamjjain commented on Nov 28, 2026

    @sattyamjjain

    Hey Mir Mansoor Ahmed (@Mirmansoorahmed), one data point for what the check should count as pinned. Today I ran agent-audit-kit 0.6.36 (I maintain it) on one npx MCP server entry written six ways. Only the exact 1.2.0 passed. ^1.2.0, ~1.2.0 and 1.x were flagged as not pinned, same as latest and no version at all, since each one can move to a newer release without the file changing. If version: accepts a range, I feel mcp-pinned-version should treat it like latest.

  4. Mirmansoorahmed commented on Nov 29, 2026

    @Mirmansoorahmed
    Author

    Thanks Sattyam Jain (@sattyamjjain) — good catch. I looked into it and tightened the check.

    mcp-pinned-version now rejects floating ranges and wildcards (^1.2.0, ~1.2.0, 1.x, *, >=1.0.0, ||, etc.) alongside missing, empty, and latest, so only an exact pin (such as 1.2.0, v1.2.0, or 1.2.0-rc.1) passes.

    I also checked how APM handles MCP version: today: get_server() sends version as a literal path segment to the MCP Registry API (GET /v0.1/servers/{name}/versions/{version}) rather than evaluating semver ranges, and the install path currently defaults to latest without applying the version overlay yet. Either way, requiring an exact pin keeps the policy rule strict and future-proof.

    The updated check, docs, and tests are on my fork preview here: Mirmansoorahmed#1. I'll wait for maintainer scope confirmation before opening an upstream PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/audit-policypillar/governtriage/recommendedtype/feature

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions