ci: prevent command injection in prevent-deletion workflow#3138
Conversation
9f9a958 to
60fca86
Compare
There was a problem hiding this comment.
Pull request overview
This PR hardens the prevent-deletion GitHub Actions workflow by avoiding direct interpolation of PR-controlled values into shell commands, reducing command injection risk in a pull_request_target workflow.
Changes:
- Moves PR head metadata, token, and repository values into step-level environment variables.
- Quotes shell variable usage in Git,
jq, andcurlcommands. - Fetches full history so
git diff --merge-basecan resolve the correct merge base.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Aolin <aolinz@outlook.com>
[LGTM Timeline notifier]Timeline:
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Oreoxmt The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
In response to a cherrypick label: new pull request created to branch |
|
In response to a cherrypick label: new pull request created to branch |
|
In response to a cherrypick label: new pull request created to branch |
|
In response to a cherrypick label: new pull request created to branch |
|
In response to a cherrypick label: new pull request created to branch |
|
In response to a cherrypick label: new pull request created to branch |
First-time contributors' checklist
What is changed, added, or deleted? (Required)
Which TiDB Operator version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?