-
Notifications
You must be signed in to change notification settings - Fork 24
NO-ISSUE: bumping to to 1.25 in the main branch #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@andrej1991: This pull request explicitly references no jira issue. DetailsIn response to this: Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughAdds a GolangCI-Lint configuration, upgrades Go toolchain and builder image to 1.25, bumps golangci-lint installer version, adjusts Makefile test selection and controller-tools version, and updates a CRD controller-gen annotation. No API or exported symbols changed. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.golangci.yml:
- Around line 29-35: The gosec exclusions under the gosec: excludes block (G107,
G115, G401, G402, G501) are too broad; narrow them to only vendor code or
document the global exception: update the gosec configuration so each rule
exclusion is scoped to vendor paths (e.g., apply exclusions only for files under
vendor/) or add a top-of-file justification comment explaining why a global
exclusion is required and which vendor packages triggered it, referencing the
rules G402, G401, G501, and G107 and the gosec: excludes block so reviewers can
verify the scope.
| gosec: | ||
| excludes: | ||
| - G107 | ||
| - G115 | ||
| - G401 | ||
| - G402 | ||
| - G501 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
echo "=== Checking for InsecureSkipVerify usage (G402) ==="
rg -n "InsecureSkipVerify" --type go -C 2 || echo "No matches found"
echo -e "\n=== Checking for MD5 usage (G401/G501) ==="
rg -n 'crypto/md5|md5\.New|md5\.Sum' --type go -C 2 || echo "No matches found"
echo -e "\n=== Checking for URL taint/HTTP request patterns (G107) ==="
rg -n 'http\.Get|http\.Post|url\.Parse' --type go -C 1 | head -30 || echo "No matches found"
echo -e "\n=== Full .golangci.yml content ==="
cat -n .golangci.ymlRepository: openshift/image-based-install-operator
Length of output: 36258
Gosec exclusions are overly broad; consider narrowing to vendor paths or documenting their necessity.
The exclusions disable important security checks globally:
- G402 (TLS InsecureSkipVerify): Used extensively in vendor code (controller-runtime, k8s.io, vmware govmomi) for test harnesses and internal webhooks—all with legitimate justifications but flagged by global exclusion
- G401/G501 (MD5 crypto): Appears only in vendor code for non-security uses (SSH fingerprinting, UUID v3 generation, AWS S3 checksums, database authentication)
- G107 (URL taint): No actual SSRF risks in project code; appears to be vendor-only
Since the problematic patterns are confined to vendor dependencies, either:
- Scope these exclusions to
vendor/paths in the gosec settings, or - If global exclusion is required, document why at the top of this file
This prevents the configuration from inadvertently silencing these checks in your own code.
🤖 Prompt for AI Agents
In @.golangci.yml around lines 29 - 35, The gosec exclusions under the gosec:
excludes block (G107, G115, G401, G402, G501) are too broad; narrow them to only
vendor code or document the global exception: update the gosec configuration so
each rule exclusion is scoped to vendor paths (e.g., apply exclusions only for
files under vendor/) or add a top-of-file justification comment explaining why a
global exclusion is required and which vendor packages triggered it, referencing
the rules G402, G401, G501, and G107 and the gosec: excludes block so reviewers
can verify the scope.
d8af43c to
d878a2f
Compare
d878a2f to
5690e78
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrej1991, carbonin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
|
/retest-required |
|
@andrej1991: The following tests failed, say
Full PR test history. Your PR dashboard. 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. |
No description provided.