build(deps): bump pypa/gh-action-pypi-publish from 1.14.0 to 1.14.2 - #98
build(deps): bump pypa/gh-action-pypi-publish from 1.14.0 to 1.14.2#98dependabot[bot] wants to merge 1 commit into
Conversation
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.14.0 to 1.14.2. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](pypa/gh-action-pypi-publish@v1.14.0...v1.14.2) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-version: 1.14.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
|
|
||
| - name: Publish package | ||
| uses: pypa/[email protected].0 | ||
| uses: pypa/[email protected].2 |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
pypa/[email protected] is a mutable tag, so a moved tag could make this release job run attacker-controlled code with PyPI publish access.
More details about this
Publish package runs pypa/[email protected], which is a tag, not a full 40-character commit SHA. If the v1.14.2 tag is ever moved to different code, this release workflow would automatically run that new code with this job’s id-token: write permission when a GitHub release is published.
A plausible attack looks like this:
- An attacker compromises the
pypa/gh-action-pypi-publishrepository or the maintainer account that controls thev1.14.2tag. - They repoint
v1.14.2to a malicious commit that still looks like the real publish action. - When someone publishes a release, the
deployjob reachesuses: pypa/[email protected]and pulls the attacker’s code instead of the code you previously reviewed. - That malicious action runs inside your workflow after
Build packageand can read the built distribution files, the repository checkout fromactions/checkout, and the job’s OIDC token access frompermissions: id-token: write. - The attacker could then use that access to publish a tampered package to PyPI under your project name, for example a backdoored
olist-loaferrelease that downstream users would install.
Because the reference is mutable, the code executed during release can change without any change in this repository.
To resolve this comment:
✨ Commit fix suggestion
| uses: pypa/[email protected] | |
| uses: pypa/gh-action-pypi-publish@8ade135a41bc03ea155e62e844d188df1ea18608 # v1.14.2 |
View step-by-step instructions
-
Replace the mutable action tag with a full 40-character commit SHA in the
usesline for the publish step.
Changeuses: pypa/[email protected]touses: pypa/gh-action-pypi-publish@<full-40-character-commit-sha>. -
Get the SHA from the
pypa/gh-action-pypi-publishrepository release or tag that you intend to trust, and make sure it is the exact commit behindv1.14.2.
The final value should look likeuses: pypa/gh-action-pypi-publish@8ade135a41bc03ea155e62e844d188df1ea18608. -
Keep the version in a comment next to the SHA if you want the workflow to stay readable.
For example, useuses: pypa/gh-action-pypi-publish@<full-40-character-commit-sha> # v1.14.2. Pinning to a commit prevents the action owner from silently moving the tag to different code later.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.
You can view more details about this finding in the Semgrep AppSec Platform.
Bumps pypa/gh-action-pypi-publish from 1.14.0 to 1.14.2.
Release notes
Sourced from pypa/gh-action-pypi-publish's releases.
... (truncated)
Commits
dc37677Merge pull request #417 from trail-of-forks/ft/bump-deps8b2f234Bumppypi-attestationsandsigstore78b72dbMerge pull request #416 from takluyver/twine-v792f4d2aUpdate twine to v7ba38be9Merge pull request #408 from adisivaprasad/bump-setup-python-v6a6c5088Bump actions/setup-python from v5.6.0 to v6.2.0Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)