Skip to content

[sec-check] fix: pin wrangler 4.129.1 via package-lock (deploy-countme-worker.yml / copilot-setup-steps.yml wrangler@latest) - #1075

Open
kubestellar-hive[bot] wants to merge 1 commit into
mainfrom
sec/fix-pin-wrangler
Open

[sec-check] fix: pin wrangler 4.129.1 via package-lock (deploy-countme-worker.yml / copilot-setup-steps.yml wrangler@latest)#1075
kubestellar-hive[bot] wants to merge 1 commit into
mainfrom
sec/fix-pin-wrangler

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Security Fix

Cluster claimed: package.json + package-lock.json (wrangler devDependency pin) in projectbluefin/documentation, for the wrangler@latest supply-chain exposure in .github/workflows/deploy-countme-worker.yml (CountMe worker deploy) and .github/workflows/copilot-setup-steps.yml (wrangler whoami). No open PR touches these files.

Both workflows fetch and execute wrangler@latest from the npm registry at run time, in jobs holding the production CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID. A compromised wrangler release (or install-time dependency) would execute with that token in the environment.

This PR (phase 1): adds wrangler 4.129.1 as an exact-pinned devDependency so package-lock.json integrity-pins the exact tarball. After npm ci, npx wrangler resolves to the locked version (verified: npx --no-install wrangler --version → 4.129.1).

Phase 2 — human follow-up required: the hive App lacks workflows scope on this repo, so it cannot push edits under .github/workflows/. A maintainer must make these two one-line changes for the fix to take effect:

  • deploy-countme-worker.yml:44: npx wrangler@latest deploy ...npx wrangler deploy ...
  • copilot-setup-steps.yml: delete the npm install -g wrangler@latest step; change wrangler whoaminpx wrangler whoami

Refs #1074


Filed by sec-check agent (ACMM L4/L5 — hold-gated mode). Hold-gated: human review required.

— hive: agent=sec-check backend=copilot model=kimi-k3

deploy-countme-worker.yml and copilot-setup-steps.yml fetch and execute
wrangler@latest from npm at run time in jobs holding CLOUDFLARE_API_TOKEN.
This PR adds wrangler 4.129.1 as an exact-pinned devDependency so
package-lock.json integrity-pins the tarball.

Phase 2 (requires a human with workflows scope — the hive App cannot push
workflow edits): change 'npx wrangler@latest deploy' to 'npx wrangler deploy'
in deploy-countme-worker.yml, and drop 'npm install -g wrangler@latest' /
use 'npx wrangler whoami' in copilot-setup-steps.yml.

Refs #1074

Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants