Skip to content

apm-policy.yml schema

Normative reference: this page documents the v0.2 working-draft policy schema as enforced by the current CLI. The normative, ratified contract for v0.1 is defined in OpenAPM v0.1, Section 6 (Policy) and published as JSON Schema at policy-v0.1.schema.json.

The apm-policy.yml schema. One file per org or repo. Loaded by apm install, apm audit --ci, apm policy status, and the install preflight before any package is written to disk.

For the workflow (where to put the file, how to roll it out), see Govern with apm-policy.yml. For CLI usage of apm policy status, see apm policy. For the wider governance picture (rulesets, registry proxy, CI gating), see Governance deep-dive.

apm-policy.yml is the install policy for agent primitives. In plain terms it decides:

  • Which sources are trusted — which dependencies and MCP servers apm install will accept (the allow / deny / registry_source rules).
  • Which versions install — whether refs must be pinned to bounded constraints, and how version conflicts on required packages resolve.
  • What the lockfile records and verifies — which artifacts the lockfile records, and what the install-time audit pass checks over them once written.

apm install enforces the dependency and MCP source rules, dependencies.max_depth, manifest.scripts and unmanaged_files.action: deny during install; manifest.scripts and unmanaged_files are judged the same way for a dependency install, --mcp and a local bundle (enforcement: warn warns, --dry-run previews each verdict without writing); apm audit --ci evaluates every rule on this page. Together they govern what gets installed — not what a running agent is later allowed to do.

apm-policy.yml is not a runtime permission system. It does not control:

  • Runtime permissions — what an agent may read, write, or call once it is running.
  • Sandboxing — process isolation or resource limits for a running agent.
  • Agent behavior — what a running agent actually does with the primitives it was given.
  • Marketplace enablement — which tools or extensions a harness exposes to the agent.

Those controls are owned by the agent harness that runs your agents, not by APM. APM stops at install: it decides what reaches disk, and the harness decides what runs.

Discovery order, in priority:

  1. Explicit policy source on apm audit --ci via --policy <ref> or apm policy status via --policy-source <ref>. apm install auto-discovers from the project’s git remote and supports --no-policy; it does not accept --policy today.
  2. Auto-discovery from the project’s git remote — checks the org policy repo cascade (.github-private, .github, .apm, _apm; Azure DevOps uses repository apm-policy in project apm, then falls back to legacy _apm/_apm only after a 404). When no candidate has a policy, the install proceeds silently; apm policy status reports outcome absent (see output fields). On GitHub, if .github-private returned 404, the status adds a hint that the credential may lack read access, because GitHub also answers 404 for private repositories you cannot read. Offline, an unreachable earlier candidate does not hide a policy cached from a later one: a cached policy up to 7 days old is applied, and output names it as stale. An authentication error still fails closed.

The <ref> accepts:

  • A local file path.
  • An https:// URL (plain http:// is rejected).
  • The literal string org (force git-remote auto-discovery).
  • <owner>/<repo> shorthand (defaults to github.com).
  • <host>/<owner>/<repo> for GHES or other hosts.

Do not embed credentials in direct policy URLs. APM strips URL userinfo, query strings, and fragments from policy cache metadata and diagnostics; use the repository forms above with the normal host authentication chain when possible.

