-
Notifications
You must be signed in to change notification settings - Fork 165
[bug] apm install integrates files in .github/instructions/ that are not produced by an installed plugin #1199
Copy link
Copy link
Open
Labels
area/audit-policyapm-policy.yml schema, custom_checks, install-time enforcement.apm-policy.yml schema, custom_checks, install-time enforcement.area/content-securityUnicode scanning, Glassworm, apm audit content checks, SARIF output.Unicode scanning, Glassworm, apm audit content checks, SARIF output.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/securitySecure by default. Content scanning, lockfile integrity, MCP trust boundaries.Secure by default. Content scanning, lockfile integrity, MCP trust boundaries.type/bugSomething does not work as documented.Something does not work as documented.
Metadata
Metadata
Assignees
Labels
area/audit-policyapm-policy.yml schema, custom_checks, install-time enforcement.apm-policy.yml schema, custom_checks, install-time enforcement.area/content-securityUnicode scanning, Glassworm, apm audit content checks, SARIF output.Unicode scanning, Glassworm, apm audit content checks, SARIF output.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/securitySecure by default. Content scanning, lockfile integrity, MCP trust boundaries.Secure by default. Content scanning, lockfile integrity, MCP trust boundaries.type/bugSomething does not work as documented.Something does not work as documented.
Type
Projects
Status
Todo
Summary
When a file is dropped directly into
.github/instructions/(not produced by any installed plugin),apm installappears to integrate it as if it were a managed primitive. The subsequentunmanaged-filespolicy check then reports zero unmanaged files, because everything in the monitored directory is treated as managed.Repro
Starting from a project with installed plugins:
Install logs include a line like
instructions/: ..., hand-rolled.instructions.md. The file is now treated as integrated.Then:
unmanaged-filesreports clean. The hand-rolled file evades the governance check that the policy is meant to enforce.Expected
apm installshould only deploy files that originate from declared plugin manifests. Files that pre-exist in monitored governance directories without provenance should be:unmanaged-filesaudit when the policy declaresaction: deny.Workaround
For the demo we used in this report we routed the unmanaged file to
.github/hooks/instead, which apm install does NOT touch. That correctly trips the audit, but it also reveals the asymmetry: the same content rule applies to all three monitored directories per policy spec, but only one of them is actually enforceable today.Impact
A consumer can side-step org policy
unmanaged_files: action: denyby simply placing instruction files at the right path before installing — apm install will adopt them silently and policy will treat them as managed.Related
Filed alongside #1198 (extends: silently downgrades unmanaged_files).