[BUG] apm install -g ignores executables: in the user manifest, but -g --frozen honours it

Open Beginner friendly
#3,954 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #3969 by @danielmeppiel — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, cli

Research direction

Start with install/template.py:67 and trace how apm install -g loads the user scope manifest at ~/.apm/apm.yml; compare that path with the -g --frozen behavior. Reproduce with executables: {} and a package with hooks or MCP, then verify both commands leave the executables parked and the frozen install exits 0. The linked pull request is closed and unmerged.

Written by the indexing model from the issue text.

Description

area/security status/accepted type/bug

Reporting and investigating a bug need no permission. Before implementing a
substantive fix for inclusion in APM, obtain human scope approval and a review
contact on this issue. See Contributing.

Describe the bug
apm install -g ignores the executables: policy in the user manifest (~/.apm/apm.yml), while apm install -g --frozen honours it. Install deploys gated executables, and every later --frozen then fails. Root cause: install/template.py:67 reads ~/apm.yml, because the source root is ~ rather than the user scope manifest. This was introduced via #3938.

To Reproduce
Found by the 0.37 red team, confirmed on main 94b0c693f6.

  1. Set executables: {} in ~/.apm/apm.yml and run apm install -g on a package with hooks or MCP. The executables are deployed.
  2. Run apm install -g --frozen. It fails.

Expected behavior
-g parks gated executables exactly like -g --frozen does, so -g --frozen exits 0 afterwards.

Additional context
0.37 red team finding F1. Out of scope: the apm approve -g UX.

Dominant language
Python
Stars
4.4k
Forks
430
Avg merge
1d 22h
Merged PRs (30d)
285

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/apm

All issues in microsoft/apm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.