Skip to content

Conversation

@pyrytakala
Copy link
Contributor

Description

Fixes a command injection vulnerability in turbo-ignore by replacing execSync with execFileSync when validating git refs. The old implementation used shell command strings. The fix ensures that user-controlled input (like git refs from environment variables) is passed as literal arguments rather than being interpreted by a shell.

Testing Instructions

Run the security test: pnpm test security.test.ts in packages/turbo-ignore

Adds a test that verifies malicious refs are handled safely by checking
that no arbitrary commands are executed. This test would fail if the
old vulnerable execSync code (or any vulnerable variant) were used.

The test includes both behavior checks (verifying no file is created)
and pattern checks (verifying execFileSync is called with array arguments).
@pyrytakala pyrytakala requested a review from a team as a code owner November 25, 2025 19:22
@pyrytakala pyrytakala requested a review from tknickman November 25, 2025 19:22
@turbo-orchestrator turbo-orchestrator bot added the pkg: turbo-ignore packages/turbo-ignore label Nov 25, 2025
@vercel
Copy link
Contributor

vercel bot commented Nov 25, 2025

@pyrytakala is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@anthonyshew anthonyshew changed the title Fix/turbo ignore command injection fix: command injection in turbo-ignore Dec 4, 2025
@vercel
Copy link
Contributor

vercel bot commented Dec 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
examples-basic-web Ready Ready Preview Comment Dec 4, 2025 3:29pm
examples-designsystem-docs Ready Ready Preview Comment Dec 4, 2025 3:29pm
examples-gatsby-web Ready Ready Preview Comment Dec 4, 2025 3:29pm
examples-kitchensink-blog Ready Ready Preview Comment Dec 4, 2025 3:29pm
examples-nonmonorepo Ready Ready Preview Comment Dec 4, 2025 3:29pm
examples-svelte-web Ready Ready Preview Comment Dec 4, 2025 3:29pm
examples-tailwind-web Ready Ready Preview Comment Dec 4, 2025 3:29pm
examples-vite-web Ready Ready Preview Comment Dec 4, 2025 3:29pm
turbo-site Ready Ready Preview Comment Dec 4, 2025 3:29pm

@anthonyshew anthonyshew changed the title fix: command injection in turbo-ignore fix: Command injection in turbo-ignore Dec 4, 2025
Copy link
Contributor

@anthonyshew anthonyshew left a comment

Choose a reason for hiding this comment

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

Thanks!

@anthonyshew anthonyshew merged commit fe34922 into vercel:main Dec 4, 2025
175 of 177 checks passed
ch4og pushed a commit to csmplay/mapban that referenced this pull request Dec 4, 2025
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [turbo](https://turborepo.com) ([source](https://github.com/vercel/turborepo)) | [`2.6.2` -> `2.6.3`](https://renovatebot.com/diffs/npm/turbo/2.6.2/2.6.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/turbo/2.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/turbo/2.6.2/2.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>vercel/turborepo (turbo)</summary>

### [`v2.6.3`](https://github.com/vercel/turborepo/releases/tag/v2.6.3): Turborepo v2.6.3

[Compare Source](vercel/turborepo@v2.6.2...v2.6.3)

<!-- Release notes generated using configuration in .github/release.yml at v2.6.3 -->

#### What's Changed

##### turbo-ignore

- fix: Command injection in `turbo-ignore` by [@&#8203;pyrytakala](https://github.com/pyrytakala) in [#&#8203;11154](vercel/turborepo#11154)

##### Examples

- examples(security): Upgrade `Next.js` versions by [@&#8203;2qp](https://github.com/2qp) in [#&#8203;11195](vercel/turborepo#11195)

##### Changelog

- fix: Prevent vt100 TUI crash during column wrap by [@&#8203;neel3o115](https://github.com/neel3o115) in [#&#8203;11170](vercel/turborepo#11170)
- feat: Add GitHub Actions environment variable as default passthrough by [@&#8203;louis-bompart](https://github.com/louis-bompart) in [#&#8203;10740](vercel/turborepo#10740)
- docs: Updating READMEs by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11190](vercel/turborepo#11190)
- fix: Handle pidlock AlreadyOwned without failing init in LSP by [@&#8203;AryanBagade](https://github.com/AryanBagade) in [#&#8203;10831](vercel/turborepo#10831)
- ci: Fix integration test logging style by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11194](vercel/turborepo#11194)
- fix: Normalize config dir env vars to absolute by [@&#8203;Vansh0204](https://github.com/Vansh0204) in [#&#8203;11146](vercel/turborepo#11146)
- fix(vercel-api): Add `VIEWER_FOR_PLUS` and `SECURITY` role variants by [@&#8203;amondnet](https://github.com/amondnet) in [#&#8203;11169](vercel/turborepo#11169)

#### New Contributors

- [@&#8203;neel3o115](https://github.com/neel3o115) made their first contribution in [#&#8203;11170](vercel/turborepo#11170)
- [@&#8203;louis-bompart](https://github.com/louis-bompart) made their first contribution in [#&#8203;10740](vercel/turborepo#10740)
- [@&#8203;AryanBagade](https://github.com/AryanBagade) made their first contribution in [#&#8203;10831](vercel/turborepo#10831)
- [@&#8203;Vansh0204](https://github.com/Vansh0204) made their first contribution in [#&#8203;11146](vercel/turborepo#11146)
- [@&#8203;amondnet](https://github.com/amondnet) made their first contribution in [#&#8203;11169](vercel/turborepo#11169)
- [@&#8203;pyrytakala](https://github.com/pyrytakala) made their first contribution in [#&#8203;11154](vercel/turborepo#11154)

**Full Changelog**: <vercel/turborepo@v2.6.2...v2.6.3>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xNC4yIiwidXBkYXRlZEluVmVyIjoiNDIuMTQuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.csmpro.ru/csmpro/mapban/pulls/66
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
anthonyshew added a commit that referenced this pull request Dec 11, 2025
### Description

#11154 changed `turbo-ignore` from exec() to execFile() for security,
but getTask() still wrapped task names in quotes ("build"). With
execFile(), these quotes are passed literally, causing turbo to fail
finding a task named "build" (with quotes).

### Testing Instructions

Updated test and hand-tested it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: turbo-ignore packages/turbo-ignore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants