compilation-target policy check ignores the plural targets: key
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
src/apm_cli/policy/policy_checks.py の _check_compilation_target から始めてください。この関数はマニフェストの dict から target キーだけを読み取ります。apm install が複数形の targets: キーをどこで解決しているかを調べ、そのロジックを再利用して、チェックが両方のキーを受け入れるようにしてください。targets: [claude, cursor] を含むマニフェストが、許可リスト [claude, copilot] と enforcement block の下でチェックに失敗し、単数形の場合は従来どおり動作すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
The compilation-target policy check reads only the singular target: key from apm.yml. A manifest that declares its targets with the plural targets: key, which apm install honours ("Targets: claude, copilot (source: apm.yml)"), is reported as "No compilation target set in manifest" and passes, whatever targets it lists. So compilation.target.allow and compilation.target.enforce don't apply to those projects.
Version
APM 0.35.0 and 0.35.1. main has the same code.
Cause
_check_compilation_target in src/apm_cli/policy/policy_checks.py takes (raw_yml or {}).get("target") and returns a pass when it's empty.
Reproduction
- A policy with
compilation.target.allow: [claude, copilot]andenforcement: block. - An
apm.ymlwithtargets: [claude, cursor]. apm audit --ci --policy ./apm-policy.ymlpassescompilation-targetwith "No compilation target set in manifest". Withtarget: [claude, cursor]instead, the same check fails oncursor.
Expected
The check reads whichever of target and targets the manifest uses, the same way install resolves the targets.
- 主要言語
- Python
- スター
- 4.3k
- フォーク
- 415
- 平均マージ
- 3日 5時間
- マージ済み PR(30日)
- 172
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/apm のほかの issue
-
[BUG] Hermes MCP adapter drops cwd, extra passthrough keys and the SSE transport when writing config.yaml対応中かも @Parth-Vasave が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/apm#3749 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
require_pinned_constraint rejects [email protected] release tags as bare branches対応中かも @MohammedAlkindi が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Shorthand like git/git or jonas/tig is rejected because rstrip(".git") strips a character setオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
type/automation type/performance
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
[BUG] apm compile reports 'Referenced file not found' for links with a #fragment対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンstatus/accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/apm#3255 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
huggingface/kernels#1006 ·
メンテナーはふだん 1 日以内に返信
-
precond_kda (new op, #1552) backward kernels hit CUDA illegal memory access on Blackwell under triton 3.3.1, pass under triton 3.7.1対応中かも @YYuJLiu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fla-org/flash-linear-attention#1749 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bridgecrewio/checkov#7804 ·
メンテナーはふだん 2 日以内に返信
-
area:filesystem bug need-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
triage/confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agentscope-ai/agentscope#4068 ·
メンテナーはふだん 2 日以内に返信