Skip to content

fix(security): v0.25.2 Z202 path traversal bypass in LSP engine - #182

Merged
PythonWoods-Dev merged 2 commits into
mainfrom
release/v0.25.2
Jul 26, 2026
Merged

fix(security): v0.25.2 Z202 path traversal bypass in LSP engine#182
PythonWoods-Dev merged 2 commits into
mainfrom
release/v0.25.2

Conversation

@PythonWoods-Dev

Copy link
Copy Markdown
Contributor

Objective

Deploy security patch 0.25.2 to eradicate a critical Z202/Z203 (Path Traversal) bypass vulnerability in the LSP incremental analysis engine.

Architectural Changes

  • Z202 Security Parity (LSP-FIX-012): Replaced a flawed OS-root depth check (url.count("../") > len(path.parents)) with deterministic docs_root boundary escape detection. The engine now uses os.path.normpath and is_relative_to(resolved_docs_root) to mathematically guarantee that any relative link escaping the configured documentation root triggers a non-suppressible Z202/Z203 security finding. This restores 100% security parity between the CLI and the VS Code extension.

Verification

  • Simulated LSP traversal (../../etc/passwd) correctly triggers Z203.
  • uv run zenzic check all --strict passed (DQS 98/100).
  • pytest suite passed.

…y resolution (LSP-FIX-012)

Signed-off-by: PythonWoods <gianluca.catalano@gmail.com>
Signed-off-by: PythonWoods <gianluca.catalano@gmail.com>
@PythonWoods-Dev
PythonWoods-Dev merged commit 8ebf7d2 into main Jul 26, 2026
9 checks passed
@PythonWoods-Dev
PythonWoods-Dev deleted the release/v0.25.2 branch July 26, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant