Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ad75c92
fix(core): accept contained symlinks in the older-Git archive fallback
harjothkhara Aug 24, 2026
008c94c
fix(core): harden contained symlink validation
harjothkhara Aug 25, 2026
0bb7337
test(core): pin post-flatten symlink validation
harjothkhara Aug 25, 2026
4ecfb52
fix(core): reject post-extraction symlink chains
harjothkhara Aug 25, 2026
c54eafb
fix(core): enforce materialized archive size
harjothkhara Aug 25, 2026
c4a23fd
fix(core): validate final archive layout exactly
harjothkhara Aug 25, 2026
7ae9f97
fix(core): bound archive path validation
harjothkhara Aug 25, 2026
7a800e9
fix(core): reject unresolved archive targets
harjothkhara Aug 25, 2026
2135c75
fix(core): canonicalize archive entry separators
harjothkhara Aug 25, 2026
d707895
test(core): cover symlink descendant extraction
harjothkhara Aug 25, 2026
e1c29cf
fix(core): reject ambiguous symlink targets
harjothkhara Aug 25, 2026
83dc67c
fix(core): wrap archive layout errors
harjothkhara Aug 25, 2026
640d8e2
fix(core): preserve validated plugin symlinks
harjothkhara Aug 25, 2026
2b3cafd
fix(core): reject root-normalized link entries
harjothkhara Aug 25, 2026
6d5ae8c
fix(core): close archive-safety review-round-3 gaps
harjothkhara Aug 26, 2026
3e2f352
fix(core): re-validate symlinks when conversion moves the archive-val…
harjothkhara Aug 26, 2026
2340e39
Merge branch 'main' into fix/9724-safe-archive-symlinks
wenshao Aug 26, 2026
5f22a62
fix(core): make the post-conversion symlink re-validation guard reach…
harjothkhara Aug 26, 2026
e0e6530
test(core): fix round-5 review gaps in the re-validation guard's tests
harjothkhara Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/design/safe-archive-symlinks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Safe symlinks in public GitHub archives

## Context

The public GitHub archive fallback supports older Git versions, but GitHub archives preserve repository symlinks. Rejecting every link prevents otherwise valid extensions such as `obra/superpowers` from installing.

## Design

Only the public GitHub fallback opts into symlink support. The archive scan allows at most 100 link-type entries total; only symlinks with a relative target that resolves to a regular-file entry in the same archive are accepted, and it retains at most 8 MiB of path metadata. Absolute, escaping, chained, dangling, directory, hard, and POSIX literal-backslash-target links remain unsupported. This deliberately narrow, fail-closed scope covers the motivating repository without introducing traversal through directory links or chains.

Extraction runs in strict mode, then the archive wrapper is flattened. A second filesystem check validates the final layout because moving a link can change where its relative target resolves. That check requires the immediate target to be a regular file and separately verifies its real path remains inside the final extraction root, which also rejects symlink chains. The same final-layout scan accounts for each link target because the later extension copy can materialize it as another file.

Strict extraction and final-layout validation apply to every archive on this opt-in fallback path, including archives without symlinks. This intentionally makes extraction warnings fail closed and verifies the same resource ceiling against the filesystem that later conversion copies.

Real symlink extraction is not exercised on Windows CI; support there depends on the host permitting symlink creation.

Other archive sources retain their existing fail-closed behavior. Zip handling is unchanged.
2 changes: 1 addition & 1 deletion docs/users/extension/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Only scoped packages (`@scope/package-name`) are supported to avoid ambiguity wi

Git 2.37 or newer is required for credentialed, non-GitHub, nested marketplace, submodule, and Git LFS sources because Qwen Code uses `http.curloptResolve` to pin Git connections to validated DNS results. On older Git versions, Qwen Code supports only anonymous public `https://github.com/{owner}/{repo}[.git]` root repositories by resolving the requested ref to a commit and downloading GitHub's source archive with the same public-network and archive-safety checks.

Because the older-Git fallback installs from a source archive rather than a clone, it cannot install repositories that rely on symlinks, submodules, or Git LFS, and it caps downloads at 100 MiB compressed and archives at 100,000 entries / 1 GiB expanded. Release-based installs are still preferred when a repository publishes releases.
Because the older-Git fallback installs from a source archive rather than a clone, it cannot install repositories that rely on submodules or Git LFS, and it caps downloads at 100 MiB compressed and archives at 100,000 entries / 1 GiB expanded / 8 MiB path metadata, including files materialized from at most 100 symlinks. Symlinks directly targeting regular files in the repository are supported on systems that permit symlink creation; Windows may require Developer Mode or elevated privileges. The fallback rejects directory, chained, dangling, absolute, escaping, hard, and POSIX literal-backslash-target links. Other Agent Plugin install paths continue to omit symlinks. Release-based installs are still preferred when a repository publishes releases.

```bash
qwen extensions install https://github.com/github/github-mcp-server
Expand Down
Loading
Loading