Skip to content

fix: resolve SonarQube findings and sync version to 0.8.0#62

Merged
Sagargupta16 merged 2 commits intomainfrom
feature/frontend-enhancement
Mar 14, 2026
Merged

fix: resolve SonarQube findings and sync version to 0.8.0#62
Sagargupta16 merged 2 commits intomainfrom
feature/frontend-enhancement

Conversation

@Sagargupta16
Copy link
Copy Markdown
Owner

@Sagargupta16 Sagargupta16 commented Mar 14, 2026

Summary

  • Security fixes: Replace hardcoded dev JWT secrets with secrets.token_urlsafe(), fix SQL injection in migration (f-string -> parameterized sa.text()), wrap unhandled localStorage.setItem in try/catch
  • Code quality: Add logging to 2 swallowed backend exceptions and 18 silent frontend catch blocks, replace manual day-of-month logic with calendar.monthrange(), remove dead backward-compat alias, deduplicate localStorage helpers in BillCalendarPage
  • Accessibility: Add tabIndex, onKeyDown, aria-sort to 7 sortable <th> elements, role="button" + aria-expanded to clickable <tr>, aria-label to clickable <motion.div> in CategoryBreakdown
  • Config: Sync version to 0.8.0 across root/frontend/backend (was 1.0.0/0.0.0/0.1.0), fix ruff target-version py311 -> py312, remove redundant autoprefixer

Test plan

  • pnpm run type-check passes
  • pnpm run lint passes (0 errors)
  • pnpm run build succeeds
  • uv run ruff check . passes
  • Verify sortable table headers are keyboard-navigable (Tab + Enter)

- Sync version to 0.8.0 across root package.json (was 1.0.0),
  frontend package.json (was 0.0.0), and backend pyproject.toml (was 0.1.0)
- Fix ruff target-version from py311 to py312 to match mypy and CI
- Remove redundant autoprefixer (Tailwind CSS 4 handles prefixing)
Security:
- Replace hardcoded dev JWT secrets with secrets.token_urlsafe()
- Fix SQL injection in migration (f-string -> parameterized sa.text)
- Wrap unhandled localStorage.setItem in try/catch

Code quality:
- Add logger.debug to swallowed OSError catches in main.py and upload.py
- Add console.warn to 18 silent catch blocks across frontend
- Replace manual day-of-month logic with calendar.monthrange()
- Remove dead _apply_earning_start_date backward-compat alias
- Remove duplicated localStorage helpers in BillCalendarPage

Accessibility:
- Add tabIndex, onKeyDown, aria-sort to sortable th in NetWorthPage,
  InvestmentAnalyticsPage, TrendsForecastsPage
- Add role="button", tabIndex, onKeyDown, aria-expanded to clickable
  tr in NetWorthPage
- Add role="button", tabIndex, onKeyDown, aria-label to clickable
  motion.div in CategoryBreakdown
@Sagargupta16 Sagargupta16 merged commit f4623e1 into main Mar 14, 2026
2 checks passed
@sonarqubecloud
Copy link
Copy Markdown

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