FieldTypeDefaultRequiredNotes
namestring""noHuman label. Surfaces in apm policy status.
versionstring""noFree-form. Useful for change tracking.
extendsstring or nullnullnoParent policy reference. See Inheritance.
enforcementenumwarnnooff / warn / block. See Enforcement modes.
fetch_failureenumwarnnowarn / block. Behavior when a remote policy cannot be fetched or parsed.
cacheobject{ttl: 3600}noCache settings for remote policy fetches. ttl is capped at 86400 (24 hours).
dependenciesobjectsee sectionnoRules over APM dependencies.
mcpobjectsee sectionnoRules over MCP servers (direct and transitive).
compilationobjectsee sectionnoRules over apm compile outputs.
manifestobjectsee sectionnoRules over apm.yml content.
unmanaged_filesobjectsee sectionnoRules over files in target directories not tracked by the lockfile.
securityobjectsee sectionnoRules over APM’s security checks: install-time audit and external scanners (require the external-scanners flag), lockfile hashes and drift.
registry_sourceobjectsee sectionnoMandate registry usage and block non-registry sources (requires registries flag).
marketplaceobjectsee sectionnoRestrict the marketplace catalogs a project apm.yml may declare. See marketplace.
executablesobjectsee sectionnoOrg ceiling for executable-primitive trust (hooks, bin, self-defined MCP, LSP, canvas). See executables.
bin_deployobjectsee sectionnoDEPRECATED alias folded into executables.deny (bin-scoped). See bin_deploy.

Unknown top-level keys produce a warning, never an error — so newer policy files load on older clients. apm policy status --json returns these in the warnings array. Known fields with the wrong native YAML type are rejected instead of being silently replaced by defaults.

enforcement is the global outcome dial. Per-rule severities feed into this dial:

ModeBehavior
offPolicy is loaded and reported, but never blocks. Useful during rollout.
warnViolations print [!] warnings but exit code stays 0. Default.
blockViolations print [x] errors and exit non-zero. apm install aborts before writing to disk.

fetch_failure controls fail-closed behavior on the policy fetch itself (network down, malformed YAML, host mismatch). Set to block in production CI to refuse to run when policy cannot be loaded.

FieldTypeDefaultNotes
ttlinteger3600Seconds. Must be > 0. Applies to remote extends: and URL fetches.

Rules over the dependencies: and mcp: blocks declared in consumer apm.yml files.

When a dependency matches deny, apm install will not download or deploy that artifact. With enforcement: block, the install aborts before the denied package is downloaded or deployed. deny is an install-time decision, not a runtime block: it stops a denied artifact from being installed, and does not constrain what an already-installed or otherwise-present artifact does at runtime.

deny also covers local bundles and apm pack. apm install <bundle> checks the bundle’s own package name as _local/<name> (so **/<name> matches it) and every package its embedded apm.lock.yaml records. apm pack refuses when a declared dependency or a package in the project’s apm.lock.yaml is denied; pack applies no other dependency rule.

allow judges a local bundle by the packages its embedded apm.lock.yaml records, with the same matching as remote dependencies. It never matches the bundle’s own name (_local/<name>), which the bundle author chooses. Under an allow list, a bundle that records no packages is a violation. With enforcement: block, a bundle with any allow violation is refused before any file is written; warn reports it and installs, and off skips the check. Without an allow list, bundle installs are unchanged.

FieldTypeDefaultNotes
allowlist of patterns or nullnullnull = no opinion. [] = nothing allowed. [...] = only these.
denylist of patterns or nullnullnull = no opinion (transparent during merge). [] = adds nothing; inherited entries still apply. Always wins over allow.
requirelist of refs or nullnullnull = no opinion (transparent during merge). [] = adds nothing; inherited entries still apply. Packages every consumer manifest must include. Exact and host-bound; see below.
require_resolutionenumproject-winsproject-wins / policy-wins / block — how to resolve version conflicts on required packages.
max_depthinteger50Maximum depth in the resolved dependency graph. Canonical source identities are ref-insensitive and first-wins: later edges reuse the same dependency at its existing depth, even with a different ref, while a different origin remains distinct. Must be > 0. Under enforcement: block, apm install stops resolving at the limit and refuses the deeper chain before fetching past it; under warn it warns.
require_pinned_constraintbooleanfalseWhen true, every direct APM dep declared in apm.yml must use a bounded constraint (exact, ^/~/bounded range, literal tag such as v1.2.3 or pkg-a-v1.2.3 for a package named pkg-a, exact package release tag such as name@1.2.3 or @scope/name@1.2.3, or SHA). The declared constraint is judged, not the tag a range resolved to; transitive deps are not evaluated. Unbounded refs (missing ref, *, bare branch, bare >=X.Y) are routed through policy.enforcement (warn / block). Enabling on existing projects will likely surface violations; roll out with enforcement: warn first.

