fix: set TLS MinVersion to 1.2 in ping handler HTTP client#3859
fix: set TLS MinVersion to 1.2 in ping handler HTTP client#3859clubanderson merged 1 commit intomainfrom
Conversation
The gosec scanner flagged the TLS config in ping.go because MinVersion was not explicitly set, defaulting to TLS 1.0. Set MinVersion to tls.VersionTLS12 to satisfy the security requirement. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
✅ Deploy Preview for kubestellarconsole canceled.
|
|
👋 Hey @clubanderson — thanks for opening this PR!
This is an automated message. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
There was a problem hiding this comment.
Pull request overview
Updates the ping handler’s shared HTTP client TLS configuration to satisfy gosec’s minimum TLS requirements.
Changes:
- Set
tls.Config.MinVersiontotls.VersionTLS12for the ping handler HTTP client transport. - Removed the redundant
InsecureSkipVerify: falseassignment.
| Timeout: 5 * time.Second, | ||
| Transport: &http.Transport{ | ||
| TLSClientConfig: &tls.Config{InsecureSkipVerify: false}, | ||
| TLSClientConfig: &tls.Config{MinVersion: tls.VersionTLS12}, |
There was a problem hiding this comment.
Repository PR workflow requires the PR body to start with Fixes #<issue> so GitHub auto-closes the issue on merge. The current PR description starts with Closes #3853; please change it to Fixes #3853 as the first line.
🔄 Auto-Applying Copilot Code ReviewCopilot code review found 0 code suggestion(s) and 1 general comment(s). Also address these general comments:
Push all fixes in a single commit. Run Auto-generated by copilot-review-apply workflow. |
Closes #3853
Summary
MinVersion: tls.VersionTLS12on thetls.Configinpkg/api/handlers/ping.goto fix the gosec finding "TLS MinVersion too low"InsecureSkipVerify: false(it's the zero-value default)scripts/gosec-test.sh— no HIGH findings remainTest plan
go build ./...passesscripts/gosec-test.shreports no security issuescd web && npm run buildpasses