Repository navigation
fix: harden ZIP paths, XML names, and property copying - #222
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #222 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 27 27
Lines 1867 1877 +10
Branches 404 409 +5
=======================================
+ Hits 1867 1877 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🎉 This pull request is included in version 5.3.0 📦 |
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.
Summary
Prevent unsafe archive paths, XML markup injection through names, and local prototype manipulation in
packages/excel-builder-vanilla.Why
Caller-controlled filenames, style keys, and selected object properties could alter generated output or object prototypes. These are conditional risks; no host filesystem write, spreadsheet code execution, or global prototype pollution was demonstrated.
Changes
pick(), including__proto__, while supporting null-prototype objects.Net physical LOC against the pre-security baseline, including comments and blank lines:
Runtime changes are limited to three files, with no new dependencies, API removals, or deprecations.
Validation
git diff --checkpassed.Comments
Unsafe ZIP paths now fail during export rather than in
addMedia(). Unsafe XML names fail during serialization; reserved XML attribute names fail insetAttribute().These checks do not validate the complete OOXML schema or sanitize custom XML strings. Performance benchmarks and Excel/LibreOffice application checks were not run for this patch.
AI / LLM assistance
Checklist