fix(ci): stop running markdownlint from an unverified npx cache
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
Đọc .github/workflows/pr-require-checks.yml quanh các dòng 862–884 và theo dõi cách composite markdownlint gọi npx. Xóa các bước khôi phục và lưu cache tải xuống của markdownlint để mỗi lần chạy đều tải gói đã ghim từ registry; xác minh rằng workflow không còn khôi phục hoặc lưu cache đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Shell
- Star
- 22
- Fork
- 2
- Merge trung bình
- 7 giờ 57 phút
- Pull request đã merge (30 ngày)
- 938
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của melodic-software/claude-code-plugins
-
priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melodic-software/claude-code-plugins#8831 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: medium status: confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melodic-software/claude-code-plugins#8801 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: low status: confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melodic-software/claude-code-plugins#8799 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(links): make the online link check green (23 errors since 2026-10-11)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởpriority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melodic-software/claude-code-plugins#8730 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
melodic-software/claude-code-plugins#8709 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của melodic-software/claude-code-plugins
Issue tương tự
-
Negative subscript on a sparse array counts from the number of elements, not from the highest indexĐang mởarea: compat bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
reubeno/brush#1570 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
platform-mesh/helm-charts#2569 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
kunchenguid/firstmate#7604 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
product-to-storybook is skipped silently by npx skills add because its frontmatter is invalid YAMLĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày