Skip to content

Fix Sonar findings and security hotspots - #2

Merged
andre-carbajal merged 1 commit into
mainfrom
agent/fix-sonar-findings
Aug 11, 2026
Merged

andre-carbajal merged 1 commit into
mainfrom
agent/fix-sonar-findings

Conversation

@andre-carbajal

@andre-carbajal andre-carbajal commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the fixes for the 54 open issues and 2 Security Hotspots reported by Sonar on main.

Main changes

  • Removes dynamic/interpolated SQL from migrations and directory-size recalculation.
  • Parameterizes SQLite column inspection.
  • Pins GitHub Actions to full commit SHAs and limits contents: write to the publishing job.
  • Hardens the installer and platform-specific external command resolution.
  • Reduces cognitive complexity in DB, scanner, watchers, TUI, configuration, and CLI code.
  • Adds tests for legacy migrations, columns, nested sizes, and similar path prefixes.
  • Renames the scanner interface and removes direct context storage from the TUI model.

Validation

  • go test ./...
  • go vet ./...
  • go test -race ./internal/db ./internal/scanner ./internal/watcher
  • bash -n scripts/install.sh
  • Linux/macOS/Windows amd64 builds
  • Sonar MCP snippet analysis reports no issues in the affected files

Closes #1

@andre-carbajal
andre-carbajal marked this pull request as ready for review August 11, 2026 20:09
@andre-carbajal
andre-carbajal marked this pull request as draft August 11, 2026 20:10
@andre-carbajal
andre-carbajal marked this pull request as ready for review August 11, 2026 20:18
@andre-carbajal
andre-carbajal merged commit 76708b4 into main Aug 11, 2026
7 checks passed
@andre-carbajal
andre-carbajal deleted the agent/fix-sonar-findings branch August 11, 2026 20:18
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.

Fix Sonar findings: 54 issues and 2 Security Hotspots

1 participant