Repository navigation
[Aikido] Fix 7 security issues in zod, bundle-name, @inquirer/external-editor and 1 more - #98
Conversation
|
Skipping PR review because a bot author is detected. If you want to trigger CodeAnt AI, comment |
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Upgrade zod, bundle-name, @inquirer/external-editor, and yaml to fix prototype pollution, Base64 validation bypass, ReDoS attacks, and AppleScript injection vulnerabilities.
✅ Code not affected by breaking changes.
✅ No breaking changes from either package upgrade affect this codebase.
Zod (3.25.76 => 4.6.0): The codebase uses only basic zod features (
z.object(),z.string(),z.record(),z.enum(),z.boolean(),.url(),.optional(),.default(),.parse()). None of the breaking changes apply:The
z.record(z.string(), projectConfigSchema)usage is a simple string-keyed record without pattern matching or intersectionsThe
__proto__stripping behavior complements existing security protections rather than breaking themThe stricter URL validation only rejects invalid URLs, which is desired behavior
No usage of affected methods like
.pick(),.omit(),.extend(),.merge(), string length validation, datetime parsing, or specialized validators@inquirer/external-editor (1.0.3 => 3.0.3): All prompt names are simple strings (
"selection","value","password","confirmed") without dots, so the answer name expansion behavior change does not apply. Noexpandtype prompts are used. Node version requirements are satisfied.All breaking changes by upgrading zod from version 3.25.76 to 4.6.7 (CHANGELOG)
.pick()or.omit()on object schemas with refinements now throws an error instead of silently dropping refinements.extend()to overwrite properties on object schemas with refinements now throws an error.pick(),.omit()) now validate that the keys provided actually exist in the schema and throw errors for unrecognized keysz.strictObject(), only keys unrecognized by both sides are rejected, whereas previously any unrecognized key from either side would cause an errorz.undefined()schema are now treated as required (key must be present) instead of optional.merge()method now throws when the receiver has refinements instead of silently producing ambiguous refinement behaviorz.iso.datetime()now requires seconds in RFC 3339 format; minute-precision input like2020-01-01T06:15Zis no longer accepted (except withlocal: true).min(),.max(),.length()) now count Unicode code points instead of UTF-16 code units, which tightens validation for.min()and.length()on astral characters like emoji__proto__keys are now always stripped from parsed objects, records, and key transforms; strict mode reports own__proto__input keys asunrecognized_keysinstead of silently swallowing themz.ipv6()validation is stricter and no longer accepts malformed addresses like::@1\or::1\nz.ulid()now restricts the first character to0–7to prevent timestamp overflowz.httpUrl()now enforces RFC 1035 length limits on the hostresult.erroris first read rather than at parse time, so code that swapsz.config()between the parse and the read gets the newer configuration instead of the configuration active at parse time.z.emoji()now rejects component-only strings like"123","#","*", and lone zero-width joiners, variation selectors, or skin tone modifiers that were previously accepted..optionsno longer includes reverse mapping keys; a three-member numeric enum now lists only[0, 1, 2]instead of["UK", "Germany", "France", 0, 1, 2].z.base64()andz.base64url()changed to character sets with length/padding enforced in code; composingz.base64()into a template literal now checks alphabet but not length.z.regexes.emailno longer has capture groups,issue.patternon failedz.email()changed, andz.toJSONSchema()output no longer contains lookaheads; composing email into template literals no longer applies the no-consecutive-dots rule to the rest of the string..format,.minLength,.maxLength,.minValue,.maxValue,.isInt,.minDate,.maxDate) are now computed getters that materialize on first read instead of being written at construction;Object.keys()andObject.assign()behavior changes, and values can differ for order-dependent chains.fromJSONSchema()now enforces six validation keywords (minProperties,maxProperties,uniqueItems,contains,minContains,maxContains) that were previously ignored.All breaking changes by upgrading @inquirer/external-editor from version 1.0.3 to 3.0.7 (CHANGELOG)
namewith.are now expand in the answer object. e.g.name.subwould generate an answer object formatted as{name: {sub: 'answer'}}.expandprompt default value if not specified is nowhelp.✅ 7 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
__proto__key is treated as a normal property and can replace the result object's prototype. This allows attackers to inject inherited properties into validated objects.base64andbase64urlstring-format validators use regular expressions whose repeated capturing groups recurse over the input. Validating a large or specially composed untrusted string withz.string().base64()orz.string().base64url()overflows the regex engine call st...bundleNameinserts the caller supplied bundle identifier directly into an AppleScript string passed torunAppleScriptwithout validating it. A bundle identifier containing a double quote, backslash, or line break can escape the AppleScript string literal and inject additional st...🔗 Related Tasks
🤖 Remediation details
Fix security vulnerabilities in
zod,yaml,bundle-name, and@inquirer/external-editorShort summary
This PR remediates security vulnerabilities in four npm packages:
zod,yaml,bundle-name, and@inquirer/external-editor. Two of these (zodandyaml) are direct dependencies declared in the rootpackage.json; the other two are transitives resolved only inpackage-lock.json. All four are now resolved at patched versions inpackage-lock.json.zod
zodis a direct dependency in the rootpackage.json(declared as^3.22.0, resolved at3.25.76). The patched floor requires4.6.0, which is a semver-major jump. The declared spec was updated to^4.6.0andnpm install --package-lock-onlyresolved it to4.6.7. The@wave-av/sdkpeer dependency already declared^3.22.0 || ^4.4.3, so the major bump was compatible with the existing dependency tree.yaml
yamlis a direct dependency in the rootpackage.json(declared as^2.7.0, resolved at2.9.0). The patched floor is2.9.1, a patch-level bump within the same major. The declared spec was updated to^2.9.1andnpm install --package-lock-onlyresolved it to2.9.1.bundle-name
bundle-nameis a transitive dependency pulled in bydefault-browser→open(a direct dep).default-browser@5.5.1was already installed and declaredbundle-nameas^4.1.0, a range that permits the patched4.1.1. No manifest edit was needed; runningnpm update bundle-name --package-lock-onlywas sufficient to advance the lockfile resolution from4.1.0to4.1.1.@inquirer/external-editor
@inquirer/external-editoris a transitive dependency reached viainquirer→@inquirer/prompts→@inquirer/editor→@inquirer/external-editor. The patched floor is3.0.3, but the installed@inquirer/editor@4.2.23only resolved@inquirer/external-editor@1.0.3. Fixing the chain required bumpinginquirer(a direct dependency) from^12.3.2to^13.0.0:inquirer@13pulls@inquirer/prompts@8, which pulls@inquirer/editor@5, which resolves@inquirer/external-editorat3.0.7. The declared spec forinquirerin the rootpackage.jsonwas updated accordingly andnpm install --package-lock-onlyrealized the full chain.Version changes
zod^3.22.0/3.25.76^4.6.0/4.6.7yaml^2.7.0/2.9.0^2.9.1/2.9.1inquirer^12.3.2/12.11.1^13.0.0/13.4.3@inquirer/external-editor@inquirer/prompts7.10.18.7.5inquirer)@inquirer/editor4.2.235.3.6inquirer→@inquirer/prompts)@inquirer/external-editor1.0.33.0.7inquirer→@inquirer/prompts→@inquirer/editor)bundle-name4.1.04.1.1default-browser@5.5.1