build: strip @zip.js/zip.js test fixture from image - #48
Closed
shimoncohen wants to merge 1 commit into
Closed
shimoncohen wants to merge 1 commit into
shimoncohen wants to merge 1 commit into
Conversation
The @zip.js/zip.js package (prod dep via @cesium/engine) ships an encrypted zip test fixture (tests/data/lorem-encrypted.zip). Image scanners recurse into layers, hit it, and fail the scan reporting a password-protected archive. The fixture is not used at runtime. Remove the tests dir after npm prune so it never ships in the image. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Superseded by #49 — fixes the scan at the source by overriding @zip.js/zip.js to a test-free version (2.8.36) instead of stripping the tests dir from the image. |
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.
Problem
Image scan fails on
dem-heightsreporting an encrypted/password-protected archive.Root cause:
@zip.js/zip.js(a prod dependency via@cesium/engine) ships an encrypted zip test fixture atnode_modules/@zip.js/zip.js/tests/data/lorem-encrypted.zip. The scanner recurses into image layers, hits this genuinely password-protected zip, and fails. Other images (e.g. maps-playground) don't pull the full package, so they pass. The zip wrapper and layer compression are not involved.Fix
Remove
@zip.js/zip.js/testsafternpm prune --omit=dev, before node_modules is copied to the production stage. The fixture is test data, not loaded at runtime.Verification
Rebuilt the image and inspected
node_modules/@zip.js/zip.jsin the final layer:tests/dir absent,lorem-encrypted.zipgoneindex.js,lib/,dist/,package.json) — Cesium's zip.js still functional🤖 Generated with Claude Code