-
Notifications
You must be signed in to change notification settings - Fork 113
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
Address G115 findings #1670
Address G115 findings #1670
Conversation
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.
/lgtm
823be55
to
48df4b9
Compare
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.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SaschaSchwarze0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
We have new gosec findings in https://github.com/shipwright-io/build/actions/runs/10484927930/job/29040118261?pr=1668 for the new G115 rule. Interestingly, gosec has not even released that while golangci-lint already validates it.
We actually had one real though unrealistic finding for the limits that we allow users to define for number of buildruns in a build. We have a uint there and casted it to int which theoretically can fail if a user would use an unreasonably high value that goes beyond math.MaxInt. I therefore declared a reasnably high maximum in the type and nosec'ed it.
In the bundle package, the finding is imo unrealistic but suddenly Go's tar Header type uses an int64 where it should be better using maybe directly os.FileMode.
Submitter Checklist
Release Notes