Feature/rewrite stateless - #16
Merged
Merged
Conversation
kmturley
added a commit
that referenced
this pull request
Jul 31, 2026
…anch CodeQL flagged this PR with 1 new high-severity js/zipslip alert at archive.ts's AdmZip Windows-fallback branch. The code itself is byte-identical to what's on main (pre-existing, still-open alert #16 at the old file.ts:67) - not a vulnerability this refactor introduced, but CodeQL treats it as "new" since the code moved to a new file/path. The validation (isSafeArchiveEntryPath()) was already correct at runtime, but CodeQL's dataflow analysis wasn't recognizing it as a guard: each entry was validated and written in the same forEach iteration, one entry at a time. The adjacent .7z branch a few lines below - which isn't flagged - instead validates every entry up front and only writes afterward if all of them pass. Restructured the AdmZip branch to match that already-safe shape: map entries to their sanitized names, find any unsafe one and throw before writing anything, then write. Same validation logic, same error message, same result - verified via the full test suite (218/218 passing) - just reshaped so the guard-then-sink relationship is unambiguous to static analysis.
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.
No description provided.