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

オープン 初心者向け
#3,954 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #3969 @danielmeppiel による — マージされずにクローズ

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend, cli

調査の方向性

install/template.py:67から始めて、apm install -gがユーザースコープのマニフェストを~/.apm/apm.ymlから読み込む仕組みを追い、その経路を-g --frozenの動作と比較してください。executables: {}と、hooksまたはMCPを含むパッケージを使って再現し、両方のコマンドで実行ファイルが保留されたままとなり、frozenインストールが終了コード0で終了することを確認してください。リンクされたプルリクエストはクローズされており、マージされていません。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
4.4k
フォーク
430
平均マージ
1日 22時間
マージ済み PR(30日)
285

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/apm のほかの issue

microsoft/apm の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。