Skip to content

fix: resolve SonarQube findings - #48

Merged
fabianzimber merged 1 commit into
mainfrom
fix/sonar-findings
Nov 27, 2026
Merged

fabianzimber merged 1 commit into
mainfrom
fix/sonar-findings

Conversation

@fabianzimber

@fabianzimber fabianzimber commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Fixes the open SonarQube issues on main.

What

  • Backtracking regex (S8786): /\/+$/ on the request path (routing, access log) and the operator URL is replaced by trimTrailingSlashes() in util.ts, a linear scan. Same output, no quadratic work on paths with long runs of slashes.
  • Floating promises (S9383): fire-and-forget phCapture / phException calls and the Node queue's run.finally(...) cleanup are marked with void. No behavior change: with an execution context these calls already hand the work to waitUntil.
  • Object literal default (S7737): landingPage() uses a DEFAULT_LIMITS constant.
  • CI (S6505): npm ci --ignore-scripts. No dependency needs its install script for typecheck, tests or builds.

Two findings were triaged in SonarQube as false positives: MD5 in the Node storage emulation (R2-compatible ETag only) and the mandate error log (structured Workers log argument).

How to test

npm ci --ignore-scripts; npm run check (typecheck, 125 tests incl. new trimTrailingSlashes tests, both builds).

No migrations or deploy config changes.

- trim trailing slashes with a linear scan instead of a backtracking regex
- mark fire-and-forget analytics and queue cleanup promises with void
- hoist the landing page default limits into a constant
- install CI dependencies with --ignore-scripts
@sonarqubecloud

Copy link
Copy Markdown

@fabianzimber
fabianzimber merged commit 2950c54 into main Nov 27, 2026
7 checks passed
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