fix(lint): resolve gosec G115 overflow conversions - #1136
Draft
skevetter wants to merge 1 commit into
Draft
Conversation
Bounds-check parsed ports before uint16 conversion in daemonclient, parse backend major versions as uint64 in VerifyVersion, and justify fixed-port / user-lookup uid-gid conversions with gosec nolint directives so golangci-lint passes CI parity on touched packages.
✅ Deploy Preview for devsydev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
✅ Deploy Preview for images-devsy-sh canceled.
|
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.
Task 40130525-2c01-431b-b4be-45a9cf446d93. Fix all gosec G115 integer overflow conversion findings reported by golangci-lint:
pkg/client/clientimplementation/daemonclient/client.go: bounds-check parsed port againstmath.MaxUint16beforeuint16conversion (returns an explicit error for out-of-range ports); nolint for the fixed default SSH port dial.pkg/ts/util.go: nolint with justification for fixed workspace SSH port.pkg/platform/client/client.go: parse backend major version viastrconv.ParseUintso the comparison against semverMajorneeds no lossyintconversion.pkg/extract/compress.go: split tar header mode conversion with justified nolint.pkg/devcontainer/config/prepareprobe.go,pkg/command/credential_supported.go: justified nolint for uid/gid from user lookup.Verification: scoped
go teston all touched packages passes; CI-parity lint (golangci-lint run --new-from-patch --new=false ./...) reports 0 issues; fulltask cli:testrun shows failures only inhack/sign_commitandpkg/git, which reproduce identically on clean HEAD (pre-existing environment-dependent git tests).