Skip to content

[EPIC] Supply-chain integrity: what your agents load is exactly what you locked #3619

Open
8 of 12 issues completed

Description

In one sentence: APM already makes sure the bytes it installs match the lockfile; in 0.40 it also checks the copy of a plugin that the harness (the coding agent tool, such as Claude Code, GitHub Copilot or Codex) actually loads, and apm status reports that copy as matches, differs or unknown.

Why

The lockfile (apm.lock.yaml) records the exact version and a content hash of every package APM installs: skills, plugins and MCP servers (tool servers an agent can call). Agent configuration runs with the developer's permissions, so these bytes matter like application code.

The lock covers what APM writes, not what the harness loads. Some harnesses copy an enabled plugin into their own cache and load it from there. An edited or tampered file in that copy goes unnoticed.

Sam is the security lead at a company where 300 developers use Claude Code and GitHub Copilot. An auditor asks: "Show that the code-review plugin your agents run is the version security approved." Sam can show the lockfile, but not that each harness's copy still has those bytes.

Why now. Claude Code and GitHub Copilot now let companies lock agents down with managed settings (files IT deploys that users cannot override) and approved plugin marketplaces (catalogs of allowed plugins). That controls which plugins run, not which bytes. Shared standards (Agent Plugins, Agent Skills in .agents/skills, AGENTS.md, MCP mcpServers) send one plugin to several harnesses, and each keeps its own copy.

What

apm status, a new read-only command planned for 0.40 in its own epic, shows the result in its CONTENT column. apm status --check fails on any difference.

Illustrative (planned for 0.40; output format not final):

$ apm install                                   # locks superpowers v2 with a content hash
$ echo "# tweak" >> .agents/plugins/superpowers/skills/x/SKILL.md
$ apm status --check; echo $?
HARNESS   SCOPE    NAME         DECLARED  PRESENT  CONFIGURED  CONTENT           VERDICT
claude    project  superpowers  v2        yes      yes         differs (1 file)  drift
copilot   project  superpowers  v2        yes      yes         matches           ok
windsurf  user     -            -         -        -           unknown           unknown (no readable state)
1
$ git checkout HEAD~1 -- apm.yml apm.lock.yaml && apm install
[!] superpowers: local edit in .agents/plugins/... replaced by locked v1 bytes

Columns: DECLARED is in the lockfile; PRESENT means files sit where the harness looks; CONFIGURED means the harness's own settings enable it; CONTENT compares bytes with the lock.

flowchart LR
  A["apm.yml"] --> B["apm install"]
  B --> C["apm.lock.yaml: version + content hash"]
  B --> D["files APM deploys"]
  D --> E["harness copy it loads from"]
  C --> F["apm status: compare hashes"]
  E --> F
  F --> G["matches"]
  F --> H["differs: --check exits 1"]
  F --> I["unknown: location not documented or unreadable"]
Loading

What it includes

  • 0.40: check the harness's copy against the lockfile hash.
  • Identical content hashes on Linux, macOS and Windows (done).
  • Registry proxies and mirrors that keep package bytes intact.
  • MCP server definitions that reject undeclared fields; private MCP servers from GitHub repositories.
  • Lockfile guards: an older APM refuses a newer lockfile (done); declarative overrides of single items in a package.

What it does not include

How