Examples (with require_pinned_constraint: true and enforcement: block):

apm.yml
dependencies:
apm:
- acme/skills # FAIL: no ref (NO_REF)
- other/lib#>=1.0.0 # FAIL: unbounded upper (OPEN_UPPER)
- third/lib#* # FAIL: wildcard (WILDCARD)
- acme/lib#main # FAIL: bare branch (BARE_BRANCH)
- fourth/lib#^1.2.0 # OK: caret range
- fifth/lib#~1.2.3 # OK: tilde range
- sixth/lib#1.5.3 # OK: exact version (bare)
- sixth_eq/lib#=1.5.3 # OK: exact version (npm/cargo explicit equality)
- sixth_pip/lib#==1.5.3 # FAIL: pip-style operator not supported (BARE_BRANCH)
- seventh/lib#v1.5.3 # OK: literal tag
- ninth/lib#v01.5.3 # FAIL: leading zero is not SemVer (BARE_BRANCH)
- acme/mono/packages/pkg-a#pkg-a-v1.5.3 # OK: this package's own release tag
- shadcn/ui#shadcn@4.12.0 # OK: exact package release tag (name@X.Y.Z)
- acme/mono/packages/pkg-a#pkg-b-v1.5.3 # FAIL: another package's tag (BARE_BRANCH)
- eighth/lib#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # OK: SHA
- ./packages/local # OK: local-path dep (no version surface)

Diagnostic shape (ASCII-only, [x] for block, [!] for warn):

[x] Policy violation: acme/lib -- bare branch 'main' tracks a moving tip
Blocked by org policy at org:contoso/.github (dependency-pinned-constraint). Nothing was changed. Pin `acme/lib` to a semver range, tag, or SHA in apm.yml, or contact your policy admin to allow it. Run `apm policy status` to see the active policy.
[x] Policy violation: acme/skills -- no ref; resolves to default branch
Blocked by org policy at org:contoso/.github (dependency-pinned-constraint). Nothing was changed. Pin `acme/skills` to a semver range, tag, or SHA in apm.yml, or contact your policy admin to allow it. Run `apm policy status` to see the active policy.

apm audit --ci lists the same dependencies under dependency-pinned-constraint details:.

A range is classified as the author wrote it: fourth/lib#^1.2.0 stays OK after the install selects v1.4.0 for it, and acme/lib#main stays FAIL whatever commit it resolves to. The package name used for {name}-v{version} and {name}--v{version} tags is the final path segment of a subdirectory dependency, otherwise the repository name. An exact name@X.Y.Z or @scope/name@X.Y.Z tag (optional v, semver prerelease/build allowed, at most one scope segment) counts for any name, because monorepo tags often name the published package rather than the directory. release@next, feature/x@1.2.3, name@^1.2.0 and name@1.x are not exact releases and still fail. The check judges declared release intent, not immutability: a tag can be moved. Replaying a committed lockfile with apm install --frozen installs the locked commit; security.integrity.require_hashes only requires every locked entry to carry a content hash, so an update can still record a moved tag’s new commit.

