Skip to content

mpv host 8: one exit (fixes code scanning #183) - #437

Merged
Nawid3333 merged 1 commit into
mainfrom
fix/host-exit-once
Oct 11, 2026
Merged

Nawid3333 merged 1 commit into
mainfrom
fix/host-exit-once

Conversation

@Nawid3333

Copy link
Copy Markdown
Owner

Code scanning #183 (js/user-controlled-bypass, high)

Version

HostVersion and RequiredHostVersion 8, hashes recorded (the repo rule for every helper change). After the merge: run mpv's updater.bat once more (it installs helper 8; 7 → 8 changes nothing you'd notice).

Proof

A PR scan only looks at changed lines, so its "no new alerts" proves nothing (#168, 2026-10-06). A full CodeQL scan runs on a throwaway branch (scan/host-exit-proof) with the repo's own settings (security-extended, local sources). main is the control and must reproduce the alert; the fix must not. The result goes here as a comment; the branch is deleted afterwards.

Locally: vitest 2260, lint, typecheck.

🤖 Generated with Claude Code

Each branch of main() ended with its own process.exit(0) behind a check of
the message, and CodeQL counts process.exit as a sensitive action: the check
before it - whether an mpv exists for the options page's path - read as user
input deciding it (js/user-controlled-bypass; #111 the same at the http(s)
check). handleMessage() now only returns, and main() exits once after it.
Same behaviour: every branch sends its answer first, then the host ends.

HostVersion and RequiredHostVersion 8, hashes recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Nawid3333

Copy link
Copy Markdown
Owner Author

Full-scan proof (run 38154906661, throwaway branch scan/host-exit-proof, the repo's own settings: security-extended, local sources):

js/user-controlled-bypass in native-host/ all results
main 3dfcf47 (control) faststream-mpv-host.mjs:1702, which is #183 49
this PR 642cd74 none 48

The other hits of this rule are the same on both, in tools/ and tests/e2e/, and were dismissed before (#112–#120). One result fewer, and none new: once this is merged, main's next scan closes #183.

@Nawid3333
Nawid3333 merged commit ee5b78d into main Oct 11, 2026
25 checks passed
@Nawid3333
Nawid3333 deleted the fix/host-exit-once branch October 11, 2026 16:33
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