Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
865c9b3
fix(export-patch): make subdirectory package patches apply from the r…
danielmeppiel Nov 12, 2026
fc313e2
fix(export-patch): export edits to Claude plugin packages (#3649)
danielmeppiel Nov 12, 2026
de3e381
fix(view): accept logical absolute paths in view --file (#3649)
danielmeppiel Nov 12, 2026
d3b5915
test(redteam): C5 marketplace, pack, export-patch and view --file cha…
danielmeppiel Nov 12, 2026
bc79fd6
fix(lockfile): refuse a symlinked lockfile before update or uninstall…
danielmeppiel Nov 12, 2026
e4ac222
fix(audit): replay local apm.yml packages with plugin.json as apm_pac…
danielmeppiel Nov 12, 2026
96eb396
fix(install): keep a targeted package's dropped deps an unreached ent…
danielmeppiel Nov 12, 2026
f32f01e
fix(mcp): keep user short-name entries when a slashed server is remov…
danielmeppiel Nov 12, 2026
0169623
test(lifecycle): guard 0.36.0 release flows with lifecycle chains (#3…
danielmeppiel Nov 12, 2026
b4652dc
docs(changelog): record 0.36.0 red-team regression fixes (#3649)
danielmeppiel Nov 12, 2026
557a438
refactor(owners): route export-patch mirror, lockfile preflight, and …
danielmeppiel Nov 12, 2026
182422a
docs(changelog): cite #3672 for the red-team regression fixes (#3649)
danielmeppiel Nov 12, 2026
8d4076f
fix(compile): never overwrite hand-authored nested context files (#3655)
danielmeppiel Nov 12, 2026
137ee6e
fix(uninstall): keep apm.lock.yaml truthful when uninstall refuses (#…
danielmeppiel Nov 12, 2026
3e428b6
fix(uninstall): keep the other runtime's default root on selected-pro…
danielmeppiel Nov 12, 2026
8baa21c
fix(deps): replay proxy-routed lock rows under --frozen (#3657)
danielmeppiel Nov 12, 2026
91c2721
fix(audit): honor --no-cache for auto-discovered policy (#3659)
danielmeppiel Nov 12, 2026
8d341e8
test(policy): guard audit --ci agreeing with install on denied transi…
danielmeppiel Nov 12, 2026
eb90f65
fix(marketplace): real recovery hint, verified package refs, packed r…
danielmeppiel Nov 12, 2026
ba8ccdd
fix(bundle): name skipped source symlinks in pack; skip plugin hooks …
danielmeppiel Nov 12, 2026
194461a
fix(mcp): clean recorded servers after their runtime opt-in dir is pr…
danielmeppiel Nov 12, 2026
945d348
fix(hooks): retire merged events a hook source no longer declares (#3…
danielmeppiel Nov 12, 2026
52b13ec
fix(mcp): exit apm mcp install through the install outcome (#3666)
danielmeppiel Nov 12, 2026
a1991ab
fix(deps): list the dependency key apm uninstall accepts (#3671)
danielmeppiel Nov 12, 2026
6b589f6
fix(cleanup): never delete a deployed file without a matching recorde…
danielmeppiel Nov 12, 2026
328087a
fix(audit): replay local packages through the install package image (…
danielmeppiel Nov 12, 2026
b86ed0a
fix(prune): keep a hand-removed direct dependency another package sti…
danielmeppiel Nov 12, 2026
af0087d
fix(uninstall): keep is_dev as install writes it and never report a w…
danielmeppiel Nov 12, 2026
d97e5a6
refactor(install): gate update plans through one plan_inputs owner (#…
danielmeppiel Nov 12, 2026
6217a86
refactor(install): keep install modules within their LOC budgets (#3649)
danielmeppiel Nov 12, 2026
85ca100
docs(changelog): record the #3649 fix wave (#3672)
danielmeppiel Nov 12, 2026
5b7c9d1
docs(policy): state that org policy does not govern user-scope instal…
danielmeppiel Nov 12, 2026
431ea14
test(architecture): keep one matrix case per guard for sweep sub-rule…
danielmeppiel Nov 12, 2026
7b398a0
fix(install): keep packages apm.yml no longer declares during --froze…
danielmeppiel Nov 12, 2026
24a9c1c
docs(changelog): record frozen orphan retention (#3662)
danielmeppiel Nov 12, 2026
37b9475
test(lifecycle): install vs audit --ci replay matrix across package s…
danielmeppiel Nov 12, 2026
8d19325
fix(audit): keep local replay images out of the live apm_modules (#3667)
danielmeppiel Nov 12, 2026
8653a26
fix(deps): find case-equivalent installs in the reachability walk; ke…
danielmeppiel Nov 12, 2026
5eb13f1
docs(changelog): drop the #3658 entry delivered by #3606 (#3649)
danielmeppiel Nov 12, 2026
827a7eb
docs(changelog): remove stale placeholder bullets left by the rebase …
danielmeppiel Nov 12, 2026
b71ed5b
style(tests): format owner-rule mutations after rebase (#3649)
danielmeppiel Nov 12, 2026
280d205
fix(install)!: fail --frozen when deployed bytes differ from locked h…
danielmeppiel Nov 12, 2026
5d1fc53
docs(changelog): record the frozen hash verification break (#3654)
danielmeppiel Nov 12, 2026
26aef9d
test(spec): give the cleanup conformance context its frozen default (…
danielmeppiel Nov 13, 2026
675231f
fix(audit): keep user-scope local replay images out of the governed t…
danielmeppiel Nov 13, 2026
7aae544
test(lifecycle): parse git URLs in the SSH transport guard (#3640)
danielmeppiel Nov 13, 2026
5b0467c
test(deps): guard the case-equivalent install lookup directly (#3668)
danielmeppiel Nov 13, 2026
47ec465
refactor(architecture): register MCP config-key derivation owner (#3649)
danielmeppiel Nov 13, 2026
097b3e3
test(install): guard frozen hash verification at user scope (#3654)
danielmeppiel Nov 13, 2026
1b42ebb
fix(uninstall): scope selected-profile removal per package in batched…
danielmeppiel Nov 13, 2026
33a72f0
fix(install): refuse a symlinked lockfile before any update side effe…
danielmeppiel Nov 13, 2026
74666f9
fix(export-patch): classify plugin mirrors from path-specific receipt…
danielmeppiel Nov 13, 2026
b5e0609
fix(pack): reject symlinked relative hook scripts before packing (#3649)
danielmeppiel Nov 13, 2026
d2042cd
fix(pack): anchor packed relative hook scripts on the plugin root (#3…
danielmeppiel Nov 13, 2026
62d32bc
fix(hooks): retire dropped events under safe legacy source markers (#…
danielmeppiel Nov 13, 2026
21010d7
docs(changelog): match export-patch and pack entries to the review fo…
danielmeppiel Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .apm/architecture/owners/contracts-tooling.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
"selectors": ["src/apm_cli/deps/lockfile.py"],
"guards": [
"contracts-tooling-lockfile-read",
"contracts-tooling-lockfile-symlink-write-guard",
"contracts-tooling-lockfile-timestamp",
"contracts-tooling-lockfile-timestamp-constructor",
"contracts-tooling-lockfile-timestamp-fallback",
Expand Down
6 changes: 3 additions & 3 deletions .apm/architecture/owners/hooks-integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
},
{
"id": "mcp-package-launcher",
"decision": "MCP package launcher selection and argv shape (container and non-container)",
"owner": "adapters/client/base.py (MCPClientAdapter)",
"decision": "MCP package launcher selection, argv shape (container and non-container), and config-key derivation",
"owner": "adapters/client/base.py (MCPClientAdapter, including determine_config_key)",
"selectors": ["src/apm_cli/adapters/client/base.py"],
"guards": ["hooks-integrations-mcp-package-launcher"]
"guards": ["hooks-integrations-mcp-config-key-derivation", "hooks-integrations-mcp-package-launcher"]
},
{
"id": "mcp-passthrough-denylist",
Expand Down
12 changes: 6 additions & 6 deletions .apm/architecture/owners/install-deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"owners": [
{
"id": "single-file-package-materialization",
"decision": "Single-file dependency package layout and local source admission for replacement, audit replay and frozen hash images",
"owner": "deps/virtual_file.py (materialize_virtual_file_package) + install/phases/local_content.py (read_local_package_source, compute_local_package_hash, materialize_local_file_for_replay); DependencyReference owns suffix vocabulary",
"decision": "Single-file dependency package layout, local source admission and the local package image shared by install, uninstall refresh and audit replay",
"owner": "deps/virtual_file.py (materialize_virtual_file_package) + install/phases/local_content.py (read_local_package_source, materialize_local_package, compute_local_package_hash, materialize_local_package_for_replay); DependencyReference owns suffix vocabulary",
"selectors": [
"src/apm_cli/deps/virtual_file.py",
"src/apm_cli/deps/github_downloader.py",
Expand Down Expand Up @@ -79,8 +79,8 @@
},
{
"id": "frozen-install-mutation-eligibility",
"decision": "Frozen install mutation eligibility",
"owner": "install/service.py (InstallService)",
"decision": "Frozen install mutation eligibility and post-deploy deployed-hash re-verification (req-lk-017)",
"owner": "install/service.py (InstallService); deployed-hash verification shared with audit content-integrity through policy/ci_checks.py (verify_deployed_file_hashes)",
"selectors": ["src/apm_cli/install/service.py"],
"guards": ["install-deployment-frozen-mutation-eligibility"]
},
Expand Down Expand Up @@ -192,8 +192,8 @@
},
{
"id": "post-uninstall-dependency-reachability",
"decision": "Post-uninstall dependency reachability",
"owner": "deps/reachability.py (compute_forward_reachable_keys)",
"decision": "Dependency reachability after uninstall and the lock entries prune and deps list retain",
"owner": "deps/reachability.py (compute_forward_reachable_keys, retained_lock_keys)",
"selectors": ["src/apm_cli/deps/reachability.py"],
"guards": ["install-deployment-uninstall-reachability"]
},
Expand Down
11 changes: 11 additions & 0 deletions .apm/architecture/owners/marketplace-plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
"selectors": ["src/apm_cli/marketplace/source_identity.py"],
"guards": ["marketplace-integrations-source-admission"]
},
{
"id": "marketplace-entry-ref-verification",
"decision": "Which remote an authored marketplace entry resolves against, and whether its explicit ref exists there",
"owner": "marketplace/ref_resolver.py (package_entry_coordinates, explicit_ref_error); consumers: apm marketplace check and marketplace package add/set. Build-time sibling: builder._remote_source_coordinates",
"selectors": [
"src/apm_cli/commands/marketplace/check.py",
"src/apm_cli/commands/marketplace/plugin/__init__.py",
"src/apm_cli/commands/marketplace/plugin/set.py"
],
"guards": ["marketplace-integrations-source-parsing"]
},
{
"id": "local-marketplace-version-precedence",
"decision": "Local marketplace package-version manifest precedence",
Expand Down
5 changes: 3 additions & 2 deletions .apm/architecture/owners/transport-auth-platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@
},
{
"id": "host-credential-resolution",
"decision": "Host + credential resolution and effective provider identity consumed by dependency drift and dependency-scoped lock seeds",
"owner": "core/auth.py (AuthResolver), core/host_providers.py (effective_host_provider_identity); consumers: drift.py and tiered_ref_resolver.py",
"decision": "Host + credential resolution and effective provider identity consumed by dependency drift and dependency-scoped lock seeds, including registry-proxy route equivalence of lock rows",
"owner": "core/auth.py (AuthResolver), core/host_providers.py (effective_host_provider_identity), deps/artifactory_orchestrator.py (ArtifactoryRouter.routing_target, routes_to_locked_proxy); consumers: drift.py and tiered_ref_resolver.py",
"selectors": [
"src/apm_cli/core/auth.py",
"src/apm_cli/core/host_providers.py",
"src/apm_cli/deps/artifactory_orchestrator.py",
"src/apm_cli/drift.py"
],
"guards": [
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Cursor rules now use Cursor's native always-on `alwaysApply: true` instead of `globs: **` when an instruction's `applyTo` is exactly one `**`; reinstalling replaces old rules, and other `applyTo` values are unchanged. -- by @WilliamK112 (#2030)
- `apm mcp install --help` now lists its forwarded install options (`--transport`, `--url`, `--env`, `--header`, `--target`, `--registry`, `--mcp-version`, `--global`, `--trust-transitive-mcp`, `--dev`, `--dry-run`, `--force`, `--verbose`, `--no-policy`) with the same help text, accepted values and shell completion as `apm install`, instead of a hand-written summary that had drifted; forwarded installs behave as before. (#3633)
- `apm compile` places scoped `applyTo` instructions much faster on large projects (about 41x on a ~10,000-directory benchmark) by caching resolved paths and computing placement scores once per run; matching, placement, symlink handling and generated output are unchanged. -- by @sekosen (#3379)
- **BREAKING:** `apm install --frozen` now verifies every deployed file against its hash in `apm.lock.yaml` and exits `1` on a mismatch, naming each path with its expected and observed hash, as OpenAPM req-lk-017 requires. Before, it rewrote or kept the file and exited `0`, leaving `apm audit --ci` to fail later. This includes a user-edited skill that install keeps, and files that a newer APM renders differently. `apm audit --ci` no longer suggests `apm export-patch` for such rendering changes. Migration: after upgrading APM, run `apm install` once and commit the re-rendered files and `apm.lock.yaml`; export local edits with `apm export-patch` first. (#3672)
- **BREAKING:** APM now requires Python 3.11 or newer (Python 3.10 reached end of life in October 2026); standalone installers are unaffected (#3562)
- Prebuilt Linux binaries (x86_64 and ARM64) now require glibc 2.28 instead of 2.38, so they run on RHEL/Rocky/Alma Linux 8, Debian 10, Ubuntu 20.04 and newer; the Unix installer sends only hosts below glibc 2.28 to the pip fallback. -- by @eraow (#3553)
- `apm install` validates public `github.com` subdirectory packages, including nested Claude plugins, through `raw.githubusercontent.com` before any Contents API request, so packages with a reachable marker no longer spend anonymous REST quota on validation; `apm marketplace add` reuses the catalog it discovered instead of downloading it again. -- by @ShaoLOWu (#3348)
Expand All @@ -52,6 +53,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `APM_HOME` is now the single root for APM-owned user state: global `apm.yml`, `apm.lock.yaml` and `apm_modules/`, `config.json`, marketplace registrations, lifecycle trust and logs, and deployment receipts all follow it, so two `APM_HOME` values no longer share or leak into `~/.apm`. Unset keeps `~/.apm`; a relative value resolves against the starting directory; target deployment destinations are unchanged, and state-changing commands still serialize across `APM_HOME` values. -- by @WilliamK112 (#3614)
- `apm install` for Codex now warns, naming the agent, when an agent's `model` is a Claude alias (`opus`, `sonnet`, `haiku`, `inherit`) or `claude-*` id; the value is still written to the Codex TOML exactly as declared. Rebuilt from #3481 by @xubenqiang. (#3650)
- `apm --help` shows the `apm view` summary in full again instead of wrapping it at 80 columns. (#3651)
- `apm export-patch` now writes patches for subdirectory packages with paths from the repository root, so `git apply` works from a clone of the package repository as documented. It also exports skill edits in Claude plugin packages (`plugin.json`, no `apm.yml`) instead of skipping them as "ambiguous source"; a file whose source APM cannot prove is still skipped. (#3672)
- `apm view --file` accepts an absolute path through a symlinked working directory (such as macOS `/tmp`, or a symlinked workspace) instead of reporting it as outside the project. (#3672)
- When `apm.lock.yaml` is a symlink, `apm update`, `apm install --update` and `apm uninstall` now refuse before deploying, deleting or editing anything. Before, they applied the changes and then failed at the lockfile write, leaving a half-updated project. (#3672)
- `apm audit --ci` no longer reports false `unintegrated` drift for a local `apm.yml` package that also ships a root `plugin.json` (installed with `apm install DIR`); audit replays it as an APM package, the same way install does. (#3672)
- A targeted `apm install PKG` no longer removes a transitive dependency that another installed local package still needs after that package's `apm.yml` was edited; the next full `apm install` reconciles it. (#3672)
- Removing a self-defined MCP server whose name contains a slash (such as `com.example/server`) no longer deletes a user-authored `server` entry, or a still-declared server with that short name, from VS Code, Cursor, Copilot or OpenCode configs. (#3672)
- `apm compile` no longer overwrites a hand-authored nested `AGENTS.md`, `CLAUDE.md` or `GEMINI.md`; like a root file without the APM marker, it is kept with a warning, and `--clean` never treats it as orphaned output. (#3672)
- When `apm uninstall` refuses because a tracked file was edited, `apm.lock.yaml` now claims only the files still on disk, so a retry after you resolve the listed files completes. The refusal line now carries a status symbol. (#3672)
- Stale-file cleanup in `apm install`, `apm update`, `apm prune` and `apm uninstall` now deletes a lockfile-listed file only when its recorded hash matches, as documented; a row with no recorded hash keeps the file and warns. A committed `apm.lock.yaml` therefore cannot remove an unhashed user file. (#3672)
- `apm prune` keeps a dependency you removed from `apm.yml` while another installed package still needs it, so prune, `apm install` and `apm deps list` agree on what is orphaned. (#3672)
- `apm uninstall` keeps `is_dev` on a dependency that `devDependencies` still need, so the next `apm install` no longer rewrites `apm.lock.yaml`. `apm install --frozen` no longer prints "Updated apm.lock.yaml" when it writes nothing. (#3672)
- `apm audit --ci` replays local packages through the same package image install builds, so an instruction that is a contained symlink no longer reports as `orphaned`. (#3672)
- `apm uninstall` and `apm install` now remove a dependency's MCP servers from `.mcp.json` and `opencode.json` even after `.claude/` or `.opencode/` was emptied and pruned, instead of leaving an unowned server behind. (#3672)
- Deleting one hook file from a package (or from `.apm/hooks/`) now removes its merged events from `.claude/settings.json` and the other merged hook configs on the next install, instead of leaving entries that point at a missing script. (#3672)
- `apm mcp install` now exits non-zero when the forwarded install fails, such as on a policy denial, with the same exit code as `apm install --mcp`. (#3672)
- `apm deps list` shows the host-qualified key and the correct source (for example `gitlab`) for non-GitHub dependencies, so a key copied from it works with `apm uninstall`. (#3672)
- `apm pack` names the real fix when a marketplace package uses a branch ref, instead of suggesting a `--allow-head` flag that does not exist. `apm marketplace package add/set --ref` verifies the tag or branch on the package's own host and exits 2 without editing `apm.yml` when it is missing. Plugin bundles include hook scripts referenced from `.apm/hooks/`, anchored on `${CLAUDE_PLUGIN_ROOT}`. `apm pack` warns about each symlinked source file it skips. A local bundle install skips plugin hooks with a warning instead of writing a raw `.claude/hooks.json` and renaming scripts to `.json`. (#3672)
- `apm install --frozen` with `PROXY_REGISTRY_ONLY` replays the lockfile the proxy wrote, instead of refusing it as out of sync, and a repeat install makes no proxy requests. (#3672)
- `apm audit --ci --no-cache` now fetches a fresh org policy when the policy is auto-discovered. (#3672)
- `apm uninstall -g` under `CLAUDE_CONFIG_DIR` or `HERMES_HOME` no longer removes the package from the other runtime's default profile. (#3672)
- `apm install --frozen` no longer deletes the files of a dependency you removed from `apm.yml`: it keeps the files, checkout and lockfile rows, so disk and lockfile stay consistent, and names the kept packages. A normal `apm install` removes them. (#3672)
- The policy docs now state that org policy governs project installs only: `apm install -g` (user scope) is not governed by org policy today, including lifecycle `executables.deny_all`. (#3672)
- `apm install` again resolves transitive `git:` + `path:` dependencies from private GitHub monorepos on Git older than 2.36: a sparse checkout whose anonymous file fetch was rejected is no longer cached as an empty package (which failed `Not a valid APM package`). APM now retries it with credentials and rebuilds incomplete cached checkouts left by 0.29.1 and later, so `APM_NO_CACHE=1` is no longer needed. -- with credit to @jiteshjadav-rogers (#3602)
- `apm install DIR` with a single argument now installs an APM source package that has `apm.yml` and a root `plugin.json` as a local dependency, recording it in `apm.yml` and `apm.lock.yaml` exactly like `apm install DIR DIR`, instead of copying its source tree as a legacy bundle; real `apm pack` output, archives and legacy manifestless bundles still install as bundles. Approach from #3447 by @xubenqiang. (#3604)
- `apm audit --ci` no longer reports false drift on `.claude/apm-hooks.json` and `.claude/settings.json` after a clean install when the project's only root `.apm/` primitives are hooks: audit replay now integrates the project's own `.apm/` content whenever install does. -- reproduction and approach by @nefayran (#3600)
Expand Down
3 changes: 2 additions & 1 deletion CONFORMANCE.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,9 @@
"keyword": "MUST",
"section": "5.2",
"status": "active",
"test_count": 1,
"test_count": 2,
"tests": [
"tests/spec_conformance/test_lockfile_reqs.py::test_frozen_install_reverifies_deployed_file_hashes_and_fails_closed",
"tests/spec_conformance/test_lockfile_reqs.py::test_lockfile_deployed_file_hash_mismatch_fails_closed"
]
},
Expand Down
2 changes: 1 addition & 1 deletion CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ APM implements the proposed staged-replacement recovery capability (req-lk-023).
| [req-lk-014](docs/src/content/docs/specs/openapm-v0.1.md#req-lk-014) | MUST | 5.2 | consumer | active | 1 | - |
| [req-lk-015](docs/src/content/docs/specs/openapm-v0.1.md#req-lk-015) | MUST | 5.6.4 | consumer | active | 1 | - |
| [req-lk-016](docs/src/content/docs/specs/openapm-v0.1.md#req-lk-016) | MUST | 5.2 | consumer | active | 3 | - |
| [req-lk-017](docs/src/content/docs/specs/openapm-v0.1.md#req-lk-017) | MUST | 5.2 | consumer | active | 1 | - |
| [req-lk-017](docs/src/content/docs/specs/openapm-v0.1.md#req-lk-017) | MUST | 5.2 | consumer | active | 2 | - |
| [req-lk-018](docs/src/content/docs/specs/openapm-v0.1.md#req-lk-018) | SHOULD | 5.5 | consumer | active | 1 | - |
| [req-lk-019](docs/src/content/docs/specs/openapm-v0.1.md#req-lk-019) | MUST | 5.2 | consumer | active | 10 | - |
| [req-lk-020](docs/src/content/docs/specs/openapm-v0.1.md#req-lk-020) | MUST | 5.2 | consumer | active | 4 | - |
Expand Down
7 changes: 7 additions & 0 deletions docs/src/content/docs/enterprise/apm-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ before anything is written.
> [Governance Guide bypass contract](../governance-guide/#7-the-bypass--non-bypass-contract)
> for the full surface.

> **Scope note:** org policy governs project installs only. Discovery starts
> from the project's git remote, and `apm install -g` (user scope, under
> `~/.apm`) has no git remote, so user-scope installs, updates and
> uninstalls are not governed by org policy today, including lifecycle
> `executables.deny_all`. A package your org policy denies in a project can
> still be installed with `-g`.

### CI time (audit gate)

`apm audit --ci --policy org` runs 21 policy checks plus 8 baseline lockfile
Expand Down
4 changes: 3 additions & 1 deletion docs/src/content/docs/enterprise/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ Lock files generated before this feature omit `content_hash`. APM handles this g

On every cache hit, APM reads the cached checkout's `.git/HEAD` directly (not via `git rev-parse`, so a poisoned `.git/config` cannot subvert the check) and compares it to the lockfile's `resolved_commit`; on mismatch the cache entry is evicted and a fresh fetch runs. Local bundles get a fourth check: every file listed in `pack.bundle_files` is SHA-256 verified, symlinks under the bundle root are rejected, and unlisted files are flagged as a tampering signal.

**Lockfile cleanup authority.** A committed `apm.lock.yaml` is reviewed input: `apm install`, `apm update`, `apm prune` and `apm uninstall` delete a deployed file it lists only when the file's recorded `deployed_file_hashes` entry still matches the bytes on disk. Files without a recorded hash, or with a mismatch, are kept with a warning. A lockfile row whose recorded hash matches the bytes on disk still authorizes deletion, even for a file APM never deployed, so review lockfile changes in pull requests like code.

See the [Lock File Specification](../../reference/lockfile-spec/#44-content-integrity) for field details.

## Inventory export (SBOM)
Expand Down Expand Up @@ -368,7 +370,7 @@ during contained package materialization:
- **Integrator file discovery** (agents, instructions, prompts, skills, hooks) rejects symlinked files via `is_symlink()` checks in `find_files_by_glob` and `find_hook_files`.
- **Deploy tree copy operations** skip symlinks entirely -- they are excluded from the copy via an ignore filter.
- **MCP configuration files** that are symlinks are rejected with a warning and not parsed.
- **Lockfile writes** -- when the project or global `apm.lock.yaml` is a symlink, commands that write the lockfile (such as `apm lock` and `apm install`) exit non-zero with an error naming the link and its target. Neither the link nor its target is modified; replace the link with a regular file to continue.
- **Lockfile writes** -- when the project or global `apm.lock.yaml` is a symlink, commands that write the lockfile (such as `apm lock` and `apm install`) exit non-zero with an error naming the link and its target. Neither the link nor its target is modified; `apm update`, `apm install --update` and `apm uninstall` refuse before deploying, deleting or editing anything else. Replace the link with a regular file to continue.
- **Manifest parsing** requires files to pass both `.is_file()` and `not .is_symlink()` checks.
- **Manifest integrity** -- a malformed `apm.yml` (invalid YAML or non-mapping content) triggers a failing `manifest-parse` audit check. Policy and baseline CI checks never silently pass when the manifest cannot be parsed. If this check fires, fix the YAML syntax error in your `apm.yml` and re-run the audit.
- **Archive creation** -- `apm pack` excludes symlinks from bundled archives. Packaged artifacts contain no symbolic links, preventing symlink-based escape attacks in distributed bundles.
Expand Down
Loading
Loading