plugin: fix gosec G115 integer overflow warnings#7799
Merged
thevilledev merged 1 commit intocoredns:masterfrom Jan 1, 2026
Merged
plugin: fix gosec G115 integer overflow warnings#7799thevilledev merged 1 commit intocoredns:masterfrom
thevilledev merged 1 commit intocoredns:masterfrom
Conversation
779c798 to
0773558
Compare
Fix integer overflow conversion warnings (G115) by adding appropriate suppressions where values are provably bounded. Fixes: coredns#7793 Changes: - Updated 56 G115 annotations to use consistent // #nosec G115 format - Added 2 //nolint:gosec suppressions for conditional expressions - Removed G115 exclusion from golangci.yml (now explicitly handled per-line) Suppressions justify why each conversion is safe (e.g., port numbers are bounded 1-65535, DNS TTL limits, pool lengths, etc.) Signed-off-by: Azeez Syed <syedazeez337@gmail.com>
0773558 to
7eb844f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix gosec G115 integer overflow warnings by adding appropriate suppressions where values are provably bounded.
Changes
// #nosec G115 -- reasonformat//nolint:gosecsuppressions for conditional expressions (gosec doesn't always parse inline suppressions in conditionals)Issue
Fixes: #7793
Verification
-raceflag