Conversation
…urity findings Dependencies & toolchain: - go get -u ./... + go mod tidy (fyne/systray, fsnotify, go-gl, golang.org/x image, google.golang.org/api, etc. bumped to latest). - CI/release/codeql workflows now read the Go version from go.mod (go-version-file) instead of a pinned 1.22, fixing the golangci-lint "language version too low" failure against go 1.26. - Bump GitHub Actions to current majors (supersedes the open Dependabot PRs): checkout v6, setup-go v6, upload-artifact v7, golangci-lint-action v9, metadata-action v6, build-push-action v7, goreleaser-action v6. Resolves the Node 20 deprecation warning. - Install Fyne's cgo/OpenGL/X11 build deps in the Linux CI job so lint/test/build can compile the GUI packages. Linting (golangci-lint v2): - Migrate .golangci.yml to the v2 schema; gofmt moves to formatters, gosimple folds into staticcheck. gosec runs only as its dedicated CI step (it honours //#nosec; golangci-lint's embedded gosec does not) to avoid double-reporting. - Fix all findings: errcheck, bodyclose, ineffassign-class issues, unused decls, and ST1005/QF1006 staticcheck. Security (gosec) — all findings fixed or audited: - Thread context.Context through the SQLite Store (ExecContext/QueryContext/ QueryRowContext/BeginTx) and use net.ListenConfig + exec.CommandContext (noctx). - Set http.Server ReadHeaderTimeout in the struct literal (G112). - Audited //#nosec annotations with justifications for the unavoidable cases: required Win32 syscall unsafe.Pointer marshalling (G103), opening user/app paths in a file-sync tool (G304/G703), launching explorer/notepad/browser and the gcc wrapper / self-relaunch (G204/G702), encrypted token marshalling (G117), and bounded integer conversions (G115). Verified locally: build, golangci-lint (0), gosec (0), govulncheck (clean), and go test ./... all pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAll ChangesContext propagation, gosec suppressions, and CI tooling overhaul
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…s to its own Linux job The app imports golang.org/x/sys/windows and uses cgo (Fyne), so it only compiles on Windows — golangci-lint/gosec/govulncheck/go test must run there. gitleaks (a Linux-only Docker action) moves to a separate secret-scan job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub's Windows CI runner checks out with CRLF (autocrlf), which makes gofmt flag every file as unformatted. Forcing LF for source and text config files keeps gofmt (and the build) consistent across platforms. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
main.go relies on sibling files in the package (console/opengl/single-instance helpers); building the single file left them undefined. Build the package and enable cgo explicitly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the publish-docker CI job, Dockerfile, .dockerignore, the goreleaser release workflow, and .goreleaser.yaml. All built the Windows-only Fyne/cgo app on Linux with CGO_ENABLED=0, so they could never succeed. Releases are produced from a Windows build (see build.ps1); CI's build-windows job verifies compilation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Upgrades Go module dependencies to latest, fixes the failing CI, and resolves all 119 golangci-lint/gosec findings (which CI never enforced because it was erroring at config load).
Dependencies & toolchain
go get -u ./...+go mod tidy.go.mod(go-version-file) instead of pinned1.22— fixes thegolangci-lint: the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.26.4)error.Linting (golangci-lint v2)
.golangci.ymlmigrated to the v2 schema. gosec runs only as its dedicated CI step (it honours//#nosec; golangci-lint's embedded gosec does not), avoiding double-reporting.Security (gosec) — all fixed or audited
context.Contextthreaded through the SQLiteStore(*ContextAPIs), plusnet.ListenConfigandexec.CommandContext(noctx).http.ServerReadHeaderTimeoutset in the struct literal (G112).//#nosecwith justifications for the unavoidable cases: Win32 syscallunsafe.Pointer(G103), file-path opens in a sync tool (G304/G703), subprocess launches (G204/G702), encrypted-token marshalling (G117), bounded int conversions (G115).Verified locally
go build ./...,golangci-lint run(0),gosec ./...(0),govulncheck ./...(clean),go test ./...— all pass.🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Refactor