-
Notifications
You must be signed in to change notification settings - Fork 138
ci(manfest) updates the commit-latest script and action for the updated repo structure #3304
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
Closed
Closed
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
Some comments aren't visible on the classic Files Changed page.
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.
@coderabbitai it's probably a bit of a security theater, but this can be written without having to use
persist-credentials: true. See #3202Up to you if this is worth implementing. The credentials are still in memory and malicious code, if it ever gets to run in our action, can introspect runner's memory. So maybe it's useless.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: opendatahub-io/notebooks
Length of output: 2348
🏁 Script executed:
Repository: opendatahub-io/notebooks
Length of output: 2405
@jiridanek— you're right that it's a limited mitigation, but the concrete benefit is that the token is never written to.git/configon disk, so code executing in the workspace (e.g. a compromised build tool, a malicious dep pulled duringuv run) cannot read it via a simple file read. Memory introspection is a higher bar. Worth doing for consistency with the pattern established in#3202.The change is small — apply the same
x-access-tokenpush pattern:The job-level
permissions: contents: writestays as-is — it governs whatGITHUB_TOKENis allowed to do, which is unchanged. This is the same pattern used in#3202and aligns with the GitHub Security Lab guidance on preventing pwn requests.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.
checkout@v6, release notes:
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.
@jiridanek— you're right, and I stand corrected.persist-credentialsin v6 now stores credentials in a separate file under$RUNNER_TEMPinstead of directly in.git/config, which directly addresses the concern I raised. The token is no longer sitting in a workspace-accessible file where a compromised build tool could trivially read it.Since the workflow already pins
actions/checkoutat the SHA corresponding to v6.0.2, thepersist-credentials: true+git pushpattern here is fine as-is. Thex-access-tokenpush workaround I suggested was the right advice for v4/v5, but is redundant with v6's new storage location. Withdrawing that suggestion.