Patterns are matched against <owner>/<repo> (hostless, any host) or <host>/<owner>/<repo> (that host only; see Allow-list semantics). Wildcards via shell-style globs, e.g. contoso/*.

require entries are exact and name one host. A hostless entry names the default host (GITHUB_HOST, else github.com); a package on any other host (GitLab, GHES, Gitea) must be written with its host:

dependencies:
require:
- contoso/baseline # on the default host
- gitlab.example.com/platform/sub/pkg # on a self-managed GitLab

required-packages (declared in apm.yml) and required-packages-deployed (present in apm.lock.yaml) compare the same identity. An entry that matches no declared package fails both checks; when the package is declared on another host, the message names that host and the policy entry that would match it, so you can either move the dependency or, for a trusted host, change the entry.

A dependency written as an explicit registry-proxy path (art.example.com/artifactory/github/acme/tools) is identified by the proxy host: require it as art.example.com/acme/tools. Both checks pass, because apm.lock.yaml records that package under the same host. To keep default-host entries matching instead, set PROXY_REGISTRY_URL and keep plain shorthand.

A project’s default_host: does not change what a hostless entry names, and GITHUB_HOST can differ between machines: for an org-wide policy, write every require entry with its host. Ports are ignored, as for deny.

Required-package matching follows source replacement. When a root replace: rule swaps example-org/app for fork-org/app-fork, an entry identifies the selected package. Write fork-org/app-fork (with its host, if that is not the default). required-packages-deployed reads the lock entry, which stays recorded under example-org/app. apm install and apm audit --ci match the same way, and both judge registry_source against the selected source.

Rules over MCP server references, including transitive ones declared by deep dependencies.

FieldTypeDefaultNotes
allowlist or nullnullSame null/empty/list semantics as dependencies.allow.
denylist[]Always wins.
transport.allowlist or nullnullAllowed transports: stdio, streamable-http, sse (http is an alias of streamable-http). Checked against the effective transport APM writes, including registry servers, by install, update and apm audit --ci; a registry server whose transport cannot be resolved is a violation (blocked under enforcement: block, a warning under the default warn). null = no opinion.
self_definedenumwarnallow / warn / deny — treatment of MCP servers defined inline in apm.yml.
trust_transitivebooleanfalseWhen false, transitive MCP servers must be explicitly allow-listed.
FieldTypeDefaultNotes
target.allowlist or nullnullAllowed targets, e.g. copilot, claude. Aliases resolve (vscode is copilot); all allows every target.
target.enforcestring or nullnullIf set, the target selection must include this target.
strategy.enforceenum or nullnulldistributed / single-file. Pins the compilation strategy.
source_attributionbooleanfalseRequire source-attribution headers in compiled outputs.
FieldTypeDefaultNotes
required_fieldslist of strings[]Top-level keys every apm.yml must declare (e.g. description, license).
scriptsenumallowallow / deny — whether scripts: blocks are permitted. apm install refuses (block) a scripts: block in the manifest it installs (--root, -g, --mcp and local bundles included) before fetching or writing anything, or warns (warn); apm audit --ci fails it too. apm run does not consult it.
content_typesobject or nullnull{allow: [...]}. Restricts primitive content types (e.g. skill, prompt).
require_explicit_includesbooleanfalseWhen true, manifests must declare an explicit includes: list rather than rely on directory globs.

Files in primitive target directories that are not recorded in apm.lock.yaml.

FieldTypeDefaultNotes
actionenumignoreignore / warn / deny. deny blocks installs that would leave drift: under enforcement: block, apm install refuses when a governed directory would hold a file no lockfile row claims. --mcp and a local bundle refuse before writing anything; an install that deploys packages or local .apm/ content restores every file it deployed and its lockfile; --dry-run previews it; apm audit --ci fails the same state. Known limit: this verdict needs the deployed files, so an install killed between deploy and restore leaves them unrecorded.
directorieslist of paths[]Subset of target directories to check. Empty = all known target directories.
excludelist of globsnullWorkspace path globs to suppress from the report. Use to silence known harness-managed artifacts. Excluded paths are never reported. null = no opinion (transparent in the extends: merge); merges as a union down the chain.

Each reported file is a divergence-visibility finding, not a security verdict — apm.lock.yaml is hand-editable YAML, so this surfaces drift rather than proving a supply-chain attack. Every finding is enriched in place:

  • a factual reason — not tracked in apm.lock.yaml;
  • a lazy primitive-type tag ([type: skill|agent|instruction|mcp]) classified only for the already-flagged file, never the whole tree;
  • a deny-conflict note — matches deny rule (<pattern>) — when the path matches this policy’s own dependencies.deny or mcp.deny. This is surfaced for a human to resolve; APM never removes or blocks the file on this basis.
[!] .github/agents/rogue.agent.md [type: agent] -- not tracked in apm.lock.yaml; matches deny rule (**/rogue*)

