Skip to content

fix: pin pypa/gh-action-pypi-publish to a commit SHA#115

Merged
lasch merged 1 commit into
mainfrom
pin-pypi-action
Jun 23, 2026
Merged

fix: pin pypa/gh-action-pypi-publish to a commit SHA#115
lasch merged 1 commit into
mainfrom
pin-pypi-action

Conversation

@jor2

@jor2 jor2 commented Jun 23, 2026

Copy link
Copy Markdown
Member

Follow-up to #109 to resolve the SonarQube security hotspot.

Hotspot: githubactions:S7637Using external GitHub actions and workflows without a commit reference is security-sensitive. Flagged on .github/workflows/release.yml line 57.

A mutable ref like @release/v1 can be repointed at any time, so a compromise of that branch would run untrusted code with our id-token: write / contents: write permissions during a release. Pinning to a full commit SHA makes the action immutable.

Change:

-        uses: pypa/gh-action-pypi-publish@release/v1
+        uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b  # v1.14.0

The SHA is the commit behind the v1.14.0 release tag. The trailing # v1.14.0 comment keeps it human-readable and is the convention Dependabot understands for future bumps.

The actions/checkout and actions/setup-python uses are first-party GitHub-owned actions and are not flagged by the rule, so they're left as-is.

Resolves the SonarQube security hotspot (githubactions:S7637): external
GitHub Actions should be pinned to a full commit SHA rather than a
mutable tag/branch ref. Pin pypa/gh-action-pypi-publish to the v1.14.0
commit SHA.

Signed-off-by: jor2 <jordanwilliams997@hotmail.com>
@jor2 jor2 self-assigned this Jun 23, 2026
@jor2 jor2 force-pushed the pin-pypi-action branch from 71fbc44 to e3a18c8 Compare June 23, 2026 14:01
@Sentient-CICD

Copy link
Copy Markdown
Collaborator

SonarQube Quality Gate: PASSED
No issues detected on new code.

View details in SonarQube

@lasch lasch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for the update.

@lasch lasch merged commit d1dc8e4 into main Jun 23, 2026
4 checks passed
@lasch lasch deleted the pin-pypi-action branch June 23, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants