fix(ci): stop running markdownlint from an unverified npx cache
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
調査の方向性
.github/workflows/pr-require-checks.ymlの862~884行付近を読み、markdownlint compositeがnpxをどのように呼び出すかを追ってください。markdownlintのダウンロードキャッシュを復元および保存するステップを削除し、各実行で固定されたパッケージをレジストリから取得するようにしてください。workflowがそのキャッシュを復元も保存もしなくなったことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Refs: #8294
Problem
lint-repo in .github/workflows/pr-require-checks.yml (lines 862-869) restores ~/.npm/_npx and ~/.npm/_cacache under a static key, npx-markdownlint-cli2-${{ runner.os }}-<composite sha>, before the markdownlint composite runs npx --yes markdownlint-cli2@<pin>. Lines 877-884 save the cache only from refs/heads/main.
GitHub's dependency caching docs say: "Cache contents are not signed or verified, and any workflow run that can read a cache may extract its contents. Extracted caches may modify files that are subsequently executed in a workflow run, leading to malicious code execution."
npx does not appear to re-verify a matching tree it finds in _npx (UNVERIFIED by the filer: from a reading of npm/cli workspaces/libnpmexec/lib/index.js, where a tree whose node.pkgid equals the requested spec skips fetch and reify and its bin runs as found).
- Attacker precondition: a write to main's cache scope under that exact key while it is absent (a pin bump or an eviction; the repo sits near the 10 GB cap). Jobs on trusted triggers such as
workflow_dispatchon main get a write-mode cache token by default, and the lane workflows dispatched that way run PR-head code with a model holding Bash (#8294). Whether that Bash can reach a cache-write path is unproven: the runtime token is set only for node and container action steps, andCLAUDE_CODE_SUBPROCESS_ENV_SCRUBisolates the PID namespace. Tampering with files a later node step in the same job executes has not been probed. - Impact: code runs in
lint-repoon every PR, merge group and scheduled run. That job holdscontents: read,checks: readand no secrets, so it cannot steal credentials. It can forge the markdownlint, typos, zizmor and actionlint results that feedci-status. - Contrast: the shfmt cache checks its binary with
sha256sum -cbefore use.
Fix
Delete the "Restore the markdownlint download" and "Save the markdownlint download" steps so npx fetches from the registry each run. Keying on a lockfile hash would not help, because npx ignores lockfiles. Writer-side hardening (cache-mode: read on the jobs that call the lanes) stays in #8294.
Priority
Low: no secret exposure, and it needs a write-capable main-scope run executing untrusted code first.
- 主要言語
- Shell
- スター
- 22
- フォーク
- 2
- 平均マージ
- 7時間 57分
- マージ済み PR(30日)
- 938
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
melodic-software/claude-code-plugins のほかの issue
-
priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
melodic-software/claude-code-plugins#8831 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
priority: medium status: confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melodic-software/claude-code-plugins#8801 ·
メンテナーはふだん 1 日以内に返信
-
priority: low status: confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melodic-software/claude-code-plugins#8799 ·
メンテナーはふだん 1 日以内に返信
-
fix(links): make the online link check green (23 errors since 2026-10-11)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンpriority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melodic-software/claude-code-plugins#8730 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
melodic-software/claude-code-plugins#8709 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
melodic-software/claude-code-plugins の issue をすべて見る
似ている issue
-
Negative subscript on a sparse array counts from the number of elements, not from the highest indexオープンarea: compat bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
reubeno/brush#1570 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
platform-mesh/helm-charts#2569 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
kunchenguid/firstmate#7604 ·
メンテナーはふだん 1 日以内に返信
-
product-to-storybook is skipped silently by npx skills add because its frontmatter is invalid YAMLオープン
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信