You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the toolchain adoption in #98 (Biome, oxlint, type-aware ESLint, knip, attw) three sets of findings
were deliberately deferred or surfaced as advisory. This issue consolidates them into one tracked follow-up.
Important: the 461-file one-shot Biome reformat in #98 makes pre-existing lines count as "new code", so the
CodeQL "new alerts" check and the SonarCloud quality gate re-attribute PRE-EXISTING findings to that PR (their
own caveat: "code changes were too large"). The flagged files' diffs were verified to be formatting-only.
After #98 merges to main, the new-code baseline resets, so these stop blocking unrelated PRs - but the
underlying findings remain in the codebase and are tracked here for real resolution. None were introduced by #98.
In #98 the 8 firing jsx-a11y rules were set to warn (not disabled) to avoid turning a tooling PR into an
accessibility refactor of vendored shadcn/ui plus many components needing markup/behaviour changes.
Rules currently at warn in .oxlintrc.json: no-static-element-interactions, click-events-have-key-events, label-has-associated-control, prefer-tag-over-role, no-autofocus, control-has-associated-label, no-noninteractive-element-interactions, anchor-has-content.
js/sql-injection (high) x4 - src/lib/db/providers/sql/mssql.ts:222, src/lib/db/providers/document/mongodb.ts:277,281,287. Expected to be largely by-design (the product's
purpose is executing user-supplied queries), but confirm each path is parameterised where it should be,
then fix or dismiss-as-by-design with a written justification.
Done: verified parameterisation (MSSQL binds via request.input; MongoDB uses the driver's structured
API) and dismissed all four as by-design with written justifications.
js/log-injection (medium) x6 - src/lib/logger.ts:85,96,99,102, src/lib/db/base-provider.ts:261, src/lib/db/factory.ts:58. logger.ts already sanitises control chars/newlines; verify the sanitiser
covers each sink (likely false-positive) and dismiss, or route remaining sinks through it.
Done: verified every sink sanitises inline; five dismissed as false positive, the stack-trace one as
by-design (multi-line stacks, non-production only).
js/path-injection (high) x2 - src/lib/db/providers/sql/sqlite.ts:176,177 (surfaced after this issue
was written). Dismissed as by-design: the SQLite path is user-configured trusted server-side input
(docs/providers/sqlite.md); NUL bytes rejected, path resolved.
3. SonarCloud new-code quality gate
new_coverage 92.9%, new_maintainability_rating 1, duplications 1.3%, hotspots 100% are all OK. Two
conditions fail, both pre-existing:
new_security_rating = 3 - 25x Make sure using this pseudorandom number generator is safe
(Math.random in src/components/TestDataGenerator.tsx). This is fake/sample-data generation, not
security-sensitive; mark the hotspots Safe in SonarCloud (or add a documented justification).
Done in fix(sonar): repair quality gate baseline and clear new-code issues #103: file-scoped, documented S2245 suppression.
Context
During the toolchain adoption in #98 (Biome, oxlint, type-aware ESLint, knip, attw) three sets of findings
were deliberately deferred or surfaced as advisory. This issue consolidates them into one tracked follow-up.
Important: the 461-file one-shot Biome reformat in #98 makes pre-existing lines count as "new code", so the
CodeQL "new alerts" check and the SonarCloud quality gate re-attribute PRE-EXISTING findings to that PR (their
own caveat: "code changes were too large"). The flagged files' diffs were verified to be formatting-only.
After #98 merges to
main, the new-code baseline resets, so these stop blocking unrelated PRs - but theunderlying findings remain in the codebase and are tracked here for real resolution. None were introduced by
#98.
1. Accessibility pass (oxlint jsx-a11y) - 60 findings
In #98 the 8 firing
jsx-a11yrules were set towarn(not disabled) to avoid turning a tooling PR into anaccessibility refactor of vendored shadcn/ui plus many components needing markup/behaviour changes.
Rules currently at
warnin.oxlintrc.json:no-static-element-interactions,click-events-have-key-events,label-has-associated-control,prefer-tag-over-role,no-autofocus,control-has-associated-label,no-noninteractive-element-interactions,anchor-has-content.Representative locations:
ResultsGrid.tsx,DataImportModal.tsx,MaskingSettings.tsx,QueryHistory.tsx,StudioTabBar.tsx,SnapshotTimeline.tsx,SavedQueries.tsx,DataCharts.tsx,VisualExplain.tsx, plusvendored
ui/*(calendar, carousel, breadcrumb, pagination, input-group, field, item, spinner, button-group).click-events-have-key-events,no-static-element-interactions). Done in fix(a11y): resolve jsx-a11y warnings in app components (#100, a11y 1/2) #205: native buttons, stretched-link overlays, and propertablist/tab semantics instead of hand-rolled keydown handlers.
label-has-associated-control,control-has-associated-label).Done in fix(a11y): resolve jsx-a11y warnings in app components (#100, a11y 1/2) #205 via htmlFor/id pairs, aria-labels for icon-only controls, and sr-only header text.
role="list"/etc. with semantic tags where it does not fight upstream shadcn (prefer-tag-over-role).Done in fix(a11y): resolve jsx-a11y warnings in app components (#100, a11y 1/2) #205: both
role="button"sites became real buttons; vendored ui/* is excluded by a scopedoverride in chore(lint): promote jsx-a11y rules to error with scoped ui/* override (#100, a11y 2/2) #206 (fixing shadcn primitives in place would fork them from upstream).
no-autofocususages. Reviewed: all six are user-initiated focus management (inline editors,dialogs), so the rule is off by policy with an inline justification (chore(lint): promote jsx-a11y rules to error with scoped ui/* override (#100, a11y 2/2) #206).
jsx-a11yrules fromwarntoerrorin.oxlintrc.json.Done in chore(lint): promote jsx-a11y rules to error with scoped ui/* override (#100, a11y 2/2) #206: 7 rules promoted to error;
no-autofocusis off per the review above (recorded deviation).2. Triage CodeQL alerts (11: 5 high, 6 medium)
js/sql-injection(high) x4 -src/lib/db/providers/sql/mssql.ts:222,src/lib/db/providers/document/mongodb.ts:277,281,287. Expected to be largely by-design (the product'spurpose is executing user-supplied queries), but confirm each path is parameterised where it should be,
then fix or dismiss-as-by-design with a written justification.
Done: verified parameterisation (MSSQL binds via
request.input; MongoDB uses the driver's structuredAPI) and dismissed all four as by-design with written justifications.
js/log-injection(medium) x6 -src/lib/logger.ts:85,96,99,102,src/lib/db/base-provider.ts:261,src/lib/db/factory.ts:58.logger.tsalready sanitises control chars/newlines; verify the sanitisercovers each sink (likely false-positive) and dismiss, or route remaining sinks through it.
Done: verified every sink sanitises inline; five dismissed as false positive, the stack-trace one as
by-design (multi-line stacks, non-production only).
js/tainted-format-string(high) x1 -src/lib/logger.ts:85. Confirm the format string is notuser-controlled, or harden it.
Done: real defect, fixed in fix(logger): use a constant console format string on the stack-trace path (#100) #204 (constant
"%s\n%s"format string).js/path-injection(high) x2 -src/lib/db/providers/sql/sqlite.ts:176,177(surfaced after this issuewas written). Dismissed as by-design: the SQLite path is user-configured trusted server-side input
(docs/providers/sqlite.md); NUL bytes rejected, path resolved.
3. SonarCloud new-code quality gate
new_coverage92.9%,new_maintainability_rating1, duplications 1.3%, hotspots 100% are all OK. Twoconditions fail, both pre-existing:
new_security_rating= 3 - 25xMake sure using this pseudorandom number generator is safe(
Math.randominsrc/components/TestDataGenerator.tsx). This is fake/sample-data generation, notsecurity-sensitive; mark the hotspots Safe in SonarCloud (or add a documented justification).
Done in fix(sonar): repair quality gate baseline and clear new-code issues #103: file-scoped, documented S2245 suppression.
new_reliability_rating= 4 - remaining bugs (theroute.tsconstant-||one was already fixed in feat(toolchain): adopt Biome, oxlint, attw; keep eslint-config-next + knip #98) -all fixed in fix(sonar): repair quality gate baseline and clear new-code issues #103 (the frozen
sonar.projectVersionbaseline was also fixed there: CI now injects itfrom package.json):
src/components/PivotTable.tsx:87- provide a locale-aware compare function to.sort().src/components/SchemaDiagram.tsx:220- conditional returns the same value on both branches; simplify or fix.src/components/DataCharts.tsx:777- non-interactive element with a click handler (same class as the a11y item above).Acceptance
error.Refs: #98