A merged hook config (for example .claude/settings.json) and its apm-hooks.json sidecar count as managed only while their ownership is attested by the committed lock or the committed apm.yml approval. Every entry the sidecar records must name a dependency the lock records, or a local bundle whose exact approval key apm.yml grants hooks: true, and the config’s hooks must be exactly those entries. Any user-authored hook in the file, or a linked, unreadable or hand-edited file, leaves both files unmanaged. Other keys in the config are covered at file granularity. A special file (such as a FIFO) in a governed directory is always reported. With no executables block, bundle hook files count as unmanaged; approve them to attest.

Rules over APM’s security checks. The audit.on_install, audit.external and audit.scanners keys take effect only when the external-scanners experimental flag is enabled; they are ignored otherwise. audit.fail_on_drift and integrity.require_hashes always apply.

FieldTypeDefaultNotes
audit.on_installenum or nullnulloff / warn / block. Minimum install-time audit mode (a floor). null = no opinion. warn records findings; block halts installs on critical findings.
audit.externallist of stringsnullExternal SARIF scanner names (e.g. skillspector) that MUST run during the install audit. A required scanner that is unavailable fails the install closed.
audit.scannersmapping or nullnullPer-scanner governance, keyed by scanner name. Each value accepts allow_args (boolean). Restrict-only: see below. Unknown scanner names are a warning, not an error (forward-compat).
audit.fail_on_driftbooleanfalseWhen true, a bare apm audit exits non-zero if the workspace content has drifted from the lockfile. Default-off keeps drift advisory (rendered, exit 0). Only changes the exit code — the drift scan itself is unchanged. apm audit --ci already gates on drift regardless of this key.
integrity.require_hashesbooleanfalseWhen true, every non-local lockfile entry MUST carry a content hash; a missing or empty hash fails the install closed. Default-off preserves current behavior. Asserts hash-presence on the lockfile entry (no second hashing pass). Local dependencies are exempt (verified via deployed-file hashes).
security:
audit:
scanners:
skillspector:
allow_args: false # forbid extra-args passthrough at install time

audit.scanners is restrict-only. A policy may tighten a scanner’s behaviour but can never expand it:

  • allow_args: false strips any user/CLI external.<name>.args (and --external-args) for that scanner at install time, locking it to a vetted invocation. true / omitted leaves the user’s args in place (still allowlist-validated by the adapter).
  • Policy never contributes argv tokens itself and never forces LLM mode on. LLM opt-in stays a local user decision (--external-llm or external.<name>.llm). This removes any project-policy argv-injection or egress-coercion surface.

The floor is enforced during apm install (where org policy is loaded). A bare apm audit --external run does not load org policy and relies on the adapter’s allowlist validation for arg safety.

audit.on_install is a floor: it can only raise the effective mode chosen by apm install --audit / apm config set audit-on-install, never relax it. apm install --force downgrades a block to warn for that invocation; apm install --no-policy skips the policy floor entirely.

security:
integrity:
require_hashes: true # fail the install if any locked entry lacks a hash
audit:
fail_on_drift: true # `apm audit` exits non-zero on workspace drift

Both keys are additive, optional, and default off. require_hashes is enforced during apm install (the lockfile must record a content hash for every non-local entry, or the install fails closed). fail_on_drift is enforced by apm audit: when drift is detected it escalates the exit code to 1. Both keys only ever tighten — a child policy cannot relax a parent that turned them on.

extends: resolves a parent policy. Maximum chain depth is 5; cycles are rejected.

