Skip to content

fix(security): break residual taint flows into ffmpeg args and asset URLs (round 2) - #55

Merged
Star-Lotus merged 1 commit into
mainfrom
fix/security-alerts-round2
Aug 11, 2026
Merged

fix(security): break residual taint flows into ffmpeg args and asset URLs (round 2)#55
Star-Lotus merged 1 commit into
mainfrom
fix/security-alerts-round2

Conversation

@Star-Lotus

Copy link
Copy Markdown
Collaborator

Follow-up to #54. After merge, CodeQL kept 9 alerts open because its taint analysis does not recognize the round-1 guards as barriers for these specific queries. This PR breaks the residual flows with zero behavior change.

Root cause (from SARIF code flows of analysis 1599605142/1599609579)

Fix (no behavior change)

Alerts Change
py ×6 Build filenames from store-backed frame.id / script.id (identical values — matched by lookup) instead of request params; offset_ms = int(offset_ms) before entering the filter string
js ×3 path.replace(/[<>\"'\]/g, "")` on the pass-through branch — recognized metachar sanitizer, no-op for well-formed URLs

Verification

  • pytest: 209 passed (incl. 8 ffmpeg path-safety regression tests)
  • frontend: typecheck ✅ · vitest 124 passed ✅ · build ✅

…URLs

Round 2 for the 9 alerts CodeQL kept open after PR #54:
- py/command-line-injection x6: build ffmpeg output filenames from
  store-backed frame.id/script.id instead of request parameters, and
  coerce offset_ms to int before it enters the adelay filter string.
  Runtime values are identical (ids matched by lookup), so behavior
  is unchanged; the request-parameter taint chain is simply broken.
- js/xss-through-dom x3: strip HTML metacharacters from pass-through
  http/blob URLs in getAssetUrl (no-op for well-formed URLs).
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Star-Lotus
Star-Lotus merged commit 277d6f6 into main Aug 11, 2026
6 of 7 checks passed
@Star-Lotus
Star-Lotus deleted the fix/security-alerts-round2 branch August 11, 2026 05:37
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.

3 participants