ci: prevent command injection in prevent-deletion workflow#22928
Conversation
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
977c6a6 to
fa269b1
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the prevent-deletion GitHub Actions workflow (runs on pull_request_target) to reduce injection risk when handling pull request–provided values, and to generate check-run payloads more safely.
Changes:
- Quote PR-provided values by routing them through environment variables for
git/curlusage. - Replace
echo-constructed JSON withjq -nJSON generation for the check-run payload. - Adjust checkout/fetch behavior to ensure the head commit can be diffed reliably.
💡 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)
ci: prevent command injection in prevent-deletion workflow
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?