Skip to content

Hotfix/apicli 3534#646

Merged
RohithSangati merged 4 commits intomainfrom
hotfix/APICLI-3534
May 5, 2026
Merged

Hotfix/apicli 3534#646
RohithSangati merged 4 commits intomainfrom
hotfix/APICLI-3534

Conversation

@RohithSangati
Copy link
Copy Markdown
Contributor

@RohithSangati RohithSangati commented May 1, 2026

Summary

Pass PR_TITLE through a step-level env: block instead of interpolating
${{ steps.pr_title_var.outputs.PR_TITLE }} directly into the run: shell
commands of the Check pr_title outputs and Create Pull Request steps.

This removes a script-injection surface: upstream PR titles can contain
shell-special characters (backticks, $(), quotes, ;), and inline
expression substitution would inject them into the script. Passing via env:
keeps the value as an opaque environment variable.

No behavior change for typical titles.

Ticket - https://do-internal.atlassian.net/browse/APICLI-3534

Copy link
Copy Markdown
Contributor

@harshmaru7 harshmaru7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !
fix is correct — passing PR_TITLE through env: instead of inline ${{ }} interpolation eliminates the script injection vector

we can do in this in follow up PR since this is low risk - Line 86 still interpolates ${{ github.event.inputs.openapi_short_sha }} directly in a run: block (same pattern in lines 26, 34, 45, 71, 81, 97, 108), its low risk because workflow_dispatch inputs require repo write access, but moving them to env: blocks too would be consistent defense-in-depth. but should can be done later.

@RohithSangati
Copy link
Copy Markdown
Contributor Author

RohithSangati commented May 4, 2026

LGTM ! fix is correct — passing PR_TITLE through env: instead of inline ${{ }} interpolation eliminates the script injection vector

we can do in this in follow up PR since this is low risk - Line 86 still interpolates ${{ github.event.inputs.openapi_short_sha }} directly in a run: block (same pattern in lines 26, 34, 45, 71, 81, 97, 108), its low risk because workflow_dispatch inputs require repo write access, but moving them to env: blocks too would be consistent defense-in-depth. but should can be done later.

@harshmaru7 Agree, We can address the remaining ${{ }} interpolations in a follow-up PR by moving them to env: blocks for consistency and improved defense-in-depth.

@RohithSangati RohithSangati merged commit 962653b into main May 5, 2026
6 checks passed
@RohithSangati RohithSangati deleted the hotfix/APICLI-3534 branch May 5, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants