Commit 6edfbf1
fix(quality): clear SonarCloud Quality Gate on main (#73)
Three-part cleanup to clear the 21 security hotspots blocking the
SonarCloud Quality Gate on main after the design-system + storage
rebalance merges.
Changes
* internal/ui/ui.go: drop the embedded HTML template machinery.
The four base.html/header.html templates were embedded and parsed
at startup but never executed — the React SPA in dist/ owns every
route. Removing the dead code eliminates 4 LOW Web:S5725 hotspots
(external CDN script/font tags violating rules/build.md). Removed
fields, the html/template import, and the orphaned fmtNum helper.
* internal/ui/templates/: deleted (base.html, header.html and the
two unused partials). Pure dead code surviving the design-system
migration.
* internal/storage/retention.go: drop fmt.Sprintf for the per-table
VACUUM ANALYZE / OPTIMIZE TABLE statements. The table names were
already a hardcoded literal slice but the format pattern triggers
the go:S2077 SQL-injection sniffer. Replaced with a struct slice
holding literal SQL strings — same behavior, no taint flow for
static analysis to follow.
Not changed in this PR (separately marked Safe in SonarCloud)
* 16 MEDIUM go:S2245 hits on test/*/main.go — math/rand calls inside
chaos simulator services. Non-cryptographic context (latency
jitter, failure-mode selection); not a real security finding.
Verification
* go vet ./... clean
* go test ./... — 516 pass / 27 packages
* go build ./... clean
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 75a2e56 commit 6edfbf1
14 files changed
Lines changed: 27 additions & 1771 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
403 | 409 | | |
404 | 410 | | |
405 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
406 | 418 | | |
407 | | - | |
408 | | - | |
| 419 | + | |
| 420 | + | |
409 | 421 | | |
410 | 422 | | |
411 | | - | |
| 423 | + | |
412 | 424 | | |
413 | 425 | | |
414 | 426 | | |
415 | 427 | | |
416 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
417 | 435 | | |
418 | | - | |
419 | | - | |
| 436 | + | |
| 437 | + | |
420 | 438 | | |
421 | 439 | | |
422 | | - | |
| 440 | + | |
423 | 441 | | |
424 | 442 | | |
425 | 443 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments