Skip to content

fix(lint): resolve gosec G115 overflow conversions - #1136

Draft
skevetter wants to merge 1 commit into
mainfrom
devsy/auto/40130525
Draft

fix(lint): resolve gosec G115 overflow conversions#1136
skevetter wants to merge 1 commit into
mainfrom
devsy/auto/40130525

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

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 against math.MaxUint16 before uint16 conversion (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 via strconv.ParseUint so the comparison against semver Major needs no lossy int conversion.
  • 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 test on all touched packages passes; CI-parity lint (golangci-lint run --new-from-patch --new=false ./...) reports 0 issues; full task cli:test run shows failures only in hack/sign_commit and pkg/git, which reproduce identically on clean HEAD (pre-existing environment-dependent git tests).

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.
@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev ready!

Name Link
🔨 Latest commit 8ce3f52
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a8e7b5b9a84b90008f8a865
😎 Deploy Preview https://deploy-preview-1136--devsydev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 8ce3f52
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a8e7b5b83dca80008782769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant