Repository navigation
fix: resolve all code scanning alerts and add CI checks - #201
Merged
Merged
Conversation
- collexions: return generic error messages instead of exception text (stack-trace exposure), confine SPA static serving to dist/, make Flask debug opt-in via FLASK_DEBUG, validate mdblist hosts by parsed hostname, stop logging possibly sensitive values - client: validate mdblist URLs by hostname, only allow http(s) URLs in request-app links and safe image sources for the splash logo preview, keep API keys/passwords out of sessionStorage in the setup wizard - lib: harden HTML stripping (repeat until stable, tolerant end tags), escape all regex metacharacters in build-version, drop identity replaces - deps: bump nodemailer to 10.x and apply non-breaking npm audit fixes
Adds a CI workflow (Node build + syntax check + npm audit, Python compile + ruff + pip-audit, Docker build without push, actionlint, dependency review) with actions pinned by commit SHA, plus a Dependabot config.
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.
Summary
Fixes all 52 open CodeQL code scanning alerts and adds more CI checks.
Security fixes
Collexions worker (
collexions/server.py)logging.exception). Plex connectivity errors map to safe categories (timeout / unreachable / SSL) through_describe_request_error, so the health and validation endpoints still say what went wrong.dist/.FLASK_DEBUG=1to turn it on.'mdblist.com' in url._unused/debug_mdblist.pypasses the API key as a request param and no longer prints response bodies.Client / lib
Creator.tsx(both copies):isMdbListUrl()checks the hostname.SettingsDashboard.tsx: request-app links and the splash logo preview go through the newclient/shared/safeUrl.ts, which only allows http(s) URLs (plus blob: for the image preview).SetupWizard.tsx: API keys, the SMTP password and arr instance keys are no longer written tosessionStorage. The Plex token and non-secret wizard state are still saved, so the OAuth redirect works as before. If the page is reloaded mid-setup, keys have to be entered again.lib/discovery-facts.js/DiscoveryFactWidget.tsx: tag stripping repeats until the text stops changing, and script/style end tags with extra whitespace or attributes (e.g.</script >) are now matched.build-version.js: all regex metacharacters in the version are escaped.tvdbClient.js,screens.tsx: removed no-opreplacecalls.Dependencies
nodemailer^9 → ^10.0.13 to fix several high-severity advisories. The only breaking change in v10 is requiring Node 20+, and the image uses Node 22.npm audit fix, which applied non-breaking fixes for express/body-parser/qs/react-router. The remaining advisories are dev-only (vitepress → vite → esbuild) and have no upstream fix yet.New CI (
.github/workflows/ci.yml)All actions are pinned by commit SHA.
npm ci,node --checkon server sources,npm run build,npm audit --omit=dev --audit-level=highcompileall,ruff(syntax errors / undefined names),pip-auditoncollexions/requirements.txtI left out a dependency-review job because it needs Dependency graph turned on (Settings → Code security). Once that's on,
actions/dependency-review-actioncan be added.Also adds
.github/dependabot.ymlfor npm, pip, GitHub Actions and Docker.Testing
npm run buildpasses locally andnode --checkis cleanpython -m py_compile,ruff --select E9,F63,F7,F82andpip-auditpassnpm audit --omit=dev --audit-level=highpassescreateTransport+sendMailvia jsonTransport) passesevil.com/mdblist.comandmdblist.com.evil.com