Skip to content
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

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

SaschaSchwarze0
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 commented Aug 22, 2024

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

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

Release Notes

NONE

@SaschaSchwarze0 SaschaSchwarze0 added the kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. label Aug 22, 2024
@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.14.0 milestone Aug 22, 2024
@openshift-ci openshift-ci bot added the release-note-none Label for when a PR does not need a release note label Aug 22, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 22, 2024
Copy link
Contributor

@karanibm6 karanibm6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 22, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 22, 2024
Copy link
Contributor

@karanibm6 karanibm6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 22, 2024
@SaschaSchwarze0
Copy link
Member Author

/approve

Copy link
Contributor

openshift-ci bot commented Aug 22, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 22, 2024
@SaschaSchwarze0 SaschaSchwarze0 merged commit 88d806e into shipwright-io:main Aug 22, 2024
15 of 16 checks passed
@SaschaSchwarze0 SaschaSchwarze0 deleted the sascha-fix-g115 branch August 22, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm Indicates that a PR is ready to be merged. release-note-none Label for when a PR does not need a release note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants