Harden CI workflows: permissions, warnings-as-errors, parallel matrix - #13
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
permissions: contents: readontest.ymlandrelease.ymlsoGITHUB_TOKENis locked down to whatactions/checkoutactually needs (resolves the CodeQL findings from Add CI workflow to run clippy and tests on all PRs #12).RUSTFLAGS=-D warningsin the test workflow so any rustc or clippy warning fails CI. With that, the explicit-- -D warningsclippy suffix is no longer needed.{profile} x {task}so clippy and test runs execute as 4 parallel jobs instead of serializing within one.mod fake_db;fromtests/v1beta{1,2}_values_bad.rs— the dead_code warnings onTestDb/TestDbErrorwould otherwise fail under-D warnings(and we want to avoid#[allow(dead_code)]).actions/checkouttov6in both workflows (resolves the Node 20 deprecation warning).Test plan
clippy/testxdebug/release) pass on this PR