extends: accepts:

  • org — the same org’s auto-discovered policy repo.
  • <owner>/<repo> — another repo on the same host.
  • https://... — a direct URL.

For supply-chain safety, extends: references are pinned to the leaf policy’s host — a policy fetched from github.com cannot extend one on evil.example.com. If any parent is unreachable, the chain is incomplete and enforcement fails closed. APM never applies the weaker subset that happened to resolve.

A child can add restrictions but never remove a parent’s. A child [] on a deny or require list adds nothing and does not clear the inherited entries. One field widens instead: unmanaged_files.exclude entries are unioned, so a child can exclude more paths from the parent’s unmanaged-files check.

Field familyMerge rule
enforcementStricter wins (block > warn > off).
fetch_failureStricter wins (block > warn).
cache.ttlmin(parent, child).
*.allow listsSet intersection. null is transparent (no opinion).
*.deny / require listsUnion, deduplicated, parent order preserved. Omitting the field, null and [] all leave the parent list unchanged; a child cannot drop a parent entry.
dependencies.max_depthmin(parent, child).
manifest.require_explicit_includesLogical OR; once enabled, descendants cannot relax it.
dependencies.require_resolutionStricter wins (block > policy-wins > project-wins).
dependencies.require_pinned_constraintLogical OR — once a parent enables it, child cannot relax.
mcp.self_definedStricter wins (deny > warn > allow).
mcp.trust_transitiveLogical AND (true only if both sides true).
manifest.scriptsStricter wins (deny > allow).
unmanaged_files.actionStricter wins (deny > warn > ignore).
unmanaged_files.excludeUnion, deduplicated; additive-only. null and [] both preserve the parent list; a child cannot clear an inherited exclude.
security.audit.on_installStricter wins (block > warn > off). null is transparent.
security.audit.externalUnion, deduplicated. null is transparent.
security.audit.scannersUnion of scanner names; per scanner allow_args is AND-merged (any ancestor false wins — tightening). null is transparent.
security.audit.fail_on_driftLogical OR — once a parent enables it, a child cannot relax.
security.integrity.require_hashesLogical OR — once a parent enables it, a child cannot relax.
executables.deny_allLogical OR — any ancestor kill-switch (true) sticks.
executables.deny / require / recommend / enforceUnion, deduplicated. A child adds packages but never drops a parent’s.
compilation.*.enforceFirst non-null wins (parent precedence).
compilation.source_attributionLogical OR.

A merged chain is reported by apm policy status with each layer’s source attributed.

For every allow: field, the three states are distinct:

ValueMeaningInheritance behavior
omitted”no opinion”Transparent during merge.
[]”explicitly nothing”Intersects to nothing downstream.
[...]”only these patterns”Intersected with child list.

deny and require lists distinguish the same three values, but merge by union, so no value removes a parent entry:

ValueMeaningInheritance behavior
omitted / null”no opinion”Transparent during merge — parent value passes through.
[]”nothing to add”Adds nothing; parent entries still apply.
[...]”these entries”Unioned with parent list (parent order preserved).

