Repository navigation
fix(NoTicket): harden CI checkouts and workflow permissions - #541
Merged
Merged
Conversation
lorenzhs
marked this pull request as ready for review
October 7, 2026 12:13
fstr
approved these changes
Oct 7, 2026
|
Contributor
Author
|
integration test run: https://github.com/firebolt-db/firebolt-python-sdk/actions/runs/37619853458 |
Contributor
Author
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.



Remove unused branch inputs and checkout ref overrides from code checks, unit tests, and security scans so each workflow checks out its triggering commit. Disable persisted checkout credentials and deny Actions cache access for code checks to address the cache-poisoning finding.
Declare explicit read-only token defaults across all workflows, retaining job-specific permissions for documentation and release publishing, integration-test status reporting, and SonarCloud PR reads. Include the necessary permissions on reusable-workflow callers.
Two commits address the two alert families separately:
Validation: pre-commit and reusable-workflow permission-chain checks passed. Actionlint passed with the documented
cache-modekey excluded because actionlint does not support it yet, and four pre-existing undeclared Core secret references excluded.Note
Low Risk
Changes are limited to GitHub Actions YAML; they reduce token scope and checkout risk without modifying SDK runtime code.
Overview
Hardens GitHub Actions in response to code-scanning findings on cache poisoning and missing workflow permissions.
Reusable workflows (
code-check,unit-tests,security-scan) no longer accept abranchinput or override checkoutref, so jobs always build the triggering commit. Checkouts in those paths setpersist-credentials: false, and the code-quality job setscache-mode: noneto limit cache-related exposure.Workflows now declare a default
permissions: contents: read, with narrower job-level grants where needed (e.g.contents: writefor docs build and release publish,statuses: writefor integration-test reporting,pull-requests: readfor security scans). Caller workflows pass explicit permissions into reusable security-scan and integration-test jobs so the permission chain stays valid.Reviewed by Cursor Bugbot for commit dbc1272. Bugbot is set up for automated code reviews on this repo. Configure here.