Skip to content

[BUG] apm audit --ci reports config-consistency for MCP servers that apm install intentionally left out under the executables gate or without transitive trust #3720

Closed

Description

Summary

apm install and apm update can intentionally leave a package-declared MCP server out of the native config. That happens when the executables gate does not approve the declaring package, or when a transitive server is installed without --trust-transitive-mcp. In both cases the omission is not recorded the way apm audit --ci expects, so a later audit reports config-consistency even though install did what it promised.

Reproduction (neutral)

  1. A project enables the executables gate (executables: {} in apm.yml) and depends on a local package whose apm.yml declares a self-defined MCP server (registry: false).
  2. Run apm install. The server is parked pending approval and is not written to the native MCP config. Exit code is 0.
  3. Run apm audit --ci. It fails config-consistency: the current view still expects the parked server.

A second sequence:

  1. apm install --trust-transitive-mcp deploys a transitive self-defined server.
  2. apm update without the flag removes it.
  3. apm audit --ci reports missing omission evidence for that server.

Expected

Install, update and audit agree. An MCP server that install deliberately omits (executables gate, or no per-run transitive trust) carries omission evidence that audit replay accepts, and the pre-cleanup baseline is kept if retirement fails.

Notes

Activity

  1. danielmeppiel commented on Nov 19, 2026

    @danielmeppiel
    CollaboratorAuthor

    Decision: approve
    Area: project
    Scope: When install or update deliberately omits a package-declared MCP server (executables gate not approving the declaring package, or a transitive self-defined server without per-run --trust-transitive-mcp, including retiring a previously trusted one), record declaration-bound omission evidence through the existing CurrentMcpConfigView owner and have audit replay accept it, keeping the prior baseline when retirement fails.
    Done when: Both issue sequences pass apm audit --ci config-consistency after the installed CLI run, damaged or stale evidence still fails, and an installed-CLI lifecycle test covering both fails before the fix.
    Out of scope: Re-evaluating executables approvals or org policy inside audit, new flags, lockfile redesign, and changes to which servers install deploys.
    Review contact: Daniel Meppiel (@danielmeppiel)

  2. danielmeppiel commented on Nov 19, 2026

    @danielmeppiel
    CollaboratorAuthor

    Context for the scope record above. Reproduced on main f8ef817 with the installed CLI:

    • Executables gate (executables: {}, local package with a registry: false server): apm install --no-policy exits 0, server not written, lock has no mcp_omissions; apm audit --ci fails config-consistency with "MCP selection is unknown ... omission evidence is missing" and "in manifest but not in lockfile".
    • apm install --trust-transitive-mcp (audit passes), then apm update --yes: server retired, lock has no mcp_omissions; audit fails the same way.

    Causes: the executables filter drops the server after omission evidence is computed, and evidence is filtered against the pre-run lock, so a server retired in this run is still treated as admitted.

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/securitypillar/governPillar: policy, trust, audit and supply-chain integritystatus/acceptedHuman scope approval; verify the issue's approval record and review contact before work.type/bugSomething does not work as documented.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions