Skip to content

fix: address SonarQube findings - #33

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

What & why

Fixes the open SonarQube findings on main that are real or cheap to fix safely. No behavior change.

  • Regexes without super-linear backtracking: base64url padding strip /={1,2}$/ (btoa emits at most two), Basic auth header /^Basic\s+(\S.*)$/i (same result, including the all-whitespace case), .env.deploy line parser (/s + trim(), same output incl. CRLF) and the comment stripper in render-config.mjs ([ \t]* instead of \s* across lines; only used to find leftover placeholders).
  • Fire-and-forget promises marked with void (PostHog capture/exception, list reloads and busy() handlers in the browser client).
  • Number.parseInt / Number.NaN, and a no-op inviter ? "" : "" ternary removed from the invitation page.
  • CI installs dependencies with npm ci --ignore-scripts (no lifecycle scripts needed; check passes without them).

Key sorting in the mandate canonicalization stays as is: RFC 8785 requires UTF-16 code unit order, localeCompare would break signatures.

How to test

npm ci --ignore-scripts && npm run check (typecheck, 138 tests, dry-run build).

Checklist

  • npm run check passes
  • New migrations are additive (no edits to applied ones)
  • No secrets, account IDs or personal domains in code/config

Bound the base64url padding and Basic auth header regexes, make the
.env.deploy parser and comment stripper linear, mark fire-and-forget
promises with void, prefer Number.parseInt and Number.NaN, drop a no-op
ternary on the invitation page and install CI dependencies with
--ignore-scripts.
@fabianzimber fabianzimber self-assigned this Nov 27, 2026
@sonarqubecloud

Copy link
Copy Markdown

@fabianzimber
fabianzimber merged commit 1e05fed 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