-
Notifications
You must be signed in to change notification settings - Fork 3
chore(deps): update actions/setup-python action to v7 #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
open-turo-bot
wants to merge
1
commit into
main
Choose a base branch
from
c/renovate_actions-setup-python-7.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
actions/setup-python@v7follows a mutable tag, so this workflow may execute changed action code ifv7is repointed. A compromised or retagged action could run intest-pre-installedand steal repository data or CI credentials.More details about this
actions/setup-python@v7in theSetup pythonstep is only pinned to thev7tag, so this job will run whatever code that tag points to at execution time. If someone who can publish or retagactions/setup-pythonmovesv7to a malicious release, this workflow would download and execute that new action onubuntu-latestbeforepip install pre-commit, letting it read the checked-out repository, stealGITHUB_TOKENor other job secrets, and send them out over the network.A plausible attack flow here is: 1) an attacker compromises the action publisher or release process for
actions/setup-python; 2) they repointv7to code that looks normal but adds a step to exfiltrate environment variables; 3) yourtest-pre-installedjob reachesuses: actions/setup-python@v7and runs the attacker's code; 4) that code can access the workspace created afteractions/checkout@v7, inspect repository contents, and use available credentials to tamper with CI behavior or access other systems tied to this workflow.To resolve this comment:
✨ Commit fix suggestion
View step-by-step instructions
Replace the version tag in the workflow step with the full commit SHA for the exact
actions/setup-pythonrelease you want to use.Change
uses: actions/setup-python@v7touses: actions/setup-python@<40-character-commit-sha>.Keep the action version intent clear by pinning to the commit that corresponds to the current
v7release, for example from theactions/setup-pythonrelease page or repository tags.Add a short comment next to the pinned reference if helpful, such as
# setup-python v7, so future updates are easier while still keeping the action immutable. Pinning to a commit SHA prevents the referenced action code from changing unexpectedly.Alternatively, if you need easier dependency updates, use a tool such as Dependabot to update
uses: actions/setup-python@<sha>automatically while still keeping the workflow pinned to a specific commit.💬 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 reasonsAlternatively, triage in Semgrep AppSec Platform to ignore the finding created by unpinned-github-action-strict.
You can view more details about this finding in the Semgrep AppSec Platform.