fix(security): v0.25.2 Z202 path traversal bypass in LSP engine - #182
Merged
Conversation
…y resolution (LSP-FIX-012) Signed-off-by: PythonWoods <gianluca.catalano@gmail.com>
Signed-off-by: PythonWoods <gianluca.catalano@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Objective
Deploy security patch
0.25.2to eradicate a critical Z202/Z203 (Path Traversal) bypass vulnerability in the LSP incremental analysis engine.Architectural Changes
LSP-FIX-012): Replaced a flawed OS-root depth check (url.count("../") > len(path.parents)) with deterministicdocs_rootboundary escape detection. The engine now usesos.path.normpathandis_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
../../etc/passwd) correctly triggers Z203.uv run zenzic check all --strictpassed (DQS 98/100).pytestsuite passed.