Skip to content

ci: avoid direct expression interpolation in shell steps - #4243

Draft
NginxL wants to merge 1 commit into
plotly:devfrom
NginxL:fix/4228-workflow-shell-interpolation
Draft

NginxL wants to merge 1 commit into
plotly:devfrom
NginxL:fix/4228-workflow-shell-interpolation

Conversation

@NginxL

@NginxL NginxL commented Dec 5, 2026

Copy link
Copy Markdown

Description

Fixes #4228.

Pass expression-derived values into shell steps through environment variables instead of interpolating them directly into the script:

  • Pass the Percy action command as PERCY_COMMAND and run it with bash -c, preserving shell command parsing.
  • Pass the benchmark run ID and base ref through RUN_ID and REF_NAME, and quote their shell expansions.

Validation

  • git diff --check passed.
  • Parsed both changed YAML files with Ruby Psych.
  • Exercised both Percy command paths with a stub npx and a quoted printf command. The command and its hello world argument were passed correctly.

Not run: the full Dash test suite, actionlint, or the benchmark workflow. This is GitHub Actions-only glue, and the application test dependencies and Chrome were not installed under the task disk limits. No application regression test was added.

Contributor checklist

AI disclosure

This change was prepared with AI assistance and reviewed by the submitter.

Signed-off-by: NginxL <8777777+NginxL@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 5, 2026

Copy link
Copy Markdown

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.

Security: GitHub Actions shell injection via github context in run step in .github/actions/percy-exec/action.yml

1 participant