fix(deps): replace extract-zip and update Netlify packages#8277
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR replaces the external Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
extract-zip and update Netlify packages
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/utils/zip.ts`:
- Around line 82-90: The code currently calls await fs.mkdir(destDir) before
validating that destDir/dest cannot escape resolvedDir and also writes files to
dest without guarding against symlink destinations; fix by resolving and
validating the intended target paths before any filesystem writes: compute the
absolute target (use path.resolve/resolvedDir + entry.fileName) and call
fs.realpath on the nearest existing parent to ensure the canonical target is
inside resolvedDir, only then create directories; additionally, before writing a
file at dest inside the file-extraction branch (where dest and entry.fileName
are used), detect or prevent symlink attacks by using fs.lstat to reject
existing symlinks or open files with O_NOFOLLOW (or equivalent) and fail if dest
resolves outside resolvedDir after realpath, and apply the same validation steps
used for destDir to any file writes to guarantee no writes escape resolvedDir.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d88a6526-c369-4d04-8deb-b14909d353c4
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
package.jsonsrc/commands/create/create-action.tssrc/lib/functions/registry.tssrc/utils/zip.ts
CI has been failing for #8276, which I believe is caused by issues with the unmaintained
extract-zip.This mirrors that PR, doing the same bump of the Netlify dependencies, but also gets rid of
extract.zip.