Repository navigation
Fix the image upload XSS alert and the minimatch advisory - #65
Merged
Merged
Conversation
The upload preview is drawn into a canvas instead of an img with an object URL. minimatch is overridden to ^11.0.1 for the eslint packages that still ask for ^10.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
|
Graphify reviews are paused for this workspace because nobody has used it in 7 days. A workspace owner can resume reviews from the Repositories page: https://app.graphify.com/msk-scripts/repositories |
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.
Fixes the two open security alerts.
CodeQL
js/xss-through-domin the image upload form. The preview was an<img>whosesrcwas an object URL of the picked file. Ablob:URL can't run script, so this was never exploitable, but CodeQL can't tell. The preview is now drawn into a<canvas>fromcreateImageBitmap(file), so nothing derived from the file ends up in a DOM attribute. No object URL to revoke anymore either. A file the browser can't decode just gets no preview, the server validates the format anyway.Dependabot: minimatch < 11.0.1 (ReDoS through glob parts). It came in through eslint,
@eslint/config-arrayand@typescript-eslint/typescript-estree. Even their latest releases still ask for^10, so an update doesn't help.overridesnow pins minimatch^11.0.1for those three. The eslint plugins that use minimatch 3.x aren't affected by the advisory and stay as they are. Dev dependencies only, nothing of this ships.Tested locally:
typecheck,lint(eslint runs fine on minimatch 11),npm test(1498 passed) andnext build.