Commit Graph
1 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN b1353cb79b fix: prevent command injection in init scripts by validating install dir
- Added `validateInstallDir` function to `src/ops.mjs` to enforce strict allowlist for directory names (alphanumeric, hyphens, underscores, slashes, periods).
- Integrated validation into `resolveConfiguration` to sanitize both interactive and mock inputs.
- Added comprehensive unit tests in `test/install_dir_validation.test.mjs`.

This fixes a vulnerability where malicious directory names could inject shell commands into `package.json` scripts during initialization.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 03:28:59 +00:00