Harden CI/CD workflows: pin actions to SHA, restrict triggers, scope permissions#56
Merged
Merged
Conversation
vikrantpuppala
approved these changes
Mar 26, 2026
Collaborator
vikrantpuppala
left a comment
There was a problem hiding this comment.
question on runner
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
Remediates critical and high-severity findings from a supply chain security analysis of all GitHub Actions workflows. This PR hardens CI/CD before re-enabling workflows.
Changes
actions/checkout@v2→actions/checkout@ee0669bd... # v2)publish-test.ymltrigger — changed fromon: [push](all branches) toon: push: branches: [main]to prevent unauthorized Test PyPI publishingintegration.ymltrigger — addedbranches: [main]to prevent Databricks secrets (host, token, catalog, schema, service principal) from being exposed on arbitrary branch pushespermissions:blocks to all 5 workflows — enforces least-privilegeGITHUB_TOKENscoping (contents: readeverywhere;pull-requests: writeonly ondco-check.ymlwhich needs to post PR comments)Findings Addressed
publish-test.ymltriggered on every push to any branchmainonlyintegration.ymltriggered on all pushes, exposing 6 Databricks secretsmainonlypermissions:— default token may have write accessPinned SHAs
actions/checkoutee0669bd1cc54295c223e0bb666b733df41de1c5actions/checkoutf43a0e5ff2bd294095638e18286ca9a3d1956744actions/setup-pythone9aba2c848f5ebd159c070c61ea2c4e2b122355eactions/setup-python7f4fc3e22c37d6ff65e88745f38bd3157c663f7cactions/cache0057852bfaa89a56745cba8c7296529d2fc39830actions/github-script00f12e3e20659f42342b1c0226afda7f7c042325snok/install-poetry76e04a911780d5b312d89783f7b1cd627778900atisonkun/actions-dco6d1f8a197db1b04df1769707b46b9366b1eca902reecetech/version-incrementddbbe72b7f76a996076fabfdce21a16384e8644aJRubics/poetry-publish969e8c47dd31083377ab78c536425bbc1b9698f0Attack Paths Mitigated
main.main.Future Recommendations (not in this PR)
JRubics/poetry-publishwith officialpypa/gh-action-pypi-publish.github/dependabot.ymlfor automated SHA pin updates.github/workflows/Test plan
publish-test.ymlonly triggers on pushes tomainintegration.ymlonly triggers on pushes tomainuses:line across all workflows contains a 40-char SHAdco-check.ymlhaspull-requests: writepermission (needed for PR comments)This pull request was AI-assisted by Isaac.