Skip to content

Harden CI workflows: permissions, warnings-as-errors, parallel matrix - #13

Merged
popen2 merged 1 commit into
mainfrom
claude/ci-permissions
May 28, 2026
Merged

popen2 merged 1 commit into
mainfrom
claude/ci-permissions

Conversation

@popen2

@popen2 popen2 commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Set top-level permissions: contents: read on test.yml and release.yml so GITHUB_TOKEN is locked down to what actions/checkout actually needs (resolves the CodeQL findings from Add CI workflow to run clippy and tests on all PRs #12).
  • Set RUSTFLAGS=-D warnings in the test workflow so any rustc or clippy warning fails CI. With that, the explicit -- -D warnings clippy suffix is no longer needed.
  • Expand the test matrix to {profile} x {task} so clippy and test runs execute as 4 parallel jobs instead of serializing within one.
  • Drop unused mod fake_db; from tests/v1beta{1,2}_values_bad.rs — the dead_code warnings on TestDb/TestDbError would otherwise fail under -D warnings (and we want to avoid #[allow(dead_code)]).
  • Bump actions/checkout to v6 in both workflows (resolves the Node 20 deprecation warning).

Test plan

  • All four matrix jobs (clippy/test x debug/release) pass on this PR
  • CodeQL no longer flags either workflow

Addresses CodeQL findings on the test and release workflows (PR #12
review): neither declared an explicit permissions block, so GITHUB_TOKEN
defaulted to broader access than needed. The workflows only need to
checkout the repo; cargo publish uses CARGO_REGISTRY_TOKEN, not the
default token.

https://claude.ai/code/session_01BzqC31UjuAPBM2H7hfzdju
@popen2
popen2 merged commit 0a23da5 into main May 28, 2026
4 checks passed
@popen2
popen2 deleted the claude/ci-permissions branch May 28, 2026 17:34
@popen2 popen2 changed the title Add explicit contents:read permissions to CI workflows Harden CI workflows: permissions, warnings-as-errors, parallel matrix May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant