Skip to content

fix(security): fix gosec suppressions and bump GO_VERSION to 1.25 in security workflow#142

Merged
valpere merged 1 commit into
mainfrom
fix/gosec-suppressions
Mar 18, 2026
Merged

fix(security): fix gosec suppressions and bump GO_VERSION to 1.25 in security workflow#142
valpere merged 1 commit into
mainfrom
fix/gosec-suppressions

Conversation

@valpere

@valpere valpere commented Mar 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix // nosec// #nosec comment format in pkg/weather/client.go and internal/services/weather_service.go (G704 SSRF false positives on config-driven HTTP calls)
  • Add // #nosec G703 to os.Remove(tempFile.Name()) in commands.go (standard temp file cleanup)
  • Add // #nosec G101 to test credential in tests/helpers/test_config.go
  • Add // #nosec G117 to Password struct fields in internal/config/config.go
  • Bump GO_VERSION: 1.24'1.25' in security.yml to match go 1.25.0 in go.mod

Root cause

gosec's suppression comment requires a # prefix (// #nosec). Without it (// nosec), the comment is ignored and the issue is still reported. This caused gosec to report 10 issues and exit with code 1, failing the Security Scan workflow.

Test plan

  • Security Scan workflow passes on main after merge
  • gosec reports Issues: 0, Nosec: 10 locally

🤖 Generated with Claude Code

… 1.25 in security workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Mar 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/handlers/commands/commands.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@valpere valpere merged commit 2fcb7d0 into main Mar 18, 2026
9 checks passed
@valpere valpere deleted the fix/gosec-suppressions branch March 18, 2026 08:29
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