Repository navigation
fix(security): encode route params in URLs and exclude tests from CodeQL - #3
Merged
Merged
Conversation
Encode user-supplied path segments before interpolating them into API URLs (movie/tv/collection SSR fetches and the reset-password POST), so a crafted id cannot traverse to a different API path. Clears 4 js/request-forgery alerts. Exclude *.test.ts(x) and cypress/ from CodeQL analysis. Test fixtures are not shipped and produced 9 false-positive alerts (js/clear-text-cookie, js/request-forgery). Config is inline because the init step runs in parallel with checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNZbbpoHjgV821zgcUrE4L
Member
Author
|
Validate PR Template is failing because the "I have read and followed the contribution guidelines" box is unticked. I left it unticked on purpose. The How to proceed is the repo owner's call: tick the box (this is the CamCore fork, so the upstream policy may not apply here), or change the template rule in Generated by Claude Code |
jcam2803
marked this pull request as ready for review
November 18, 2026 09:23
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.
Description
This addresses the actionable CodeQL code-scanning alerts. I reproduced them locally with CodeQL CLI 2.27.3 and the same
security-and-qualitysuites thatcodeql.ymlruns. The JavaScript scan produced 62 findings and the Actions scan produced none.Fixed (4 alerts,
js/request-forgery): user-supplied route params are now passed throughencodeURIComponentbefore they go into API URLs:src/pages/movie/[movieId]/index.tsx,src/pages/tv/[tvId]/index.tsx,src/pages/collection/[collectionId]/index.tsx: the SSR fetch to the local APIsrc/components/ResetPassword/index.tsx: the reset-password POSTBefore this change, a crafted id like
1%2F..%2F..%2Fsettingscould make the server-side render fetch a different API path using the visitor's cookie.Noise removed (9 alerts):
*.test.ts(x)andcypress/are now excluded from CodeQL. Test fixtures aren't shipped, and they were the only source of thejs/clear-text-cookiealerts plus twojs/request-forgeryalerts. The config is set inline rather than throughconfig-file, because the init step runs in parallel with checkout.Triaged, no code change (50 alerts). These should be dismissed in the Security tab:
js/request-forgeryinserver/api/servarr/*,plextv.ts,externalapi.ts, and the notification agents: the hosts and webhook URLs are admin-configured by design. Won't fix.js/request-forgeryandjs/http-to-file-accessinserver/lib/imageproxy.ts: the base URL is fixed,//and://are rejected, and cache filenames are hashed and sanitised. False positive.js/user-controlled-bypassatserver/routes/auth.ts:272: the check rejects a client-supplied hostname once Jellyfin is configured. False positive.js/xss-through-dominSettingsTabs: the<select>values come only from the static route list. False positive.js/file-system-raceinanimelist.ts: the stat is used only for the mtime. False positive.js/file-access-to-httpinbin/duplicate-detector: a CI tooling script. Won't fix.js/trivial-conditional(2): upstream code-quality notes. Won't fix.js/missing-rate-limiting(4, Jellyfin and Quick Connect auth): this is a real gap. Seerr has no app-level login rate limiting at all. It's better handled at the reverse proxy than by forking upstream auth code.How Has This Been Tested?
security-and-qualitysuite on this branch with the new paths-ignore. The count went from 62 to 50, and none remain in the changed or test files.pnpm typecheck: passed.pnpm lint: 0 errors. Prettier check: clean.Checklist:
pnpm build(not run locally; CamCore image CI builds it)Generated by Claude Code