Repository navigation
Description
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 (fix(lanes): read-only cache and no id-token in jobs that run PR code #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.
Activity
github-actions commentedon Oct 19, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
Understood: remove the "Restore the markdownlint download" and "Save the markdownlint download" steps (and the comment above them) from the lint-repo job in pr-require-checks.yml. markdownlint-cli2 is then fetched from the registry on every run instead of coming from an unverified npx cache. Nothing is missing. The refinement comment's acceptance criteria are specific enough to build from. The exploit path is unproven, the job holds no secrets, and the owner's 2026-10-26 rule applies, so no person hold is needed. Writer-side hardening stays in #8294. No likely duplicates among the open issues.
Automated triage, applied by the lanes App.
kyle-sexton commentedon Oct 25, 2026
Released for re-triage under the owner's 2026-10-24 rule: an issue stops for a person only for an intent or vision question, a security call, a host or attended run, or spend outside prepaid credit. The hold label came off and intake triage runs again now; it re-applies a hold, with a numbered question, when one of those applies.
To hold this issue again, add
needs-human(orstatus: needs-decision) and say why in a comment.melodic-automation-lanes commentedon Oct 25, 2026
The latest triage verdict holds nothing: the issue is at
status: ready.kyle-sexton commentedon Oct 26, 2026
Builder: the Automation Lanes session builds this from the owner's machine. The fix edits
.github/workflows, which the lanes App cannot push (patch-rules.json:3); that boundary stays. Its PR closes this issue.needs-humancame off under the owner's 2026-10-26 rule (a person only for an intent or vision change, an implementation finding that alters intent or the primary design, or a HIGH/CRITICAL security issue); none applies.agent-readystays off so the issue lane does not race the build.4 remaining items
melodic-automation-lanes commentedon Oct 26, 2026
Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed
- [ ]criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Oct 26, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: The lint-repo job in pr-require-checks.yml no longer restores or saves the unverified npx cache, so markdownlint-cli2 is fetched from the registry on each run.
Acceptance criteria
.github/workflows/pr-require-checks.ymlhas no step namedRestore the markdownlint download.github/workflows/pr-require-checks.ymlhas no step namedSave the markdownlint downloadgrep -rn 'npx_cache\|npx-markdownlint-cli2\|~/.npm/_npx\|~/.npm/_cacache' .githubprints nothingLint markdownstep still uses the melodic-software/ci-workflows markdownlint composite at the same pinned SHA with unchangedconfigandglobsinputssha256sum -ccheck are unchangedDependencies
Sources read
Automated refinement by the lanes App. Intake triages the issue again with it.