chore(deps): pin dependencies#158
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
c5123ef to
37b8408
Compare
Comment on lines
+26
to
+29
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| ref: ${{ needs.release_please.outputs.sha }} | ||
| - uses: actions/setup-python@v5 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 |
Check warning
Code scanning / CodeQL
Checkout of untrusted code in trusted context Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
The safest fix without changing intended behavior is to remove the explicit checkout of the dynamic SHA in the privileged publish job and instead let the job operate on the trusted triggering commit (github.sha) by default checkout. Since this workflow already runs only on push to main, building and publishing from the workflow’s own commit is the correct trusted source and avoids the “untrusted checkout in privileged context” pattern.
In .github/workflows/release.yml, edit the pypi_upload job:
- Replace the checkout step so it no longer sets
with.ref: ${{ needs.release_please.outputs.sha }}. - Keep the rest of the job unchanged (Python setup, build, publish).
- No new methods/imports/dependencies are required.
Suggested changeset
1
.github/workflows/release.yml
| @@ -24,8 +24,6 @@ | ||
| if: needs.release_please.outputs.release_created | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| ref: ${{ needs.release_please.outputs.sha }} | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: "3.10" |
Copilot is powered by AI and may make mistakes. Always verify output.
37b8408 to
93f8280
Compare
93f8280 to
d915f53
Compare
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.
This PR contains the following updates:
6f8efc234e1148a26af69646c83f27b3170