Skip to content

fix(ci): remediate code-scanning alerts #778-#790 - #1363

Merged
dekobon merged 2 commits into
mainfrom
fix/code-scanning-778-790
Aug 29, 2026
Merged

dekobon merged 2 commits into
mainfrom
fix/code-scanning-778-790

Conversation

@dekobon

@dekobon dekobon commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Remediates the open code-scanning alerts in the #778#790 range.

CodeQL cache-poisoning #785#790 (release.yml)

All six traced to the workflow_dispatch tag input flowing through
preflight's ref output into every downstream checkout, followed by
cargo/cross executing that checkout. The input was never needed:
a rehearsal now dispatches from the tag
(gh workflow run release.yml --ref v0.0.0-test1), so github.ref is
the tag for both triggers and nothing user-typed reaches a checkout.
Preflight refuses a non-tag ref, and the per-job ref: overrides go
away because github.sha is already the tag commit.

Note: these jobs use no actions/cache, and dispatch already required
write access, so the practical risk was low — removing the taint
source was simply cheaper than six dismissals. Tags cut before this
change still carry the old workflow file and need -f tag= to
rehearse; RELEASING.md says so.

Scorecard Pinned-Dependencies #778#780 (Dockerfile)

  • FROM ubuntu:noble digest-pinned, plus a docker Dependabot entry.
  • cargo-binstall and uv from SHA256-verified release tarballs instead
    of curl | bash (uv was not yet flagged; Scorecard reports one
    instance per rule, so it would have reopened the alert).
  • Every binstall tool and npm global pinned to an exact version.

#780 will likely stay open — Scorecard wants a lockfile-driven
npm ci, which a global install cannot do — and should be dismissed
as won't-fix once this lands.

Not actionable

#781/#782 are stale clippy hits on the merged PR #1015 ref;
#783/#784 are already fixed.

make pre-commit: BCA_GATE: pass. A probe image exercised both new
tarball blocks on x86_64.

CodeQL flagged six cache-poisoning findings (#785-#790): the `tag`
input flowed through preflight's `ref` output into every downstream
checkout, and the build/deb/rpm jobs then executed that checkout
under a write-capable trigger on the default-branch cache scope.

The input was never necessary. `workflow_dispatch` can be run from
the tag itself (`gh workflow run release.yml --ref v0.0.0-test1`), so
`github.ref` is the tag for both triggers and nothing user-typed
reaches a checkout. Preflight now refuses a dispatch from a non-tag
ref instead of laundering an input, and the per-job `ref:` overrides
go away because `github.sha` is already the tag's commit.
Scorecard Pinned-Dependencies findings on the dev container (#778-#780):

- `FROM ubuntu:noble` is digest-pinned, with a `docker` Dependabot
  entry so the digest keeps moving.
- cargo-binstall comes from a SHA256-verified release tarball rather
  than the upstream `curl | bash` installer, and the tools it installs
  are version-pinned (cargo-about and mdbook to the CI pins). The uv
  installer at the same pattern was not yet flagged (Scorecard reports
  one instance per rule) and is converted in the same way so it does
  not reopen the alert.
- The npm globals are pinned to exact versions. A global install has
  no lockfile, so this is as far as npm pinning goes.
@dekobon
dekobon force-pushed the fix/code-scanning-778-790 branch from 0e5baa7 to ca36cd2 Compare August 29, 2026 19:23
@dekobon
dekobon merged commit ca36cd2 into main Aug 29, 2026
35 checks passed
@dekobon
dekobon deleted the fix/code-scanning-778-790 branch August 29, 2026 19:37
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.

1 participant