Skip to content

feat(go): add 6 patterns from false negative hunt#26

Merged
avifenesh merged 1 commit intomainfrom
feat/go-false-negative-patterns
Feb 26, 2026
Merged

feat(go): add 6 patterns from false negative hunt#26
avifenesh merged 1 commit intomainfrom
feat/go-false-negative-patterns

Conversation

@avifenesh
Copy link
Contributor

Summary

6 new Go patterns discovered by team of 4 agents scanning gin, echo, cobra, zap:

Pattern Severity Detections
go_unchecked_type_assertion high 10 across 4 repos
go_panic_recoverable high 22 across 4 repos
go_error_string_capitalized low 6 across 4 repos
go_defer_close_no_error low 24 across 4 repos
go_weak_random medium 1 (echo proxy)
go_unused_append critical 0 (no bugs in quality repos)

Total Go patterns: 15. 62 new true detections, 0 false positives.

Sources: Uber Go Style Guide, Go Code Review Comments, staticcheck, golangci-lint.

Test Plan

  • 2366 tests pass
  • Scanned gin, echo, cobra, zap to validate detections
  • Each pattern has true positive, false positive, and exclusion tests

…obra, zap

New patterns found by team of 4 agents scanning real-world Go repos:

- go_unchecked_type_assertion [high] - .(Type) without comma-ok panics
- go_panic_recoverable [high] - panic() for recoverable errors
- go_error_string_capitalized [low] - Go convention: lowercase errors
- go_defer_close_no_error [low] - defer Close() hides cleanup failures
- go_weak_random [medium] - math/rand for security-sensitive ops
- go_unused_append [critical] - append() result not assigned (always a bug)

Total Go patterns: 15. Tested against gin, echo, cobra, zap.
62 new true detections, 0 false positives in new patterns.
@avifenesh avifenesh force-pushed the feat/go-false-negative-patterns branch from 55ba0fb to 0a01ca1 Compare February 26, 2026 01:09
@avifenesh avifenesh merged commit 73e24f3 into main Feb 26, 2026
2 checks passed
@avifenesh avifenesh deleted the feat/go-false-negative-patterns branch February 26, 2026 01:12
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