Skip to content

fix: improve scanner precision for Go repositories - #163

Merged
alxxjohn merged 1 commit into
mainfrom
fix/scanner-precision-followups
Aug 29, 2026
Merged

fix: improve scanner precision for Go repositories#163
alxxjohn merged 1 commit into
mainfrom
fix/scanner-precision-followups

Conversation

@alxxjohn

Copy link
Copy Markdown
Contributor

Summary

  • keep baseline suppressions stable when findings move to split files by adding path-insensitive content fingerprints
  • reduce Go scanner false positives for standard result/error returns, local row variables, and Postgres repository/adapter boundaries
  • tighten boolean predicate naming to boolean-returning declarations and add common predicate vocabulary

Tests

  • szr proxy go test ./tests/checks -run 'TestBaselineSuppressesFindingAfterMoveToSplitFile|TestFunctionReturnContractAllowsStandardGoRepositoryResults|TestBooleanPredicateNamingOnlyRunsOnBooleanReturns|TestBooleanPredicateNamingAcceptsConventionalPredicateVocabulary|TestGoLocalRowAssignmentsDoNotLookLikeMutableGlobals|TestPostgresRepositoryAllowsPgxQueriesAndRowsAffectedResults|TestPostgresStorageAdapterAllowsPgxQueriesOutsideRepositoryFilename'
  • szr proxy go test ./internal/codeguard/...
  • szr proxy go test <all packages except github.com/devr-tools/codeguard/tests/checks>

Note: full ./tests/checks and go test ./... stayed silent for several minutes in this environment, so the broad verification excludes that long-running package while the new focused tests cover the changed scanner behavior.

@alxxjohn
alxxjohn marked this pull request as ready for review August 29, 2026 17:52
@alxxjohn
alxxjohn force-pushed the fix/scanner-precision-followups branch from 5e29d4c to 078c3b3 Compare August 29, 2026 17:55
@alxxjohn
alxxjohn merged commit d6d7615 into main Aug 29, 2026
16 checks passed
alxxjohn added a commit that referenced this pull request Aug 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.7.3](v1.7.2...v1.7.3)
(2026-08-29)


### Bug Fixes

* improve scanner precision for Go repositories
([078c3b3](078c3b3))
* improve scanner precision for Go repositories
([#163](#163))
([d6d7615](d6d7615))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
@alxxjohn
alxxjohn deleted the fix/scanner-precision-followups branch August 29, 2026 22:24
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