The check reuses the lockfile's own hash function, so "same bytes" has one definition. The shared apm status reader opens only the paths each harness documents. Those paths are data in each harness's adapter record (its description, #3616), so a new harness needs a record entry, not new code. CONTENT is evidence; the verdict is computed separately. Undocumented or unreadable means unknown.

Value

  • Developers: a local tweak inside a plugin shows up before it silently changes the agent.
  • Admins and security leads: audit evidence that the bytes agents load are the locked bytes.
  • Package authors: users run exactly what was published, on every harness.
  • Ecosystem: vendors need not build their own verification; the check reads the files they already document.

How it fits APM's principles

  • One manifest, one lockfile, one policy: one lockfile hash is the reference for every harness copy.
  • Unbound from harness binaries: APM reads the copy from disk; it never runs the harness.
  • Honest evidence: an unreadable copy is unknown, not matches.
  • Promises before features: the check lands as a failing test first.
  • Backward-compatible YAML: no new apm.yml keys.

Promises you can verify

  1. When the harness's copy has the locked bytes, apm status shows matches. When any file differs, it shows differs with the file count, and apm status --check exits 1.
    How we verify it: an automated test edits one file in the harness's copy and checks output and exit code; a nightly run repeats it with the real Claude Code and GitHub Copilot.
  2. When APM cannot read the copy, apm status shows unknown, never matches.
    How we verify it: tests make each kind of harness state file unreadable in turn.
  3. apm status never changes a file and never starts the harness.
    How we verify it: the test compares the file system before and after, and a process monitor counts zero process starts.
  4. After a rollback to an older lockfile and apm install, the harness's copy matches the older locked bytes, and APM names any local edit it replaced.
    How we verify it: a nightly upgrade-and-rollback journey checks that the real harness loads the expected version marker.

Child issues

For contributors and agents

0.40 slice (from the 0.40 epic package, rev 3)

Original epic body (rev 3)

Outcome. What APM installs is exactly what was locked: content hashes are stable on every platform, proxies and mirrors preserve package bytes, MCP server definitions fail closed on untrusted input, and lockfiles cannot be silently downgraded or overridden.

Pillar Horizon
Govern Next

In scope:

  • Cross-platform content hash stability (line endings, symlinks)
  • Registry proxy and mirror fidelity
  • MCP trust: explicit passthrough, private servers and their trust policy
  • Lockfile version guards and declarative overrides

Out of scope:

  • Organization policy rules (E5)
  • Registry API design (E4)

Sub-issues: #1806, #1869, #2334, #2413, #3110, #3270, #3457, plus #3585, #5056, #5096, #5181, #5199, #5767.

Tracked on the APM Roadmap.

Legend

This epic body is a plan, not a scope approval. Sub-issues carry their own scope approval; see CONTRIBUTING.

Sub-issues

Sub-issues

8 of 12 Issues completed
Loading 12 sub-issues

Activity

  1. added
    pillar/govern
    on Nov 12, 2026
  2. danielmeppiel commented on Nov 23, 2026

    @danielmeppiel
    CollaboratorAuthor

    Progress update for v0.39.0 (cut 2026-11-24). Hardening fixes landed or in flight under this epic:

    Related, tracked under the crash-recovery epic #5105: #5039 (local-bundle hook sidecar writes keep config file records current, fixed by #5042) and #5111 (crash recovery restores the recorded mode, fixed by #5117).

  3. github-actions commented on Nov 25, 2026

    @github-actions

    Advisory triage (not a maintainer decision): this is a tracking epic that already carries its pillar label. It looks like a roadmap container rather than directly implementable work, so no scope approval is implied. Each sub-issue listed in the body needs its own scope approval per CONTRIBUTING. Suggested next step: keep the epic open as a tracker and triage the children individually.

    Generated by Triage Panel · copilot · auto · 22.7 AIC · ⌖ 0.706 AIC · ⊞ 12.5K · ◷

  4. added
    triage/recommended
    on Nov 25, 2026
  5. danielmeppiel commented on Dec 2, 2026

    @danielmeppiel
    CollaboratorAuthor

    0.40 slice

    New child: "Lock verifies the vendor plugin cache" -- done when status shows
    content: matches | differs | unknown and P-LAW lockfile.vendor_cache_matches_lock (red-first in
    J29 step 3) passes. Size M. Deps P1.

  6. changed the title [-][EPIC] Supply-chain integrity[/-] [+][EPIC] Supply-chain integrity: what your agents load is exactly what you locked[/+] on Dec 2, 2026
  7. danielmeppiel commented on Dec 2, 2026

    @danielmeppiel
    CollaboratorAuthor

    0.40 plan: a small gap remains, then this epic parks. #5767 moved to #5745 (on-disk evidence only). Remaining here: #1806 and #1869 (design), #2413 (deferred), and #3110, where only the diagnostic shipped and the rest needs a new scope record.

  8. added
    roadmap/epic
    on Dec 2, 2026
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

    pillar/governroadmap/epictrackingtriage/recommended

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions