SIGN IN SIGN UP

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

0 0 48 TypeScript

chore(docker): avoid shell interpretation and uncontrolled path expansion (#31110)

Issue number: N/A

---------

## What is the current behavior?

When passing a Playwright flag with a space in its value (e.g.
`--project='Mobile Safari'`), the shell strips the quotes before Node
receives the argument. Since `docker.mjs` passed args to `execa` with
`shell: true`, the unquoted space caused the argument to be split and
Playwright never received the correct value.

Additionally, arguments like `-e DISPLAY=${display}`, `-v
${displayVolume}`, and `--mount` were constructed as combined strings
and passed through shell interpretation, meaning special characters in
those values (e.g. spaces in an absolute path) could cause the command
to fail unexpectedly. This caused CodeQL to trigger with security
issues.

## What is the new behavior?

Each Docker argument is now passed as a separate array element to
`execa` without `shell: true`, so values are forwarded directly to
Docker without shell re-interpretation. This preserves spaces within
argument values (e.g. `--project='Mobile Safari'`) and prevents
uncontrolled expansion of paths and environment variable values.

The security issues stated by CodeQL has been addressed.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

Verify that the following command works: `npm run test.e2e.docker
datetime/test/basic -- -g 'IO fallback' --project='Mobile Safari'
--repeat-each=20`
M
Maria Hutt committed
e0a99abb813ab7119e0482008c6e3b42af20ce1a
Parent: d79d266
Committed by GitHub <noreply@github.com> on 5/6/2026, 10:14:20 PM