fix shell command built from environment values
https://github.com/segmentio/analytics-next/blob/80ef0bee716ee616ce9369da946be2999f3fe3a4/packages/browser/scripts/vendor/run.js#L6-L12
Fix the issue will replace the use of execSync with execFileSync and pass the command arguments separately. This approach avoids shell interpretation of the dynamically constructed command string. Specifically:
- Replace the dynamic command string
`yarn webpack --config ${configPath}`with the commandyarnand arguments['webpack', '--config', configPath]. - Update the
execSynccall to useexecFileSyncwith the new command and arguments.
This change ensures that the configPath value is treated as a literal argument and not subject to shell interpretation.
References
⚠️ No Changeset found
Latest commit: ce0b3aae3d5459e2e0386a1c29a5063a6315fa0e
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR