Skip to content

fix: CodeQL Highs (#107, #88–#106) and prepare GHSA-8hp3 / GHSA-3mgh - #5401

Draft
Hmbown wants to merge 2 commits into
mainfrom
cursor/codeql-ghsa-0c3f
Draft

fix: CodeQL Highs (#107, #88–#106) and prepare GHSA-8hp3 / GHSA-3mgh#5401
Hmbown wants to merge 2 commits into
mainfrom
cursor/codeql-ghsa-0c3f

Conversation

@Hmbown

@Hmbown Hmbown commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

CodeQL + GHSA slice only. Does not tag v0.9.8, publish crates/npm/Homebrew, or retag 2acbd5376 / 5ac75add4.

CodeQL #107 (High, clear-text logging)scripts/catalog_models_dev.py drift printed remote catalog limit values. Those values are now numbers, null, or the constant redacted. Source URLs drop query/fragment. Tokens never reach stdout.

CodeQL #88#106 (High, cache poisoning via untrusted code) — Read actions/cache-poisoning/poisonable-step and the YAML. The query treats workflow_call checkout-with-ref as an untrusted checkout, and any ref whose name matches *sha* the same way. workflow_dispatch is default-branch cache write.

resolve already proves the requested SHA equals github.sha. Later jobs now checkout the workflow SHA with no ref:. rust-cache keys are runner OS + arch + explicit stable + rust-cache's Cargo.lock / rust-toolchain.toml hash. github.event / github.ref / github.sha / inputs.* are not cache keys. setup-node's implicit npm cache is off on artifact assemble/smoke. Caller source_sha is compared in env only and cannot retarget checkout or caches.

GHSAs — both already patched on main in 208421b9d (first tagged release: v0.9.0). This token cannot read or publish draft advisories (403 on GET and PATCH). Public advisory URLs 404 (consistent with unpublished drafts). Payloads with those verified ranges are prepared; publish is stopped. No invented CVEs. No new exploit PoCs.

Testing

  • python3 scripts/catalog_models_dev_test.py (8 tests)
  • node .github/scripts/release-workflows.test.js
  • cargo fmt --all -- --check (no Rust source in this slice)
  • cargo clippy --workspace --all-targets --all-features --locked (no Rust source in this slice)
  • cargo test --workspace --all-features --locked (no Rust source in this slice; local codewhale-tui lib build hit a missing C++ cstring header in this VM)

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes (N/A — scripts + workflows)
  • Harvested/co-authored credit uses a GitHub numeric noreply address (no trailers; no bot/tool Co-authored-by)

v098-final harvest

Cherry-pick in order onto the local lane. Do not take tags or publish commits (there are none).

  1. ae088b4a49c8869b981fc0ff1b7405a08f027ea4 — catalog redact
  2. b379d7ec6ff9acfe522c746218191215240e6cd1 — release cache pin
git fetch origin cursor/codeql-ghsa-0c3f
git cherry-pick ae088b4a49c8869b981fc0ff1b7405a08f027ea4
git cherry-pick b379d7ec6ff9acfe522c746218191215240e6cd1
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 15, 2026 07:27
CodeQL #107 flagged scripts/catalog_models_dev.py:400 as clear-text
logging of sensitive information. Drift compared bundled limits to the
live Models.dev document and printed the upstream value with !r. Remote
JSON is tainted; a credential-shaped field would land in CI logs.

Format limit.context / limit.output as a number, null, or the constant
"redacted". Strip query and fragment from the upstream source label.
Never print tokens.

Verified: python3 scripts/catalog_models_dev_test.py (8 tests).

Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
CodeQL #88-#106 (actions/cache-poisoning/poisonable-step) flagged
release, candidate, and artifact jobs that checked out
inputs.source_sha or needs.resolve.outputs.sha and then ran cargo/npm
after rust-cache or setup-node cache.

The query treats workflow_call checkout-with-ref as an untrusted
checkout, and any ref whose name matches *sha* the same way.
workflow_dispatch is modeled as default-branch cache write. resolve
already proves the requested SHA equals github.sha, so later jobs
checkout the workflow SHA with no ref.

Pin rust-cache to runner OS + arch + explicit stable toolchain;
rust-cache still hashes Cargo.lock and rust-toolchain.toml from that
trusted tree. Never interpolate github.event, github.ref, github.sha,
or inputs into those keys. Disable setup-node's implicit npm cache on
artifact assemble/smoke. Caller source_sha is compared in env only and
cannot retarget checkout or caches.

Verified: node .github/scripts/release-workflows.test.js

Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants