Skip to content

Fix the image upload XSS alert and the minimatch advisory - #65

Merged
Musiker15 merged 1 commit into
mainfrom
fix/security-alerts
Nov 5, 2026
Merged

Musiker15 merged 1 commit into
mainfrom
fix/security-alerts

Conversation

@Musiker15

Copy link
Copy Markdown
Member

Fixes the two open security alerts.

CodeQL js/xss-through-dom in the image upload form. The preview was an <img> whose src was an object URL of the picked file. A blob: URL can't run script, so this was never exploitable, but CodeQL can't tell. The preview is now drawn into a <canvas> from createImageBitmap(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-array and @typescript-eslint/typescript-estree. Even their latest releases still ask for ^10, so an update doesn't help. overrides now pins minimatch ^11.0.1 for 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) and next build.

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.
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@isaacs/nonrecursive-glob-match 1.0.3 UnknownUnknown
npm/minimatch 11.0.4 🟢 5.5
Details
CheckScoreReason
Code-Review⚠️ 0Found 1/28 approved changesets -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 42 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 4
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Security-Policy🟢 10security policy file detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • package-lock.json

@graphify-labs

graphify-labs Bot commented Nov 5, 2026

Copy link
Copy Markdown

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

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/vitest

main 056e7e5 fix/security-alerts 081ba60 +/-
73% 73% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@Musiker15
Musiker15 merged commit 6567fde into main Nov 5, 2026
11 checks passed
@Musiker15
Musiker15 deleted the fix/security-alerts branch November 5, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant