Harden release workflow: pin actions, split build/publish, add Dependabot#225
Open
temporaer wants to merge 2 commits into
Open
Harden release workflow: pin actions, split build/publish, add Dependabot#225temporaer wants to merge 2 commits into
temporaer wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Split the PyPI publish workflow into an isolated build job (no id-token, uploads the dist artifact) and a publish job that needs it, downloads the artifact, and holds id-token: write under the publish-to-pypi environment. This keeps OIDC publishing credentials off the build step and prevents a compromised build from publishing. Also add .github/dependabot.yml to enable weekly github-actions and pip update PRs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sarahnlewis
approved these changes
Jul 7, 2026
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.
Hardens the release/supply-chain posture of the workflows.
Changes
ci.yml,codeql.yml,publish.yml) — mutable tags like@v4/@release/v1can be repointed to malicious code.publish.yml:buildjob runs withcontents: readonly (noid-token), builds the wheel, and uploads it as an artifact.publishjobneeds: build, runs under thepublish-to-pypienvironment, holdsid-token: write, and downloads the artifact instead of rebuilding..github/dependabot.yml— weeklygithub-actionsandpipupdate PRs.Related hardening (applied directly, outside this PR)
publish-to-pypienvironment now requires review by ai4s-bioemu (prevent_self_review, no admin bypass).v*tag protection ruleset (creation restricted to ai4s-bioemu).require_last_push_approvalon themainbranch ruleset.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com