Skip to content

install: check archive paths with is_relative_to, not a string prefix - #57

Draft
ShahriarAhnaf wants to merge 1 commit into
mainfrom
zip-guard-path-check
Draft

ShahriarAhnaf wants to merge 1 commit into
mainfrom
zip-guard-path-check

Conversation

@ShahriarAhnaf

Copy link
Copy Markdown
Contributor

_unpack_zip compared resolved paths as strings, so an entry resolving into a sibling directory that shares the prefix (.engine.incoming-evil) passed the check. zipfile.extractall already normalises .., and payloads are sha256-pinned by the signed manifest, so this tightens the guard rather than closing a reachable hole.

Tested: new test_unpack_zip_refuses_a_sibling_sharing_the_prefix fails on the old check and passes on the new one. tests/test_install.py: 64 passed.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
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