fix(cli): enforce native asset containment - #84
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Independent verifier verdict: PASS+NOTESReviewed PR 84 at head I found no correctness, API, ownership, or test-boundary defect. The production change replaces the POSIX-only Filesystem and behavior reviewThe five new cases call The retarget case keeps identical SVG bytes inside and outside, so only containment can explain the expected rejection. Resolving the asset to its real path before the native relative check also keeps link retargeting from bypassing later file and hash validation. Live proof
Diff and comment auditThe two-file diff adds no TypeScript, lint, or test suppressions and no phase or constraint comments. Merge state and limitsThe reviewed head was clean against the reviewed base when verification completed. The PR is now behind current This native proof covers Windows Server 2025 and PowerShell 7. It does not qualify Windows 11, PowerShell 5.1, foreground Ctrl+C behavior, or human PDF inspection. Those broader claims are outside this asset-containment PR. Commands and receipts
|
|
Root verification PASS at The independent non-author verdict is recorded above. The refreshed diff retains stable patch ID Native Windows proof demonstrates the original retargeted-junction escape and passes all five cases at the reviewed fixed patch. The independent verifier also passed 80 CLI tests and audited 23 affected installed-wheel integration cases. Current-head quality, isolation, dependency-review, PR-title and CodeQL pass. Installed-packages is skipped by the maintained CI policy; the affected installed acceptance receipt was independently audited. GitHub reports CLEAN with no unresolved threads. Normal protected merge is authorized for this head only. |
Why
Windows asset capture can accept a directory junction that now resolves outside the entry source directory.
path.relative()returns a backslash-separated parent path, but the containment check only recognizes../.Scope
captureAssetswhile retaining realpath resolution, exact-parent and absolute-path rejection...notesnames and a directory link retargeted to a sibling after its hash was recorded. Windows runs the junction case without a skip.Blast Radius
The change affects CLI asset capture for HTML, PDF and development reports. It preserves the function signature and existing hash and media checks.
Verification