Skip to content

fix: properly sanitize npm_config_registry env-var @W-22606077#1266

Merged
iowillhoit merged 4 commits into
mainfrom
d/W-22606077
Jun 11, 2026
Merged

fix: properly sanitize npm_config_registry env-var @W-22606077#1266
iowillhoit merged 4 commits into
mainfrom
d/W-22606077

Conversation

@jfeingold35

@jfeingold35 jfeingold35 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Properly sanitizes the registry url to make sure that it's a well-formed and non-malicious URL, thereby preventing command injection or other malicious jiggerypokery.

Replaced shelljs.exec() (which interprets shell metacharacters) with cross-spawn.sync() (which passes arguments as an array without shell interpretation). Preventing attacker-controlled package names from escaping into shell command execution.

What issues does this PR fix or reference?

@W-22606077@
@W-22561395@

@iowillhoit iowillhoit merged commit 1b27393 into main Jun 11, 2026
14 checks passed
@iowillhoit iowillhoit deleted the d/W-22606077 branch June 11, 2026 22:47
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