Repository navigation
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 orlatestversion:is a violation of a newmcp-pinned-versioncheck, routed throughpolicy.enforcement(warn/block) atapm installand inapm audit --ci. - Not judged: self-defined servers (
registry: false; they have no registry release, andapm approvealready pins them by content hash) and transitive servers (a consumer cannot edit another package's manifest, the same reasonrequire_pinned_constraintskips 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.allowby allowingname@versionpatterns. 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 --frozenplus the lockfilemcp_configsbaseline. 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.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
github-actions commentedon Nov 27, 2026
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.
sattyamjjain commentedon Nov 28, 2026
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.
Mirmansoorahmed commentedon Nov 29, 2026
Thanks Sattyam Jain (@sattyamjjain) — good catch. I looked into it and tightened the check.
mcp-pinned-versionnow rejects floating ranges and wildcards (^1.2.0,~1.2.0,1.x,*,>=1.0.0,||, etc.) alongside missing, empty, andlatest, so only an exact pin (such as1.2.0,v1.2.0, or1.2.0-rc.1) passes.I also checked how APM handles MCP
version:today:get_server()sendsversionas 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 tolatestwithout applying theversionoverlay 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.