allow, deny, and exact require patterns match on each dependency’s canonical identity casing, not the pattern’s literal case. GitHub owner/repository identities, and registry-backed identities (already canonicalized that way), compare case-insensitively — Contoso/Repo and contoso/repo are the same package. Non-GitHub git hosts, ADO, local paths, marketplace identities, virtual in-repository subpaths (the path segment after owner/repo), Git refs/version strings (after #), MCP server names, and registry names stay case-sensitive.

A hostless allow or deny pattern such as owner/repo matches that package on any host (a hostless require entry names the default host only); a host-qualified pattern such as github.com/owner/** matches only dependencies whose effective host (written, or GITHUB_HOST/github.com by default) is that host. Hosts compare case-insensitively and exactly. Put the owner/repository segments before recursive **; when a leading or fused ** makes their position ambiguous, later literal segments remain case-sensitive. deny takes precedence whenever a pattern matches.

For example, a mixed-case deny written as **/Secure-Baseline does not fire against the canonical lowercase repository name; write the owner/repository prefix first. A mixed-case owner-prefix deny that older releases failed to match can correctly surface new violations after upgrade.

Lowercase owner/repository patterns match before and after this fix. APM 0.30.0 and earlier match patterns byte-exactly, so lowercase duplicates added as a workaround stay necessary until every runner runs a release whose notes carry this fix.

Upgrading can also broaden allow matches on case-insensitive sources when a case-variant entry previously missed. Re-audit allow lists alongside deny and require entries during rollout.

# .github/apm-policy.yml -- shipped from the first auto-discovered policy repo
name: contoso-baseline
version: "2025.05"
extends: contoso-enterprise/policy
enforcement: block
fetch_failure: block
cache:
ttl: 1800
dependencies:
allow:
- contoso/*
- microsoft/apm-skills-*
deny:
- "*/legacy-*"
require:
- contoso/security-baseline
require_resolution: policy-wins
max_depth: 25
mcp:
allow:
- github/github-mcp-server
- contoso/internal-mcp-*
transport:
allow:
- stdio
- streamable-http
self_defined: deny
trust_transitive: false
compilation:
target:
allow:
- copilot
- claude
strategy:
enforce: distributed
source_attribution: true
manifest:
required_fields:
- description
- license
scripts: deny
content_types:
allow:
- skill
- prompt
- instruction
require_explicit_includes: true
unmanaged_files:
action: deny
directories:
- .github/instructions
- .github/prompts
exclude:
- .github/copilot-instructions.md

Mandate that APM dependencies come from configured registries. Checks apply transitively (including transitive deps pulled in by registry packages).

FieldTypeDefaultDescription
requirelist<string>[]Registry names that MUST be reachable. APM fails-closed if a listed name has no URL in the merged registry map (from project apm.yml, workspace ~/.apm/apm.yml, or ~/.apm/config.json) — this is intentional: a missing registry config is treated as a policy violation, not a no-op.
allow_non_registrybooltrueWhen false, APM blocks installation of any dependency not routed through a configured registry.
registry_source:
require:
- jf-skills
allow_non_registry: false

Restrict the marketplace catalogs a root project apm.yml may declare under marketplaces:, and the catalogs its marketplace packages are installed from: the catalog origin apm.lock.yaml records (source_url) and that of each fresh resolution, whether it came through the map or a registration. A locked package with no recorded origin is refused. Checked by the install policy gate and apm audit --ci. To clear a refused package, remove its apm.yml entry and run apm install, then add it back from an allowed catalog (apm update keeps the recorded catalog).

FieldTypeDefaultDescription
allowlist<string> or nullnullCatalog origins every declared marketplace and every locked or resolved marketplace package must match, as host/path globs (* = one segment, ** = any depth). A scheme, userinfo, .git and host case are ignored. null = no opinion; [] = no project may declare or install from a marketplace. A local-path catalog never matches.
marketplace:
allow:
- github.com/contoso/*
- gitlab.example.com/platform/agent-marketplace

The org ceiling for executable-primitive trust. Unifies the executable-trust vocabulary onto one noun, executables, governing all five gated types: hooks, bin/ executables, self-defined MCP servers (registry: false), LSP servers, and canvas extensions. The org layer is the ceiling on deny — it can deny and require fleet-wide, and recommend a vetted set, but personal or project consent can never widen past an org deny.

FieldTypeDefaultDescription
deny_allboolfalseWhen true, blocks every executable type for every package org-wide.
denylist<string>[]Canonical package strings whose executables must not deploy. Deny is the ceiling and always wins, and is the only side that supports fnmatch globs in v1, e.g. evil/* blocks every package under evil/.
requirelist<string>[]Packages whose executables MUST be present and trusted (exact-match only in v1). A required package whose executables are untrusted hard-fails the required-executable-untrusted audit check in CI. require mandates presence + trust but does not grant execution — it stays a developer-consent decision. To mandate AND auto-deploy fleet-wide, list the package in BOTH require and recommend.
recommendlist<string>[]Org-vetted set (exact-match only in v1): default-allowed unless locally denied. Bulk-accepted with apm approve --recommended.
enforcelist<string>[]v2 mandate tier; accepted but INERT in v1 — it degrades to recommend (no force-execute; a user deny still overrides). Writing it emits a deprecation-style warning.

Glob scope (v1): only deny supports glob patterns (it is the safety ceiling — broad denial is safety-positive). allow, recommend, and require are exact-match only; widening the GRANT side with a wildcard has a larger blast radius and is deferred.

Ports: a dependency on a non-default port has the key host:port/owner/repo. deny ignores the port, so acme/tool also denies github.com:8443/acme/tool. allow, recommend, and require must name the ported key.

apm-policy.yml
executables:
deny_all: false
deny: ["evil/*"]
require: ["acme/ci"]
recommend: ["acme/fmt"]

The install gate and apm audit resolve trust through one shared deny-wins, first-match-wins ladder (org deny > user deny > project deny > project allow > user allow > org recommend > default-deny). Each locked dependency records the resolved state in the exec_status field of apm.lock.yaml (one of deployed, gated_pending_approval, denied, absent). For the consumer-side commands that write project and personal trust, see apm approve and apm deny.

There is no enforce mandate runtime or cryptographic signing in this release: an executables.enforce rung is accepted in policy but fail-safe degrades to recommend (allowed, still overridable by a deny). Ordinary dependency grants remain package-scoped. Local bundle hook, MCP, LSP, and canvas grants use the exact SHA-256 content key printed by apm install; changed bundle content requires a new grant.

Deprecated: bin_deploy is the bin-scoped predecessor of executables. It is folded into executables.deny (bin type only) and honored as an alias for one minor cycle. Prefer executables.deny for new policies.

A Claude marketplace or native plugin loads as one unit: APM deploys it whole, bin/ included, and Claude Code adds the plugin’s root bin/ to the Bash tool’s PATH. The contract is Claude-specific, so bin/ deployment only targets Claude. Restart Claude Code (or run /reload-plugins) after install for new executables to be picked up.

Security note: deployed executables are tightened to 0o700 on POSIX systems and placed on Claude Code’s PATH, so Claude can invoke them without further confirmation. Use this field to opt out globally or per-package in enterprise environments. The --trust-bin / --no-trust-bin flags on apm install give per-invocation consent: --trust-bin deploys bin/ without the trust-posture warning. Because the plugin is one unit, --no-trust-bin, or a non-interactive install without --trust-bin, parks the whole plugin, not only bin/.

Scope: for the claude target, bin/ stays inside the plugin APM deploys whole to .agents/plugins/<plugin>/ (~/.agents/plugins/ with -g); a denied bin/ parks the whole plugin. See Native plugins.

Authoring plugins that ship bin/: see Repo shapes for marketplace producers for the producer-side contract (directory layout, executable bit, scope and trust posture).

FieldTypeDefaultDescription
deny_allboolfalseWhen true, suppresses bin/ deployment for every marketplace_plugin package, regardless of individual deny entries.
denylist<string>[]Package identities whose bin/ executables must not be deployed. Entries are normalized before matching, so MyOrg/MyPlugin, github.com/myorg/myplugin, and https://github.com/myorg/myplugin.git all match myorg/myplugin.
bin_deploy:
# Block all bin/ deploys organisation-wide:
deny_all: true
bin_deploy:
# Allow bin/ deploys except for one specific package:
deny:
- myorg/untrusted-plugin

Does my harness’s managed configuration replace APM?

No. apm-policy.yml controls what gets installed; your harness controls what runs; they do not overlap.

Copyright (c) Microsoft Corporation. General documentation: CC-BY-4.0. Software, code examples and OpenAPM: Apache-2.0. See scope and exclusions.