Repository navigation
feat(security): portable, content-pinned approval for dependency executables (#3902) - #3918
Conversation
apm-spec-waiver: changelog-only follow-up to the req-sc-016 amendment commit Co-authored-by: Copilot App <[email protected]>
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 1 | 2 | 0 | trust.py is the right owner, but some readers bypass it: explain and doctor ignore pins, and three MCP subject enumerators exist. |
| Supply Chain Security | 1 | 2 | 0 | The ladder is sound, but native hooks let a pin override a deny. Also review the one-off override and audit on a cold policy cache. |
| DevX UX | 0 | 3 | 0 | The pin shape and wording are clean. Fix the native-plugin docs line, approve exit codes and message order, and the 0.37 hint. |
| Test Coverage | 0 | 3 | 0 | The 11 real-binary tests cover most promises. Two integration tests still assert the old shape, and the uninstall-survivor and --user/audit paths have no trap. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 5 follow-ups
- [Supply Chain Security] (blocking-severity)
- Fix:
native_hook_approvalreturnshooks_approved and verdict.allowed, and deny short-circuits innative_hooks_admissionandhook_file_filter. Add a test with org deny,hooks: {}and no hook JSON. - Why: today the deny does not hold.
- Fix:
- [Python Architect] (blocking-severity)
- Fix: add one
package_type_verdicts()owner for explain, doctor,--list/--pending, exec_gate and native status, and extend G1. - Why: a pinned approval currently shows as blocked.
- Fix: add one
- [Test Coverage]
- Fix: update the two stale integration tests to the pin shape and rerun them.
- Why: they become traps for update-with-pins and replacement-pins.
- [Supply Chain Security]
- Fix: limit the one-off
--trust-transitive-mcpoverride to overlays that are not exec-gated. - Why: a stale pin must never admit arbitrary content for a self-defined server.
- Fix: limit the one-off
- [Supply Chain Security]
- Fix: when the policy cache misses during the audit consent check, report "org policy unavailable", and narrow the bare
except. - Why: on a cold CI runner, org deny silently disappears.
- Fix: when the policy cache misses during the audit consent check, report "org policy unavailable", and narrow the bare
Recommendation
Do not merge head 6c153b3. The direction is right and the rework is bounded:
- Fold the native-hook org-deny bypass with its test.
- Route explain and doctor through a single
package_type_verdicts()owner covered by G1. - Update the two stale integration tests and rerun them.
- Fold the cheap in-scope recommendations:
- narrow the one-off override;
- add the policy-unavailable audit message;
- use a single MCP subject enumerator;
- make
approveexit codes honest; - add the version hint and the docs fix.
After that, this is a minor release that ships with follow-ups. Only the McpAdmission construction cleanup needs tracking.
Full per-persona findings
Python Architect
- [blocking]
apm policy explainandmarketplace doctornever call the trust owner, so a pinned hooks or mcp approval shows as blocked by default-deny. Location:src/apm_cli/commands/approve.py:304.
Suggested: addpackage_type_verdicts()in trust.py and route every per-type verdict reader through it. Extend G1, and add a lifecycle test showing explain reports allowed after approve. - [recommended] The three MCP subject enumerators diverge. A pinned transitive overlay whose registry entry changed is parked by install, while
pinned_exec_statusreports it as deployed. Location:src/apm_cli/security/trust.py:488.
Suggested: use one enumerator for admission, status and pins. - [recommended] McpAdmission is built four different ways, and
for_projectduplicates policy discovery and swallows exceptions. Location:src/apm_cli/security/trust.py:270.
Suggested: delegate to one policy owner and warn on fallback.
Supply Chain Security
- [blocking]
native_hook_approvalignores the package-level hooks verdict, so an org deny is bypassed when a package has a pinned map but no hook JSON files. Location:src/apm_cli/install/native_plugin_admission.py:259.
Suggested: returnhooks_approved and verdict.allowed, short-circuit deny, and add a test. - [recommended] A one-off run turns a stale pin into an any-content approval for exec-gated servers. Location:
src/apm_cli/security/trust.py:188. - [recommended] The audit consent check uses cache-only policy and maps a cache miss, or any exception, to "no policy". Location:
src/apm_cli/security/trust.py:284.
DevX UX
- [recommended]
approve.mdsays per-file pins do not admit a native plugin, but the code does admit it. Location:docs/src/content/docs/reference/cli/approve.md:117. - [recommended]
apm approveprints[+] Approvedbefore the confirm prompt, and exits 0 when it refuses or the user declines. Location:src/apm_cli/commands/approve.py:618. - [recommended] On mixed-version teams, pins break teammates still on 0.36 with an opaque type error. Add a one-line hint when the first pins are written.
Test Coverage
- [recommended] Two unchanged integration tests still assert the old approve write shape:
tests/integration/test_hook_nested_metadata_install.py:81andtest_executable_approval_replacement_lifecycle.py:135. - [recommended] No lifecycle trap proves that uninstalling a sibling package keeps a survivor's pinned hooks. Location:
src/apm_cli/integration/hook_reintegration.py:71. - [recommended] D4 is tested only at the builder level. Add a lifecycle case that runs
approve --user, install andaudit --ci.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Generated by autopilot-pr-review-worker. This comment is AI-generated and may contain errors.
There was a problem hiding this comment.
🟡 Changes recommended
Existing MCP approval pins can be bypassed by switching to a custom registry, and item-level approvals can break native-plugin registration.
6 open issues
Use item pins for native plugins’ self-defined MCP servers · New Check existing pins before non-gated admission fast paths · New Confirm the first project approval even when nothing else is parked · New Include registry overlays and legacy grants in MCP pending checks · New Fingerprint authored MCP declarations before path expansion · New Reconcile the fingerprint-mismatch prohibition with one-off consent · New
What changed in this PR
This PR adds portable, content-pinned approval for dependency MCP servers and hook files. It centralizes admission decisions across installation, frozen replay, audit, and approval commands, extending the earlier MCP omission-evidence work.
Changes:
- Records per-item SHA-256 approvals in
apm.yml, with changed definitions withheld pending review. - Aligns MCP consent checks and adds per-file hook admission for deployment and native plugins.
- Adds lifecycle tests, architecture guards, documentation, and proposed OpenAPM conformance requirements.
| File | Description |
|---|---|
tests/unit/security/test_trust_fingerprint.py |
Tests fingerprint stability and content binding. |
tests/unit/security/test_trust_admission.py |
Tests admission precedence, pins, and native hooks. |
tests/unit/security/test_executables.py |
Removes tests for the retired MCP filter. |
tests/unit/security/test_exec_vocab_unification.py |
Uses the shared project approval-map reader. |
tests/unit/scripts/test_architecture_runner.py |
Registers the three new guard identifiers. |
tests/unit/policy/test_ci_checks.py |
Expects audit to re-evaluate consent. |
tests/unit/integration/test_mcp_config_view.py |
Migrates MCP view tests to admission objects. |
tests/unit/integration/test_frozen_mcp_evidence.py |
Updates frozen-validation admission inputs. |
tests/unit/install/test_mcp_only_lockfile_creation.py |
Updates MCP-only view construction. |
tests/unit/install/test_local_single_file_materialization.py |
Updates local-source admission inputs. |
tests/unit/commands/test_approve_deny.py |
Expects version-independent approval keys. |
tests/spec_conformance/test_portable_mcp_approval_reqs.py |
Adds portable-consent and frozen-install conformance tests. |
tests/spec_conformance/test_mcp_omission_inventory.py |
Updates omission tests to use admission objects. |
tests/spec_conformance/test_lockfile_reqs.py |
Updates frozen lockfile test setup. |
tests/integration/test_mcp_portable_approval_lifecycle.py |
Adds end-to-end approval and revocation scenarios. |
tests/integration/test_mcp_omission_lifecycle.py |
Uses persistent approvals for retained MCP baselines. |
tests/integration/test_mcp_deliberate_omission_audit_lifecycle.py |
Expects one-off consent to fail audit. |
tests/integration/test_architecture_owner_rule_mutations.py |
Adds mutation cases for trust guards. |
tests/integration/test_architecture_mcp_omissions.py |
Updates admission-routing mutations. |
tests/integration/test_architecture_install_compound_mutations.py |
Updates audit mutation anchors. |
src/apm_cli/utils/yaml_io.py |
Increases output width for fingerprint scalars. |
src/apm_cli/security/trust_fingerprint.py |
Centralizes approval and evidence hashing. |
src/apm_cli/policy/ci_checks.py |
Re-evaluates project consent during audit. |
src/apm_cli/integration/mcp_config_view.py |
Applies admission and records consent failures. |
src/apm_cli/integration/hook_reintegration.py |
Filters surviving hooks by item approval. |
src/apm_cli/install/services.py |
Passes approval context to native-plugin admission. |
src/apm_cli/install/service.py |
Applies shared admission during frozen validation. |
src/apm_cli/install/phases/integrate.py |
Supplies trust context during hydrated replay. |
src/apm_cli/install/native_plugin_admission.py |
Checks native hook pins and updates gated status. |
src/apm_cli/install/mcp/integration.py |
Uses shared admission and warns about one-off trust. |
src/apm_cli/install/exec_gate.py |
Connects hook pins and item-level status checks. |
src/apm_cli/install/deployment_plan.py |
Applies hook admission before deployment planning. |
src/apm_cli/install/deployable_source_plan.py |
Selects only admitted hook sources. |
src/apm_cli/commands/uninstall/engine.py |
Uses permissive discovery for managed-server cleanup. |
src/apm_cli/commands/approve.py |
Records pins, displays definitions, and reports pending approvals. |
scripts/architecture_linter/checks/mutation_mcp_target_and_scope.py |
Updates omission-owner routing checks. |
scripts/architecture_linter/checks/install_portable_trust.py |
Adds admission and fingerprint ownership guards. |
scripts/architecture_linter/checks/install_lsp_plugin.py |
Updates executable-trust routing expectations. |
scripts/architecture_linter/checks/install_deployment_analyzers.py |
Registers portable-trust rules. |
packages/apm-guide/.apm/skills/apm-usage/governance.md |
Documents pin storage and precedence. |
packages/apm-guide/.apm/skills/apm-usage/dependencies.md |
Explains portable transitive MCP consent. |
docs/src/content/docs/specs/openapm-v0.1.md |
Proposes portable-consent and frozen-parity requirements. |
docs/src/content/docs/reference/manifest-schema.md |
Describes item-level executable grants. |
docs/src/content/docs/reference/lockfile-spec.md |
Documents new omission reasons and consent checks. |
docs/src/content/docs/reference/cli/update.md |
Clarifies one-off trust behavior. |
docs/src/content/docs/reference/cli/install.md |
Documents pinned approval and frozen validation. |
docs/src/content/docs/reference/cli/approve.md |
Documents pinning, output, storage, and migration. |
docs/src/content/docs/reference/baseline-checks.md |
Explains audit consent and omission reconciliation. |
docs/src/content/docs/producer/author-primitives/mcp-as-primitive.md |
Explains approval implications for producers. |
docs/src/content/docs/enterprise/security.md |
Describes content binding and its limits. |
docs/src/content/docs/enterprise/policy-reference.md |
Removes obsolete trust-message example output. |
docs/src/content/docs/enterprise/governance-guide.md |
Updates consent controls and policy guarantees. |
docs/src/content/docs/enterprise/apm-policy.md |
Clarifies transitive consent versus policy settings. |
docs/src/content/docs/consumer/install-packages.md |
Adds portable approval guidance. |
docs/src/content/docs/concepts/primitives-and-targets.md |
Updates MCP approval terminology. |
docs/src/content/docs/concepts/lifecycle.md |
Updates transitive MCP troubleshooting guidance. |
docs/src/content/docs/concepts/glossary.md |
Updates the MCP consent definition. |
docs/public/specs/manifests/openapm-v0.1.requirements.yml |
Adds req-sc-016 to the requirements inventory. |
CONFORMANCE.md |
Updates requirement coverage and counts. |
CONFORMANCE.json |
Records machine-readable conformance coverage. |
CHANGELOG.md |
Adds feature, compatibility, and upgrade notes. |
.apm/architecture/owners/install-deployment.json |
Registers item-admission and fingerprint owners. |
Review effort: Balanced
6c153b3 to
db5b4e4
Compare
apm-spec-waiver: changelog-only follow-up to the req-sc-016 amendment commit Co-authored-by: Copilot App <[email protected]>
- Native plugins: an org/project deny wins before any hook file is read, and per-file pins only narrow the package verdict (no empty-pin bypass). - One per-type verdict reader, trust.package_type_verdicts, now backs apm policy explain, approve --list/--pending, doctor, lockfile exec_status and native status; G1 forbids pin-blind resolvers outside security/. - One MCP enumerator feeds install, status and pins, so a changed pinned registry overlay reads as not deployed everywhere. - --trust-transitive-mcp never re-approves a changed self-defined server. - apm audit --ci discovers org policy like install (honoring --no-policy) and names an unavailable policy instead of passing silently. - apm approve prints success after the write, exits 1 on a refused pin or declined prompt, and hints the APM 0.37 requirement on the first pin. - Stale integration tests moved to the pinned shape; new lifecycle traps for --user vs audit, refusal exit code and uninstall survivors. Refs #3902 (req-sc-016, req-sc-011) Co-authored-by: Copilot App <[email protected]>
db5b4e4 to
1c714d9
Compare
apm-spec-waiver: changelog-only follow-up to the req-sc-016 amendment commit Co-authored-by: Copilot App <[email protected]>
- Native plugins: an org/project deny wins before any hook file is read, and per-file pins only narrow the package verdict (no empty-pin bypass). - One per-type verdict reader, trust.package_type_verdicts, now backs apm policy explain, approve --list/--pending, doctor, lockfile exec_status and native status; G1 forbids pin-blind resolvers outside security/. - One MCP enumerator feeds install, status and pins, so a changed pinned registry overlay reads as not deployed everywhere. - --trust-transitive-mcp never re-approves a changed self-defined server. - apm audit --ci discovers org policy like install (honoring --no-policy) and names an unavailable policy instead of passing silently. - apm approve prints success after the write, exits 1 on a refused pin or declined prompt, and hints the APM 0.37 requirement on the first pin. - Stale integration tests moved to the pinned shape; new lifecycle traps for --user vs audit, refusal exit code and uninstall survivors. Refs #3902 (req-sc-016, req-sc-011) Co-authored-by: Copilot App <[email protected]>
1c714d9 to
d2c0eed
Compare
apm-spec-waiver: changelog-only follow-up to the req-sc-016 amendment commit Co-authored-by: Copilot App <[email protected]>
- Native plugins: an org/project deny wins before any hook file is read, and per-file pins only narrow the package verdict (no empty-pin bypass). - One per-type verdict reader, trust.package_type_verdicts, now backs apm policy explain, approve --list/--pending, doctor, lockfile exec_status and native status; G1 forbids pin-blind resolvers outside security/. - One MCP enumerator feeds install, status and pins, so a changed pinned registry overlay reads as not deployed everywhere. - --trust-transitive-mcp never re-approves a changed self-defined server. - apm audit --ci discovers org policy like install (honoring --no-policy) and names an unavailable policy instead of passing silently. - apm approve prints success after the write, exits 1 on a refused pin or declined prompt, and hints the APM 0.37 requirement on the first pin. - Stale integration tests moved to the pinned shape; new lifecycle traps for --user vs audit, refusal exit code and uninstall survivors. Refs #3902 (req-sc-016, req-sc-011) Co-authored-by: Copilot App <[email protected]>
APM Spec Guardian:
|
| Panel | Verdict | Shocked | New B | New R | New N |
|---|---|---|---|---|---|
| Swagger / OpenAPI editor | ship_with_followups | 7/10 | 0 | 2 | 0 |
| OCI distribution editor | ship_with_followups | 7/10 | 0 | 4 | 0 |
| Package-manager registry-contract editor | ship_with_followups | 8/10 | 0 | 5 | 0 |
| Web-platform architect | ship_with_followups | 7/10 | 0 | 2 | 0 |
B = new blocking findings, R = new recommended, N = new nits. These are post-fold estimates. In round 1 the panels found 2, 1, 1 and 3 blockers, all now closed by folds.
Counts are signal strength, not gates. The maintainer ships.
Convergent themes (flagged by 2+ panels)
- T1 -- The definition fingerprint was undefined: algorithm, length, prefix matching, field coverage, registry entry, source vs lockfile, unrecognized digests. Closed by fold; the byte-level canonical construction is deferred. (supporting: oci-blk-r1-1, pkg-blk-r1-1, tag-blk-r1-3, oci-rec-r1-1)
- T2 -- Where consent lives (manifest vs per-user req-sc-010 pins) and how it relates to req-sc-010. Closed by fold. (supporting: tag-blk-r1-1, sw-blk-r1-2, oci-rec-r1-6, tag-rec-r1-2, sw-rec-r1-5)
- T3 -- The one-off opt-in admitted a stale-pinned registry overlay. Closed by a spec fold plus a code change. (supporting: tag-blk-r1-2, sw-blk-r1-1, oci-rec-r1-5)
- T4 -- The grant has no normative manifest key or schema. Deferred, with an honesty disclosure folded now. (supporting: oci-rec-r1-2, pkg-rec-r1-1, tag-rec-r1-1, sw-rec-r1-2)
- T5 -- Scope terms, (a) semantics, and org denial over every path. Closed by fold. (supporting: oci-rec-r1-4, sw-rec-r1-4, tag-nit-r1-4, pkg-rec-r1-4, tag-rec-r1-4, pkg-rec-r1-5, sw-rec-r1-1, tag-rec-r1-3)
- T6 -- Lifecycle and identity: transitive status from lock depth, retracting stale entries, frozen outcome for an opted-in server, visibility. Deferred to v0.1.1. (supporting: oci-rec-r1-3, pkg-rec-r1-3, oci-rec-r1-7, pkg-rec-r1-2, tag-rec-r1-5)
Fold now (3 item(s), all applied)
- [F1 / T5] sec.10.13 req-sc-016 clause (a) -- Under (a), the consumer deploys the consuming manifest's declaration, and a grant bound to the dependency's declaration does not apply.
Success criterion:the clause text is present exactly once; pinned test anchors still match; the MUST count is unchanged - [F2 / T4] sec.10.13 paragraph after req-sc-016 -- A non-normative disclosure that the grant's manifest key and the byte construction of the fingerprint input are implementation-defined at this revision.
Success criterion:the sentence contains no RFC 2119 keyword; totals stay at 148 (143 MUST, 5 SHOULD) - [F3 / T6] conformance coverage -- The depth-tamper probe became the asserting lifecycle test
test_lockfile_depth_edit_cannot_make_a_transitive_server_direct.
Success criterion:no probe file is committed; the test passes with APM_BINARY_PATH=.venv/bin/apm
Defer to v0.1.1 (6 items)
- [F4 / T1] req-sc-016 fingerprint -- Specify the canonical byte construction of the fingerprint input, with a shared oracle fixture.
- [F5 / T4] req-sc-016 (b); manifest schema -- A normative manifest key and schema for the grant, reconciled with req-sc-009
allowExecutables. - [F6 / T6] req-sc-016 transitive definition -- Derive direct versus transitive status from the consuming manifest (after
replace:) instead of lock depth. Today audit's no-orphaned-packages check and a fail-closed frozen install mitigate it. - [F7 / T6] req-sc-016, req-sc-011 -- Define four behaviors: retracting a stale written entry, the frozen outcome for a past opt-in, visibility of opted-in servers, and the role of
mcp.trust_transitive/mcp.self_definedonce enforced. - [F8] conformance coverage -- Add two tests: a byte-identical persist-nothing check after an opt-in run, and (a) re-declaration with a stale grant present.
- [F9] editorial -- "MUST NOT admit ... unless" phrasing; a req-sc-007 redaction cross-reference; split manifest sub-claims; an oracle fixture; a Section 10.12 half-sentence.
Linter handoff:
- All 11 checks pass at
d2c0eed8fa: ASCII-only, no forbidden tokens, unique anchors, and consistent counts at 148 (143 MUST, 5 SHOULD) across sec.1.3, Appendix C and Appendix D.- Links resolve. There are no mermaid blocks, and no schema or fixture changes.
- The CHANGELOG mentions openapm. orphan_check is aligned at 148.
- Check 11 notes that
.pyfiles changed. The code is reviewed separately by the autopilot-pr-review-worker panel (advisory comment above).
Full per-panel findings (round 1, condensed)
Swagger / OpenAPI editor -- shocked_meter 6/10, confidence high
Summary: The bookkeeping is clean. req-sc-016 lists exactly three consent routes, but the reference implementation contradicted it twice: a one-off opt-in overrode a stale pin, and a user-local pin admitted a server.
- [sw-blk-r1-1] The opt-in versus stale-pin MUST NOT conflict. Folded; the code was changed.
- [sw-blk-r1-2] The per-user pin was outside (b). Folded.
- [sw-rec-r1-1..6] Org denial scope; whose manifest; fingerprint definition; scope terms; the req-sc-010 relation; test gaps. Folded, except F8 (deferred).
- Nits: default-visible diagnostic, re-wrap, row 26, count note, sub-claims. Folded, except the sub-claims (F9).
OCI distribution editor -- shocked_meter 6/10, confidence high
Summary: The shape is right: deny wins, consent never comes from the lockfile, and a changed definition fails closed. But the trust anchor, the fingerprint, had no normative algorithm, envelope, coverage or registry binding.
- [oci-blk-r1-1] The fingerprint was undefined. Folded.
- [oci-rec-r1-1..7] Canonical construction (F4), schema key (F5), transitive from depth (F6), scope terms (folded), opt-in precedence (folded), user-local pins (folded), retracting stale entries (F7).
- Nits: redaction (F9), Threat sentence (folded), row 26 (folded), re-wrap (folded), oracle fixture (F9), Section 10.12 (F9).
Package-manager registry-contract editor -- shocked_meter 7/10, confidence high
Summary: The three admission paths have the right shape and keep consent independent of the lockfile. The fingerprint construction and coverage, frozen and opt-in lock behavior, transitive-from-depth, and the grant's manifest home needed pinning.
- [pkg-blk-r1-1] The fingerprint was undefined. Folded.
- [pkg-rec-r1-1..6] Grant home and req-sc-009/010 (req-sc-010 relation folded; key deferred to F5), frozen outcome (F7), depth (F6), (a) semantics (folded), mcp.* policy role (org denial folded; the trust_transitive role is in F7), tests (partly folded; F8).
- Nits: MUST NOT phrasing (F9), Threat sentence (folded), re-wrap (folded).
Web-platform architect -- shocked_meter 6/10, confidence high
Summary: The amendment is narrowly scoped and its counts are consistent, but the normative text diverged from the reference ladder (user pins, opt-in override) and left the fingerprint undefined.
- [tag-blk-r1-1] Per-user pins. Folded.
- [tag-blk-r1-2] Opt-in override. Folded; the code was changed.
- [tag-blk-r1-3] Fingerprint undefined. Folded.
- [tag-rec-r1-1..7] Grant syntax (F5 plus disclosure), the req-sc-010 relation (folded), org denial over all paths (folded), (a) semantics (folded), diagnostics and frozen edge (default-visible folded; frozen in F7), Appendix D changed-outcome class and migration (folded), MCP-only scope note (folded).
- Nits: "proposed" manifest prefix (folded), Threat sentence (folded), re-wrap (folded), scope terms (folded).
This panel is advisory. It does not block merge. Re-apply the spec-review label after addressing feedback to re-run.
Generated by apm-spec-guardian. This comment is AI-generated and may contain errors.
- an existing MCP pin is checked even when the new declaration would not need approval (self-defined -> registry no longer bypasses it); the pin probe is policy-free, so no extra org policy discovery - the admission subject fingerprints the authored declaration, as apm approve pins it - apm approve --list/--pending report a transitive server that a legacy mcp: true leaves parked, matching install (D2) Refs req-sc-016. Co-authored-by: Copilot App <[email protected]>
db1ca1d to
6c341b7
Compare
apm-spec-waiver: changelog-only follow-up to the req-sc-016 amendment commit Co-authored-by: Copilot App <[email protected]>
- Native plugins: an org/project deny wins before any hook file is read, and per-file pins only narrow the package verdict (no empty-pin bypass). - One per-type verdict reader, trust.package_type_verdicts, now backs apm policy explain, approve --list/--pending, doctor, lockfile exec_status and native status; G1 forbids pin-blind resolvers outside security/. - One MCP enumerator feeds install, status and pins, so a changed pinned registry overlay reads as not deployed everywhere. - --trust-transitive-mcp never re-approves a changed self-defined server. - apm audit --ci discovers org policy like install (honoring --no-policy) and names an unavailable policy instead of passing silently. - apm approve prints success after the write, exits 1 on a refused pin or declined prompt, and hints the APM 0.37 requirement on the first pin. - Stale integration tests moved to the pinned shape; new lifecycle traps for --user vs audit, refusal exit code and uninstall survivors. Refs #3902 (req-sc-016, req-sc-011) Co-authored-by: Copilot App <[email protected]>
- an existing MCP pin is checked even when the new declaration would not need approval (self-defined -> registry no longer bypasses it); the pin probe is policy-free, so no extra org policy discovery - the admission subject fingerprints the authored declaration, as apm approve pins it - apm approve --list/--pending report a transitive server that a legacy mcp: true leaves parked, matching install (D2) Refs req-sc-016. Co-authored-by: Copilot App <[email protected]>
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python architect | 1 | 2 | 0 | MCP routing and _has_pin are sound. Native admission had two owners (now folded). |
| Supply-chain security expert | 1 | 2 | 0 | The .apm/ exclusion was a heuristic (now a structural byte-copy rule). D2 and the pin-store fallback are folded. |
| DevX UX expert | 0 | 3 | 0 | The approve and parked messages now lead to an action that works. Docs show what is stored. |
| Test coverage expert | 0 | 3 | 0 | Three real-binary traps were added for the delta behaviors. |
Recommended follow-ups
These are deferred per the binding record; no issues filed.
- Org-level
mcp.trust_transitiveenforcement. It gives a governed org-wide lever without reopening transitive trust. - D7:
apm approve -gfor user-scope installs. - D10: park a package on a name conflict.
- Spec findings F4-F9 into req-sc-016 for OpenAPM v0.1.1 (see the spec guardian comment).
Ship now
Merge at 6c341b7 once CI is green.
Folded findings (delta)
- python-architect:
- B: single native owner.
- R: one type set.
- R: guard tokens.
- supply-chain-security-expert:
- B:
.apm/byte-copy rule. - R: transitive native D2.
- R:
_has_pinfallback.
- B:
- devx-ux-expert:
- R: apm-owned-reference loop.
- R: denied message.
- R: listed split-install item pins plus docs.
- test-coverage-expert:
- R: registry rewrite lifecycle.
- R: per-file native pins lifecycle.
- R: legacy
--pendinglifecycle.
Generated by autopilot-pr-review-worker. This comment is AI-generated and may contain errors.
6c341b7 to
0bb0886
Compare
…utables Approvals in apm.yml executables.allow can pin each hook file and MCP server to a full SHA-256 of what runs. One owner, security/trust.py admit(), decides every dependency-declared executable item for install, update, install --frozen, apm audit --ci, apm approve and the install prompt; security/trust_fingerprint.py is the only hasher. The lockfile stays evidence only (mcp_omissions reasons definition-changed, denied). - apm approve lists what each package runs and records pins; a changed definition is parked with a re-approve message. - --trust-transitive-mcp stays a one-off and says it does not persist. - install --frozen applies the executables gate like install (#3893). - audit --ci fails servers the lock admits but apm.yml does not approve. - Native plugin hooks are admitted per hook file from the install dir. - Legacy true approvals still deploy and warn. - Guards: executable-item-admission, trust-fingerprint, mcp-admission. Spec: OpenAPM v0.1 amendment 0.1.64 adds req-sc-016 and extends req-sc-011 to frozen install. Refs #3902 Co-authored-by: Copilot App <[email protected]>
apm-spec-waiver: changelog-only follow-up to the req-sc-016 amendment commit Co-authored-by: Copilot App <[email protected]>
- Native plugins: an org/project deny wins before any hook file is read, and per-file pins only narrow the package verdict (no empty-pin bypass). - One per-type verdict reader, trust.package_type_verdicts, now backs apm policy explain, approve --list/--pending, doctor, lockfile exec_status and native status; G1 forbids pin-blind resolvers outside security/. - One MCP enumerator feeds install, status and pins, so a changed pinned registry overlay reads as not deployed everywhere. - --trust-transitive-mcp never re-approves a changed self-defined server. - apm audit --ci discovers org policy like install (honoring --no-policy) and names an unavailable policy instead of passing silently. - apm approve prints success after the write, exits 1 on a refused pin or declined prompt, and hints the APM 0.37 requirement on the first pin. - Stale integration tests moved to the pinned shape; new lifecycle traps for --user vs audit, refusal exit code and uninstall survivors. Refs #3902 (req-sc-016, req-sc-011) Co-authored-by: Copilot App <[email protected]>
A natively loaded plugin is approved as ONE item, executables.allow.<pkg>.plugin: sha256:<64 hex>, over the native plugin file set (path, exec bit, bytes; APM's root apm.yml and .apm/ excluded). Any byte or mode change parks the plugin with the re-approve hint. Per-file hook pins and the stray-file refusal leave the native path; split installs keep per-hook-file pins (D3). Seam for #3290: security.trust.admit_native_plugin(allow_executables, package_keys, plugin_root) -> Admission, and security.trust_fingerprint.native_plugin_fingerprint, delegating to utils.content_hash.compute_native_plugin_hash. Refs req-sc-016 (unchanged; MCP-only text). Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Fold the supply-chain review of the whole-root plugin pin: - a plugin pin admits only a native install (admitted Copilot Agent Plugin or Codex bundle); a split install reads item pins, which apm approve now records beside the plugin pin; - with a pin, deny and the content hash are checked even when no executable type is detected; the native type set is one owner (native_root_exec_types); - decision A: an executable surface that references root .apm/ or apm.yml parks the plugin (apm-owned-reference) with one diagnostic naming the reference; - the dev-dependency lifecycle persists consent with apm approve before audit --ci (D6). Co-authored-by: Copilot App <[email protected]>
- define the definition fingerprint: full sha256, never by prefix, from installed source, covering every launch-affecting field plus the resolved registry entry; unrecognized means not matching - (b) also admits a per-user req-sc-010 pin (manifest decides); a dependency's own manifest never grants - a stale pin is withheld even under the opt-in; trust.admit no longer lets --trust-transitive-mcp override a changed overlay pin - define the scope terms, (a) semantics, org denial over every path, the req-sc-010 relation and the MCP-only scope; disclose that the grant key and byte construction are implementation-defined - lifecycle: a lockfile depth edit cannot make a transitive server direct Refs req-sc-016, req-sc-011. Co-authored-by: Copilot App <[email protected]>
CurrentMcpConfigView.select now takes McpAdmission instead of an approve callable plus trust_transitive_self_defined; install, both --frozen checks and audit admit through security/trust.py. Audit passes exact=False (structural evidence) and still re-checks consent. The omission-evidence rule pins the new routing; org deny-all records reason 'denied'. Drop the duplicated frozen CHANGELOG line (#3938 owns it). Refs req-sc-011, req-sc-016. Co-authored-by: Copilot App <[email protected]>
- an existing MCP pin is checked even when the new declaration would not need approval (self-defined -> registry no longer bypasses it); the pin probe is policy-free, so no extra org policy discovery - the admission subject fingerprints the authored declaration, as apm approve pins it - apm approve --list/--pending report a transitive server that a legacy mcp: true leaves parked, matching install (D2) Refs req-sc-016. Co-authored-by: Copilot App <[email protected]>
- every native install (pinned or not) is decided once by admit_native_plugin, over one type set (IR and manifest types passed as extra_types); the caller-side hook overrides are gone - root .apm/ content that is not a byte copy of a pinned plugin file, or a symlink, parks the plugin (apm-owned-reference); approve refuses it with exit 1 and --pending says it cannot be approved - a transitive native plugin with MCP needs the plugin pin (D2); admit_native_plugin gains keyword-only transitive and extra_types - a malformed pin store falls back to the full context, which reports it - denied items point at apm policy explain, not apm approve; the native listing says which split-install item pins it also records - lifecycle: registry rewrite of a pinned server parks, legacy mcp: true shows in --pending, real per-file pins never register a native plugin Refs req-sc-016. Co-authored-by: Copilot App <[email protected]>
admit_native_plugin read a plain allowExecutables mapping without a routed trust context as gate-off and admitted an unapproved Codex bundle; build a gate-on context from the map so it fails closed (req-sc-009, test_codex_consumer_denies_unapproved_manifest_referenced_mcp). Co-authored-by: Copilot App <[email protected]>
…admit_native_plugin - deployment_plan: Claude admission asks exec_gate.native_plugin_verdict, which calls security.trust.admit_native_plugin on the apm_modules source; parked plugins carry the trust owner's parked_plugin_message (req-na-005). - Drop the local native hasher; import native_plugin_files and compute_native_plugin_hash from utils/content_hash (#3918's single owner). - Fix: at user scope, install resolved executable trust from ~/apm.yml instead of ~/.apm/apm.yml, so pinned grants never applied to global installs; read the grants beside the manifest. - Fix: unpinned_apm_copy refused every normalized legacy plugin because of the parser-owned .apm/.plugin-skill-sources.json receipt; exempt exactly it. - apm approve treats a user-scope Claude-format plugin as native, so it writes the whole-plugin pin the native route checks (plus split item pins). - Pending-approval entries for a parked Claude plugin are marked native. - Lifecycle tests: park -> apm approve --all -> declared, with pinned grants. Co-authored-by: Copilot App <[email protected]>
) Windows has no POSIX exec bit, so chmod cannot change what the native plugin pin hashes, and the two #3918 tests that re-gated a pin through chmod failed on the Windows unit lane. The mode-change case is skipped on Windows, and the normalization-output test re-gates through a publisher byte change instead. Fixes #3985 Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]>
…ides for 0.37 (#3950) * docs: reground consumer, producer, integration and troubleshooting guides for 0.37 Refs #3948. Wave 1 of the 0.37 docs sweep (docs-corpus-audit): guide pages outside reference/, excluding pages owned by in-flight #3918 and #3290. Co-authored-by: Copilot App <[email protected]> * docs: tighten 0.37 frozen replay, origin and error quotes Panel follow-ups on the 0.37 guides sweep: --frozen still reads the marketplace for packages whose MCP/LSP servers come from the entry when apm_modules is empty; the rebound-alias origin check fires on any marketplace re-resolve, not only apm update; the dependency-confusion refusal runs after the marketplace.json fetch and before any plugin repository probe. Restore the remedy lines APM prints for the newer-lockfile, --frozen selection and MCP conflict errors, use a version pair that can actually produce the newer-lockfile refusal, and split the ci-cd --frozen sentence so "never" does not carry to "exits 1". Addresses CEO follow-ups FU-1..FU-4 (devx-ux-expert, doc-writer). Co-authored-by: Copilot <[email protected]> * docs: scope marketplace update, replay check and frozen upgrade apm marketplace update refreshes caches only and keeps the ones that refreshed when another fails, so it is described apart from the apm update / --refresh "changes nothing" guarantee. Rows replayed from apm.lock.yaml skip the dependency-confusion check, and the 0.37 --frozen upgrade note now applies only when an older lock records a pairing that differs from what 0.37 resolves. Addresses Copilot inline on consumer/update-and-refresh.mdx:105, troubleshooting/common-errors.md and troubleshooting/migration.md:183. Co-authored-by: Copilot <[email protected]> * docs: unify the --frozen MCP/LSP caveat and origin-conflict cause The marketplace read under --frozen applies to any package that contributes MCP or LSP servers whose copy under apm_modules/ is missing, so one per-package sentence now carries it on all three pages. The origin-conflict check only fires for an entry the lock already records, so a brand-new entry is no longer listed as a trigger. Addresses delta panel follow-ups (devx-ux-expert, doc-writer). Co-authored-by: Copilot <[email protected]> * docs: name the fresh-checkout MCP/LSP case for origin conflicts A package that contributes MCP or LSP servers re-resolves through the marketplace when its apm_modules copy is missing, so plain and --frozen installs on a fresh checkout can also hit the origin-conflict check. Mark the trigger list as examples and include that case. Addresses terminal delta panel follow-up (devx-ux-expert). Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]>
* docs: reground pages freed by #3918 and leftover 0.37 drift Refs #3948. Wave 2 of the 0.37 docs sweep (docs-corpus-audit): the pages #3918 owned (concepts, install-packages, enterprise policy and security, mcp-as-primitive, reference update/manifest-schema, apm-usage dependencies/governance) plus reference/cli/deps.md (#3916 refusal). Pages owned by in-flight #3290 are not touched. Co-authored-by: Copilot App <[email protected]> * docs(security): scope dependency-confusion and rebound claims to code The new threat-model row credited #3895 with general dependency-confusion protection, but it only catches one install graph declaring the same owner/repo from two hosts; bare shorthand still resolves to the default host. The rebound sentence also omitted lock rows without a recorded origin, local marketplaces and in-repo moves, which the check skips. Addresses supply-chain-security-expert panel findings and Copilot inline on docs/src/content/docs/enterprise/security.md:323. Co-authored-by: Copilot <[email protected]> * docs(policy): fix skill CLI samples and allow-list wording The apm-usage governance CLI samples used header and footer lines the CLI never prints and a dry-run overflow that cannot follow two lines (the preview limit is 5); align them with policy-reference. Section 3 still described a repo override in the discovered chain, and the allowlist rows said 'non-empty', contradicting null vs [] semantics. Addresses doc-writer and supply-chain-security-expert panel findings. Co-authored-by: Copilot <[email protected]> * docs(install): qualify marketplace replay and default_host wording Locked marketplace entries replay offline except for a package whose locked MCP or LSP servers have no apm_modules copy; that case reads the marketplace even under --frozen (drift.py catalog-metadata). Also tie default_host to the shorthand rather than #ref and link the newer lockfile troubleshooting section. Addresses Copilot inline on reference/manifest-schema.md:701 and doc-writer panel nit on consumer/install-packages.md:64. Co-authored-by: Copilot <[email protected]> * test(docs): track host-qualified policy wording in security.md security.md no longer says policy patterns are host-blind or cannot restrict host identity: dependencies.allow/deny accept host-qualified patterns (policy-reference). The docs-contract test still pinned the old wording and failed Build & Test Shard 1. Keep its intent (no transport-aware policy claim) and assert the scheme-blind sentence and the host-qualified link instead. Addresses CI failure in tests/unit/test_tls_docs_scope.py:127. Co-authored-by: Copilot <[email protected]> * docs(security): name the manifest whose default_host applies Each parsed manifest, transitive ones included, resolves its own bare owner/repo dependencies against its own default_host, so a root default_host does not pin the whole graph. Say so in the dependency-confusion row and point at host-qualified allow patterns as the control. Addresses supply-chain-security-expert delta panel finding on docs/src/content/docs/enterprise/security.md:635. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]>



Description
TL;DR. Approvals for dependency executables now live in
apm.yml, pinned to what actually runs: each MCP server and each hook file gets a full SHA-256 of its definition. One owner,security/trust.pyadmit(), makes the decision for install, update,install --frozen,apm audit --ci,apm approveand the install prompt. Two clones with the sameapm.ymlandapm.lock.yamltherefore get the same.mcp.jsonand lock without any flag. A changed upstream definition is parked with a re-approve message, and the lockfile stays evidence only, never consent.Problem (WHY)
Not portable. Since 0.36.0 (fix: 0.36.0 hardening of trust boundaries for credentials, deploy destinations, bundles and MCP consent #3716), transitive MCP servers needed
--trust-transitive-mcpon every run. The result depended on who ran the command, and--frozencould not reproduce it.Weak in practice. CI scripts carried the flag, which trusts every transitive server, including ones added later, and leaves no review artifact.
Approvals were not bound to content. Approvals matched only the package name, ignoring version and content (
_map_grants,security/executables.py:352-376on main). Upstream could change a hook command or script and it still deployed.Split authorities. Three deciders answered the same question:
mcp_config_view.py;exec_gate.py.Commands also fed them different inputs.
--frozenignored the executables gate (install/service.py:573, deferred from fix(mcp): audit accepts MCP that install leaves out under the executables gate or without transitive trust #3893), and audit trusted everything.Approach (WHAT)
security/trust.pyadmit(),McpAdmission,hook_file_filter,admit_native_plugin,record_pinsCurrentMcpConfigView.select(admission=...)(the #3938 factory, now gated by the trust owner), the frozen comparison, auditconfig-consistency, the exec gate, the source plan, hook reintegration, native plugins,apm approve, the install promptsecurity/trust_fingerprint.pyapm.ymlexecutables.allow.<pkg>.<type>.<item>: sha256:<64 hex>; a native plugin uses oneexecutables.allow.<pkg>.plugin: sha256:<64 hex>(--user: same shape in the personal config)truegrants, so a bool caller can never read a pin as "any content"The design was approved as revision 2 of the design doc (binding record). Daniel's decisions:
mcp: truenever satisfies transitive trust.--usergrants stay local, and audit never reads them.audit --cienforces consent.truenow warns.Implementation (HOW)
security/trust.py(new)definition-changed), then transitive trust, then the executables gate. It also covers per-file hook admission, native-plugin admission and pin recording. Its warnings are the one-off notice and the legacy-grant notice.package_type_verdicts()is the single per-type verdict reader forpolicy explain,approve --list/--pending,doctor, lockfileexec_statusand native status, and one MCP enumerator (package_mcp_declarations+is_pinnable_mcp) feeds install, status and pins.security/trust_fingerprint.py(new)native_plugin_fingerprint(root)is the canonical native bundle hash (relpath, executable bit, sha256 per file), so the approved source and the deployed copy compare equal. Canonical JSON with domain separation. MCP inputs: transport, command, args, env (values or${VAR}), url, headers, cwd, registry, version, package, tools, enabled and extra, plus the resolved registry entry for pinned overlays. Hook inputs: the hook document plus the bytes of every referenced script.security/executables.pyis Truechecks are used everywhere.EffectiveExecMapcarries the trust context.include_userexists for audit. The deadread_bundle_allow_executablesis removed.integration/mcp_config_view.pyderive(admission=)replacestrust_transitive_self_definedand #3893'swith_unapproved_executables.consent_problems()covers servers the lock admits thatapm.ymldoes not approve.install/service.py,policy/ci_checks.py,commands/uninstall/engine.py--user, and reportsdefinition-changedparking. Uninstall usesadmit_all(), as before. #3938 landed the frozen executables gate first; this PR routes itsCurrentMcpConfigView.selectfactory throughMcpAdmissioninstead of anapprovecallable, so install, both--frozenchecks and audit share one admission. Audit passesexact=False(structural evidence) and still re-checks consent.install/exec_gate.py,deployment_plan.py,deployable_source_plan.py,hook_reintegration.py,native_plugin_admission.pyplugin:pin decides every executable type of the package at once throughadmit_native_plugin; any byte or mode change parks the plugin withParked native plugin <pkg>: content changed since approvaland the re-approve command. Per-file hook pins never admit a native plugin. A refusal foldsexec_statusto gated, which retires the registration.check_executable_approvalstays a thin view over the owner.commands/approve.py${VAR}and code-loading values shown) and verifies installed bytes against the lock. It narrows legacy grants with a notice, and confirms the first approval on a TTY.--pendingand--listshow per-item states; a native plugin shows oneplugin . whole plugin, N files (...)item (8-hex display, 64-hex stored).[+] Approvedprints only after the write; refusals and a declined prompt exit 1; the first pin hintsTeammates need APM 0.37 or later.install-deployment-executable-item-admission,-trust-fingerprintand-mcp-admissionare registered in.apm/architecture/owners/install-deployment.json, each with a sorted MutationCase and an_EXPECTED_RULE_ID_TEXTentry.req-sc-016in §10.13, andreq-sc-011extended to frozen install. §1.3, §10.11 row 26, §11.3.2, Appendix C, the requirements manifest and CONFORMANCE are updated; the statement count goes from 147 to 148 (after 0.1.65). The apm-spec-guardian panel's three convergent blockers were folded into req-sc-016: the fingerprint is defined normatively, per-user pins are admitted, and a stale pin is never overridden by the one-off flag. Ship decision: fold_and_ship (guardian comment).Diagram
Admission ladder
admit()applies to every dependency-declared MCP server or hook file (root-declared items are admitted as before):flowchart LR A["dependency item: MCP server or hook file"] --> B{"org / user / project deny?"} B -->|"yes"| P1["park: denied"] B -->|"no"| C{"pin in apm.yml?"} C -->|"matches"| OK["admit"] C -->|"differs"| P2["park: definition-changed"] C -->|"none"| D{"transitive, needs trust?"} D -->|"yes, no flag"| P3["park: untrusted-transitive"] D -->|"no, or flag this run"| E{"executables gate on?"} E -->|"off"| OK E -->|"type grant"| OK E -->|"none"| P4["park: unapproved-executables"]Native plugin seam (for #3290)
Noneor noexecutables:opt-in)denied(wins over a matching pin)hooks/,bin/,.mcp.json,.lsp.json) references root.apm/orapm.ymlapm-owned-reference;Admission.detailnames the file and referenceplugin:pin equalsnative_plugin_fingerprint(plugin_root)plugin:pin differs (any byte, added file or mode change)definition-changedtrueunapproved-executablesThe fingerprint is
utils/content_hash.compute_native_plugin_hashovernative_plugin_files(plugin_root): the native bundle minus APM's rootapm.ymland root.apm/, as path, exec bit and sha256 per file. It equalscompute_native_bundle_hashof a deployed copy of that file set (req-na-002; tested). #3290 requires the deployed copy to match.A plugin pin is honoured only on the native path (
exec_gate.native_install: an admitted Copilot Agent Plugin or a Codex bundle).apm approverecords split-install item pins beside the plugin pin, so a split install of the same package never reads the whole-root pin.Trade-offs
npx,curl) is outside the binding, and the docs say so. The rejected alternative was a whole-package pin, which re-gates on every commit.--trust-transitive-mcprun now failsconfig-consistency. Three existing lifecycle tests now persist consent withapm approvebefore audit (test_mcp_omission_lifecycle.py,test_mcp_deliberate_omission_audit_lifecycle.py,test_mcp_dev_dependency_lifecycle.py).apm approve(req-sc-016; folded from the spec panel).--no-policy) and names an unavailable policy in theconfig-consistencymessage instead of silently passing.exec_status(above).Benefits
apm.ymlandapm.lock.yamlproduce identical.mcp.jsonand lock with no flags (lifecycle test (a)).--frozenandapm audit --cireach the install verdict for gate-parked and approved servers (b, c).Out of scope (deferred per the record; no issues filed)
apm approve -g(D7).mcp.trust_transitivekey, which is still parsed and still unenforced.apm.lock.yaml.Issue and approved scope
Issue: Fixes #3902
Human scope-approval comment: #3902 (comment) (it supersedes #3902 (comment))
This PR completes the issue: every Done-when item is covered below. Hook approvals were bound only to the package name (
security/executables.py:352-376on main) and are now content-bound per hook file. Local-bundle approvals were already content-bound (local_bundle_approval_key) and are unchanged.Type of change
Testing
Scenario evidence (blast-radius matrix)
.mcp.jsonand locktest_mcp_portable_approval_lifecycle.py::test_two_clones_reproduce_an_approved_transitive_server--frozenwith gate-parked and approved servers::test_frozen_applies_the_executables_gate_like_install;test_portable_mcp_approval_reqs.py::test_frozen_install_reaches_the_install_verdict::test_changed_definition_is_parked_until_reapproved::test_lockfile_only_edit_cannot_grant_trust;::test_lockfile_state_never_grants_transitive_consent::test_org_policy_beats_an_approval; unittest_row11_*,test_org_deny_beats_a_pinned_registry_overlay_and_the_flag::test_one_off_flag_warns_and_does_not_persisttruewarning::test_pinned_hook_file_is_parked_when_its_script_changes,::test_legacy_type_approval_warns_with_the_pin_remedy::test_native_plugin_is_approved_by_one_pin_over_its_whole_roothooks: trueregisters and warns::test_native_plugin_per_file_hook_pins_never_register_it,::test_native_plugin_legacy_hook_grant_registers_and_warnsadmit_native_plugin, including mode change, added file, deny over a matching pin, a prompt-only pinned plugin,.apm/references, normalization output ignored, and the plugin hash equal to the deployed bundle hash; a plugin pin never admits a split installtest_trust_admission.py::test_native_plugin_seam_*,::test_record_pins_adds_one_plugin_item_beside_split_item_pins,::test_plugin_pin_never_admits_a_split_install,::test_native_plugin_referencing_apm_owned_paths_is_parked,::test_native_plugin_hash_equals_bundle_hash_of_the_deployed_file_set,::test_plugin_grant_must_be_a_full_fingerprint_under_allow::test_first_project_approval_warns_about_packages_it_parks--userpin admits locally, audit ignores it::test_user_approval_admits_locally_but_audit_ignores_it::test_approve_refusal_exits_nonzero_and_writes_nothing::test_uninstalling_a_sibling_keeps_a_survivors_pinned_hookspolicy explainreports a pinned approval as allowed;apm updatedeploys pinned hookstest_executable_approval_default_host_lifecycle.py,test_executable_approval_replacement_lifecycle.py,test_hook_nested_metadata_install.pytests/unit/security/test_trust_admission.py(31),test_trust_fingerprint.py(14)Every lifecycle case fails on 0.36:
apm approvewrote no pins,--frozenfailed gate-parked servers, and audit accepted one-off locks.Commands and results
APM_E2E_TESTS=1 APM_BINARY_PATH=$PWD/.venv/bin/apm .venv/bin/python -m pytest tests/integration/test_mcp_portable_approval_lifecycle.py -p no:xdist -q: 14 passedtest_hook_nested_metadata_install.py,test_executable_approval_replacement_lifecycle.py,test_executable_approval_default_host_lifecycle.py,test_hook_path_package_lifecycle.py,test_local_bundle_hooks_lifecycle.py,test_manifest_rewrite_preservation_lifecycle.py,test_install_lsp_lockfile_determinism.py,test_lifecycle_workspace_lock.py,test_manifest_duplicate_key_lifecycle.py): 65 passed... tests/integration/test_mcp_deliberate_omission_audit_lifecycle.py tests/integration/test_mcp_omission_lifecycle.py: 10 passed.venv/bin/python -m pytest -p no:xdist -q tests/unit/install tests/unit/integration tests/unit/security tests/unit/commands tests/unit/policy tests/unit/copilot_plugins tests/unit/test_surviving_deps_reintegration.py tests/spec_conformance: 10018 passed, 2 load-timeouts intest_install_safety.pythat pass on rerun (42 passed)test_architecture_owner_rule_mutations.py(new and touched guards),test_architecture_runner.py,test_architecture_mcp_omissions.py,test_architecture_install_compound_mutations.py -k audit: all passeduvx [email protected] check/format --check, pylint R0801,scripts/lint-auth-signals.sh,scripts/lint_architecture_boundaries.py --root .: cleanHow to test
./pkgs/parent -> ../leaf, where leaf declares a self-defined MCP server, runapm install. The server is parked and the warning readsApprove for everyone: apm approve local:pkgs/leaf.apm approve local:pkgs/leaf. It lists the command, andapm.ymlgainsmcp: {leaf-server: sha256:...}.apm install. The server deploys, andapm install --frozenandapm audit --cipass.args, then runapm install. The server is parked withdefinition changed since approval; re-approve to restore it.apm install --trust-transitive-mcpwithout an approval. The run warnsfor this run only, andapm audit --cithen fails consent.Changelog
## [Unreleased]: three upgrade notes (audit consent, which is BREAKING; the 0.37 requirement for pinned grants; the legacytruewarning) and one Added line, each ending with this PR's number. The--frozenfix line belongs to fix(install): --frozen applies the executables gate and MCP omission evidence #3938, which landed first.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdgains the newreq-sc-016anchor and prose, an extendedreq-sc-011, and an Appendix C row (amendment 0.1.64, proposed).docs/public/specs/manifests/openapm-v0.1.requirements.yml.tests/spec_conformance/test_portable_mcp_approval_reqs.py(req-sc-016,req-sc-011).CONFORMANCE.{md,json}regenerated viapython -m tests.spec_conformance.gen_statement.Co-authored-by: Copilot [email protected]