Skip to content

fix(security): Snyk Code findings; React 19.3.1 - #1861

Merged
magic-peach merged 1 commit into
mainfrom
fix/snyk-findings
Nov 6, 2026
Merged

magic-peach merged 1 commit into
mainfrom
fix/snyk-findings

Conversation

@magic-peach

Copy link
Copy Markdown
Collaborator

This PR resolves Snyk Code's 14 findings on main (d1ff303) and replaces Snyk's and Dependabot's one-package React upgrade PRs, whose checks fail.

Snyk Code findings

Finding Where Change
Path traversal (high) ffmpeg.worker.ts: the engine's input and overlay file names took their extension straight from the user's file name Fixed. safeExtension() keeps letters and digits only (max 8), with a fallback. Every engine file name (export, overlay, frames, join) uses it. A worker test feeds ../../etc/holiday.mp4/.. and checks no written name contains / or ...
postMessage origin (low) sw.js message handler Fixed. Messages from other origins are ignored, which a test checks.
Path traversal ×6 (low) strip-sourcemaps.mjs (deletes files), build-sw-manifest.mjs: a directory from argv Fixed. Both refuse a directory outside the repo (exit 2), and both still run normally on out/, including Netlify's command.
Hardcoded password (medium) check-deploy.mjs: an object key named pass Fixed. The summary is keyed by the RESULT constants.
Cleartext HTTP and no rate limit (medium ×2, low ×1) scripts/serve-isolated.mjs (local test server on 127.0.0.1), deployCheck.test.ts fixture Excluded. Test-only code is listed under exclude: code: in .snyk (tests/**, __tests__/**, test/**, the test server).
ReDoS (high) sw.js cache.match(request.url) False positive, since Cache Storage matching builds no regular expression. Ignored in Snyk as "not vulnerable", with the reason recorded.
postMessage origin (low) ffmpeg.worker.ts handler False positive: a dedicated worker only receives messages from its own page. Ignored in Snyk, with the reason recorded.

The triage is recorded in docs/SECURITY-PIPELINE.md, which also gets a new section on how Snyk is connected.

React 19.3.1

react and react-dom 19.3.1 move together, with @types/react and @types/react-dom 19.3.0 in both devDependencies and overrides. bun.lock changes for those four packages only.

This makes the following PRs obsolete: Snyk's #1852, #1853, #1826, #1805 and #1801, and Dependabot's #1794. Each bumped one package without the other and without bun.lock, so npm couldn't resolve the tree ("ERESOLVE") and the Dependency scan failed, along with every check that needs a frozen lockfile.

Tests

  • Typecheck and lint pass.
  • 605 unit tests pass (51 files).
  • Full Playwright: 58 passed, 8 skipped (the optional large-file runs).
  • strip-sourcemaps.mjs was checked on out/ (removes the maps) and on /tmp (refuses).

Snyk Code reported 14 findings on main:
- the engine's input file name took its extension from the user's file
  name: every engine file name now uses a letters-and-digits extension;
- the service worker accepted messages from any origin: it now ignores
  other origins;
- strip-sourcemaps.mjs (which deletes files) and build-sw-manifest.mjs
  took a directory from the command line: both refuse one outside the
  repository;
- check-deploy.mjs's summary had an object key named "pass", read as a
  hardcoded password: keys are the RESULT constants;
- test-only code (unit and browser tests, the local test server) is
  excluded from Snyk Code in .snyk.
The other two (Cache.match "ReDoS" in sw.js, the dedicated worker's
message handler) are false positives, ignored in Snyk with reasons.

React and react-dom go to 19.3.1 together, with @types/react and
@types/react-dom 19.3.0, superseding the Snyk and Dependabot PRs that
bumped them one at a time without updating bun.lock.
@netlify

netlify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for reframe-os ready!

Name Link
🔨 Latest commit cc30b20
🔍 Latest deploy log https://app.netlify.com/projects/reframe-os/deploys/6aed4dfea2bcc46a0db014b3
😎 Deploy Preview https://deploy-preview-1861--reframe-os.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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