release: bound sdist and wheel verifier member enumeration - #216
release: bound sdist and wheel verifier member enumeration#216seonghobae wants to merge 9 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review exact head |
|
@opencode-agent review exact head |
|
@cwl-noema-review independently review exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base='7faf7a3b8a47980113982914000e724ab6a6cda5'
head='7254db0217034890e7500f54492110938f843dae'
echo '== Checkout and ancestry =='
git rev-parse HEAD
git cat-file -t "$base"
git cat-file -t "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'
git diff --stat "$base" "$head"
echo
echo '== Changed files =='
git diff --name-status "$base" "$head"
echo
echo '== Commit lineage =='
git log --oneline --reverse "$base..$head"
echo
echo '== Changed Python outlines =='
git diff --name-only "$base" "$head" -- '*.py' | while IFS= read -r f; do
[ -n "$f" ] || continue
echo "--- $f"
ast-grep outline "$f" --items all --type function,class --view compact || true
done
echo
echo '== Archive-related implementation and test references =='
rg -n -C 5 --glob '*.py' \
'(_MAX_DISTRIBUTION_MEMBERS|TarFile|getmembers|ZipFile|ZIP64|zip64|EOCD|central.directory|central_directory|comment|infolist|member)' \
.
echo
echo '== Exact modified hunks =='
git diff --unified=80 "$base" "$head" -- '*.py'
echo
echo '== GitHub PR metadata and exact-head check runs =='
gh pr view 216 --repo ContextualWisdomLab/EgressWeave \
--json number,state,isDraft,baseRefOid,headRefOid,commits,reviews,statusCheckRollup \
--jq '{number,state,isDraft,baseRefOid,headRefOid,commits:[.commits[]|{oid:.oid,messageHeadline:.messageHeadline}],reviews:[.reviews[]|{author:.author.login,state:.state,submittedAt:.submittedAt}],checks:[.statusCheckRollup[]|{name:.name,status:.status,conclusion:.conclusion,startedAt:.startedAt,completedAt:.completedAt}]}'Length of output: 185064 🏁 Script executed: #!/bin/bash
set -euo pipefail
base='7faf7a3b8a47980113982914000e724ab6a6cda5'
head='7254db0217034890e7500f54492110938f843dae'
repo='ContextualWisdomLab/EgressWeave'
echo '== Focused verifier implementation =='
sed -n '250,480p' scripts/ci/verify_distribution.py
echo
echo '== Focused new regression tests =='
sed -n '1,220p' tests/test_distribution_verifier_wheel_member_bound.py
sed -n '1,160p' tests/test_distribution_verifier_sdist_member_bound.py
echo
echo '== Post-construction count checks and preflight consumers =='
rg -n -C 4 --glob '*.py' \
'(_preflight_wheel_members\s*\(|len\(.*(?:namelist|infolist)|len\(names\)|actual_entries|total_entries)' \
scripts/ci/verify_distribution.py tests
echo
echo '== Requested RED-to-GREEN patches =='
for commit in \
266eb7fff5ab01c0d8eca1b57e1c5cc45330dddb \
d2c3750cb3de43049d4c50ddf88cf922f8434feb \
7f5ece53338a222e2b2e99fe618e0282782648eb \
89d99625b79e8a32833250ec9e2271d5ef9ec45a \
a6f1bea8b410a19fc3a9f87e0244c6b7826de6c1 \
9891b1d9cc75e4e47cf58a71c2d4a36b39050a37 \
d8795dede7a74ff7fd60f938c556a8c726d6635a \
1a1e56e82afe65ac642097056c825a786a4f5dcd \
7254db0217034890e7500f54492110938f843dae
do
echo "--- $commit"
git show --format='%H%n%s' --stat --oneline "$commit"
git show --format= --unified=20 "$commit" -- scripts/ci/verify_distribution.py tests
done
echo
echo '== Exact-head workflow runs =='
gh run list --repo "$repo" --commit "$head" --limit 100 \
--json databaseId,name,workflowName,status,conclusion,event,createdAt,updatedAt,url \
--jq '.[] | select(.status == "completed") | {databaseId,workflowName,name,conclusion,createdAt,updatedAt,url}'
echo
echo '== Exact-head PR check details =='
gh pr checks 216 --repo "$repo" --json name,state,workflow,link,completedAt,bucket \
--jq '.[] | {name,state,workflow,completedAt,link}'Length of output: 96000 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/EgressWeave'
run='31692030018'
ci_run='31692030893'
security_run='31692030938'
echo '== Coverage-evidence job log matches =='
gh run view "$run" --repo "$repo" --job '94434931789' --log 2>&1 \
| rg -n -i -C 3 '(1033|1,033|1758|1,758|588|coverage|statement|branch|passed|fail)' \
|| true
echo
echo '== Source-tree coverage job log matches =='
gh run view "$run" --repo "$repo" --job '94427619008' --log 2>&1 \
| rg -n -i -C 3 '(1033|1,033|1758|1,758|588|coverage|statement|branch|passed|fail)' \
|| true
echo
echo '== Python 3.14 test job log matches =='
gh run view "$ci_run" --repo "$repo" --job '94421261334' --log 2>&1 \
| rg -n -i -C 3 '(1033|1,033|passed|failed|coverage|statement|branch)' \
|| true
echo
echo '== Build and distribution-verification job log matches =='
gh run view "$ci_run" --repo "$repo" --job '94421261203' --log 2>&1 \
| rg -n -i -C 3 '(verify_distribution|wheel|sdist|compileall|ruff|passed|fail)' \
|| true
echo
echo '== Dependency-review job log matches =='
gh run view "$security_run" --repo "$repo" --job '94421261527' --log 2>&1 \
| rg -n -i -C 4 '(dependency.review|dependency-review|actions/dependency-review|skipp|pin|success|fail)' \
|| true
echo
echo '== Security Scan job definitions =='
gh run view "$security_run" --repo "$repo" --json jobs \
--jq '.jobs[] | select(.databaseId == 94421261527) | {name,conclusion,startedAt,completedAt,steps:[.steps[]|{name,conclusion,status}]}'Length of output: 74697
FindingP2 — Verify the At Line 441, At Line 451, This leaves the custom ZIP parser and the stdlib ZIP parser unbound. If they accept different member counts, verification can continue without detecting that disagreement. The stated wheel contract requires a post-construction count check. Return the bounded preflight count with the optional mask offset. Then reject if Verified items
The aggregate Verdict: changes requested. You are interacting with an AI system. |
seonghobae
left a comment
There was a problem hiding this comment.
Current-head source review for 7254db0217034890e7500f54492110938f843dae found no blocking defect in the three-file archive-enumeration scope. The implementation preflights a bounded single-disk/non-ZIP64 central directory before ZipFile construction, keeps sdist enumeration streaming with a finite member ceiling, preserves duplicate/unsafe-path and unsupported-entry rejection, and covers exact-slot ZIP64-signature comment regressions. This is author-side review evidence only, not an independent approval. Keep Draft until the actual pinned Dependency Review action executes successfully under the corrected central workflow, authoritative exact-head Strix and independent review evidence exist, and the release-history writer lane is reconciled without losing unrelated [Unreleased] entries.
|
@cwl-noema-review review Review exact current head |
Purpose
Bound release-package verification before attacker-controlled archive member metadata can be retained without limit. The verifier now applies finite member-count and metadata boundaries to both supported distribution formats while preserving exact package integrity checks.
Protected-base identity
main;7faf7a3b8a47980113982914000e724ab6a6cda5;7254db0217034890e7500f54492110938f843dae.Implemented boundary
Source distributions
TarFile.getmembers()with streaming member iteration;_MAX_DISTRIBUTION_MEMBERSbefore retaining it;Wheels
ZipFileconstruction;Test-first lineage
sdist RED → GREEN
266eb7fff5ab01c0d8eca1b57e1c5cc45330dddb: initial regression exposing unbounded sdist member enumeration;d2c3750cb3de43049d4c50ddf88cf922f8434feb: strengthened RED contract requiring bounded tar metadata retention;7f5ece53338a222e2b2e99fe618e0282782648eb: streaming bounded sdist implementation.wheel RED → GREEN and structural hardening
89d99625b79e8a32833250ec9e2271d5ef9ec45a: RED regression requiring member-count preflight beforeZipFileconstruction;a6f1bea8b410a19fc3a9f87e0244c6b7826de6c1: bounded wheel central-directory preflight;9891b1d9cc75e4e47cf58a71c2d4a36b39050a37: regression permitting ZIP64 signature bytes inside legal comments;d8795dede7a74ff7fd60f938c556a8c726d6635a: exact-slot ZIP64 locator recognition;1a1e56e82afe65ac642097056c825a786a4f5dcd: archive-comment boundary regression;7254db0217034890e7500f54492110938f843dae: final distinction between wheel comments and ZIP64 locators.Cancelled or superseded runs are retained as development history only and are not passing evidence.
Exact-head verification
Exact head
7254db0217034890e7500f54492110938f843dae:Merge contract
Keep Draft. Do not merge until:
ContextualWisdomLab/.github#897is integrated and a fresh exact-head scan executes the actual pinned Dependency Review action;ContextualWisdomLab/.github#965is integrated and produces authoritative exact-head evidence;Non-goals
Closes #215. Progresses #217.