You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(extensions): reject Windows drive and stream paths in archives - #1066
Before (issue / current behavior): Extension ZIP extraction rejected .. but accepted Windows drive-qualified filenames. Joining an absolute drive path discarded the extraction root, allowing an extension archive to write outside its destination. NTFS alternate data stream names were also accepted.
After (fix / new behavior): Reject colon-bearing archive entry names before creating their output path, on every platform. This blocks drive-absolute, drive-relative and alternate-stream paths while preserving ordinary relative paths, normalized backslashes and the existing leading-slash behavior.
The regression uses disposable temporary directories. It failed on the original Windows implementation with archive wrote outside its destination, and passes with the fix. It covers both slash forms, a leading slash before a drive path, drive-relative paths, nested drive syntax and alternate streams.
Rust Backend / Platform (Tauri commands, search, storage, OS integration)
Docs / Tooling / Other (docs, CI, build scripts, locales)
Manual smoke test & Validation
I manually smoke-tested this in the running app (pnpm dev) and visually verified the fix/feature works.
Rechecked on Windows (2026-11-17): cargo test --workspace --locked extensions::installer::tests — 37 tests; observed the new regression fail before the fix.
Passed: cargo fmt --check, design-system check, and launcher type check (0 errors, 15 existing warnings).
Full cargo test --workspace --locked: 3,845 passed, 6 failed, 13 ignored in the launcher library. Failures are outside the changed installer: three agent runner tests, an application icon test, a sync/network test, and a runtime connect-timeout test. The run stops at that failing target.
pnpm check:ci stops on checkout-wide Prettier/line-ending issues. Workspace frontend tests cannot start with this machine's Node 20.11.1 (ERR_REQUIRE_ESM in Vitest/std-env).
Clippy with -D warnings reports existing Windows unused imports/results and application-service warnings. Rustdoc with -D warnings fails on the private enable_shutdown_privilege link in system_actions/windows.rs.
Manual in-app smoke testing has not been completed.
AI usage
AI tools helped produce this change.
I ran the asyar-contribution skill (.agents/skills/asyar-contribution/SKILL.md), followed it, and reviewed every generated line.
Codex implemented and reviewed the diff. Human maintainer review is still required.
Boundaries
Zero-hardcoded-strings i18n policy respected (if UI strings were added/changed).
Third-party extension compatibility preserved (no breaking changes to published extension contracts without deprecation/boundary adapter).
Hot paths remain fast and unblocked (window reveal, keystroke search, and 120 FPS UI responsiveness).
pnpm check:ci (or the relevant inner-loop checks) passes locally.
No UI, SDK API or IPC wire shapes change. Only unsafe archive filenames are rejected; full-matrix limitations are recorded above.
No actionable comments were generated in the recent review.
Walkthrough
Archive extraction now rejects normalized entry paths containing : before constructing destination paths. Tests cover Windows absolute-path variants on Windows and drive-qualified or alternate-data-stream syntax across hosts.
extract_zip returns a validation error when a normalized entry path contains :. Tests verify rejection for drive-qualified and alternate-data-stream syntax and confirm the tested target is not written.
Archive extraction now rejects entry names with colons, which blocks Windows drive paths and alternate-stream names. Ordinary relative paths are unaffected. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: extract_zip in the extensions installer now rejects archive entry paths containing a colon, which blocks Windows drive-qualified paths and NTFS alternate data streams.…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title names the main change: extract_zip in the extensions installer now rejects archive entry paths containing a colon, which blocks Windows drive-qualified paths and NTFS alternate data streams. The 'fix(extensions)' prefix identifies the area. The title is specific and matches the raw summary and PR objectives.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
I've merged it into main. Really appreciate you helping keep Asyar safe and secure for our Windows users!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
..but accepted Windows drive-qualified filenames. Joining an absolute drive path discarded the extraction root, allowing an extension archive to write outside its destination. NTFS alternate data stream names were also accepted.The regression uses disposable temporary directories. It failed on the original Windows implementation with
archive wrote outside its destination, and passes with the fix. It covers both slash forms, a leading slash before a drive path, drive-relative paths, nested drive syntax and alternate streams.Affected areas
asyar-sdk, extension runtime, IPC contracts, manifest)Manual smoke test & Validation
I manually smoke-tested this in the running app (
pnpm dev) and visually verified the fix/feature works.Rechecked on Windows (2026-11-17):
cargo test --workspace --locked extensions::installer::tests— 37 tests; observed the new regression fail before the fix.Passed:
cargo fmt --check, design-system check, and launcher type check (0 errors, 15 existing warnings).Full
cargo test --workspace --locked: 3,845 passed, 6 failed, 13 ignored in the launcher library. Failures are outside the changed installer: three agent runner tests, an application icon test, a sync/network test, and a runtime connect-timeout test. The run stops at that failing target.pnpm check:cistops on checkout-wide Prettier/line-ending issues. Workspace frontend tests cannot start with this machine's Node 20.11.1 (ERR_REQUIRE_ESMin Vitest/std-env).Clippy with
-D warningsreports existing Windows unused imports/results and application-service warnings. Rustdoc with-D warningsfails on the privateenable_shutdown_privilegelink insystem_actions/windows.rs.Manual in-app smoke testing has not been completed.
AI usage
asyar-contributionskill (.agents/skills/asyar-contribution/SKILL.md), followed it, and reviewed every generated line.Codex implemented and reviewed the diff. Human maintainer review is still required.
Boundaries
pnpm check:ci(or the relevant inner-loop checks) passes locally.No UI, SDK API or IPC wire shapes change. Only unsafe archive filenames are rejected; full-matrix limitations are recorded above.