-
Notifications
You must be signed in to change notification settings - Fork 7
WS-ART-001-04A2: bounded outer ZIP safety #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
39 changes: 39 additions & 0 deletions
39
...-immutable-artifact-storage/reviews/WS-ART-001-04A2-external-review-response.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # WS-ART-001-04A2 External Review Response | ||
|
|
||
| ## Comments addressed | ||
|
|
||
| - Hosted `shared_foundations` found two guide-OOXML regression failures after | ||
| the neutral ZIP probe move. EOCD per-disk versus total entry-count mismatch | ||
| was being classified as multi-disk before the existing guide layer could | ||
| preserve its stable `ooxml_directory_conflict` and `ooxml_zip64` outcomes. | ||
| - The neutral probe now reserves `multi-disk` for non-zero disk identifiers, | ||
| preserves the existing guide classification order, and retains submission | ||
| exact-record validation separately. | ||
| - CodeRabbit's completed correction-head review identified three valid small | ||
| fixes: align the ingest activation ledger, enforce inspection deadline below | ||
| the preparation deadline, and make NFC/NFD test literals explicit. All were | ||
| applied. Its hosted-status wording comment was also reconciled here. | ||
|
|
||
| ## Comments deferred | ||
|
|
||
| - The first-head CodeRabbit attempt was rate-limited. The correction-head | ||
| review completed; no comment was deferred. | ||
|
|
||
| ## Human decisions needed | ||
|
|
||
| None. Human approval and merge remain required. The first hosted | ||
| `shared_foundations` run completed with the two documented guide failures; the | ||
| replacement Backend run and all five shards remain pending on the latest head. | ||
|
|
||
| ## Commands rerun | ||
|
|
||
| ```text | ||
| ruff check app/modules/artifacts/zip_safety.py tests/test_submission_archive.py tests/test_guide_ooxml.py | ||
| pytest -q tests/test_guide_ooxml.py tests/test_submission_archive.py tests/test_guide_formats.py | ||
| ``` | ||
|
|
||
| Result: Ruff passed; 119 focused tests passed. | ||
|
|
||
| ## Remaining risks | ||
|
|
||
| The exact correction commit still requires fresh hosted Backend and Agent Gates. |
55 changes: 55 additions & 0 deletions
55
...-immutable-artifact-storage/reviews/WS-ART-001-04A2-internal-review-evidence.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # WS-ART-001-04A2 Internal Review Evidence | ||
|
|
||
| ## Evidence gate | ||
|
|
||
| Result: PASS. | ||
|
|
||
| - Scope remains hidden and process-local: no public route, provider I/O, | ||
| durable admission, Submission, checker, semantic manifest, or AUTH activation. | ||
| - One outer ZIP is inspected through `PreparedArtifact.inspect(...)` while | ||
| canonical scratch custody remains with `ArtifactScratchManager`. | ||
| - Exact envelope and record coverage rejects prefixes, suffixes, gaps, | ||
| overlaps, central-directory disagreement, local/central disagreement, | ||
| descriptor corruption, stored extra bytes, and deflate unused tails. | ||
| - Paths, normalized collisions, ancestry conflicts, encryption, special Unix | ||
| entries, directory payloads, expansion ratios, actual bytes, and deadlines | ||
| fail closed with redacted stable internal codes. | ||
| - Nested ZIP members remain opaque regular files. Only stored and raw-DEFLATE | ||
| member compression is accepted in v0.1. | ||
| - Ruff, focused tests, focused 90-percent subsystem coverage, semantic-lane | ||
| inventory, stale scans, Markdown links, and diff checks pass locally. | ||
|
|
||
| ## Reviewer results | ||
|
|
||
| - Architecture: PASS after startup cross-limit validation and a distinct | ||
| collision failure token were added. | ||
| - Security: PASS WITH LOW RISKS after exact byte-envelope/record coverage, | ||
| stored-size equality, and exact deflate consumption were added. Its remaining | ||
| aggregate-budget observation was also resolved during each member read. | ||
| - QA: PASS WITH LOW RISKS after exact envelope, hidden directory payload, and | ||
| complete adversarial seam cleanup proofs were added. | ||
| - Product/operations: PASS after local filenames for every entry, including | ||
| directories, were bound exactly to the central-directory name. | ||
| - Senior engineering: PASS WITH LOW RISKS after the neutral ZIP helper move, | ||
| directory payload rejection, and finite deadline validation. | ||
| - CI integrity: PASS WITH LOW RISKS; no workflow, threshold, package-script, or | ||
| dependency weakening. Hosted Backend and Agent Gates remain required. | ||
| - Documentation: PASS. | ||
| - Reuse/dedup: PASS after the ZIP directory probe moved to neutral | ||
| `zip_safety.py`. | ||
| - Test delta: PASS WITH LOW RISKS after all requested adversarial and | ||
| configuration-mapping cases were added. | ||
|
|
||
| ## Findings resolved | ||
|
|
||
| - Safe central names cannot hide unsafe local-header names. | ||
| - No byte before, between, inside, or after ZIP records escapes accounting. | ||
| - Directory entries cannot carry hidden payloads. | ||
| - Stored and deflated members cannot hide bytes beyond logical content. | ||
| - ZIP64 is bounded while multi-disk/spanned layouts remain rejected. | ||
| - Configuration limits are validated at startup and capped at 512 MiB. | ||
|
|
||
| ## Residual risk | ||
|
|
||
| The behavior has no public caller yet. Hosted PR shards, CodeRabbit, and human | ||
| review of the exact commit remain required before merge. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.