-
Notifications
You must be signed in to change notification settings - Fork 1.2k
skip gosec linting for now #134
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
Conversation
pkg/envtest/crd.go
Outdated
@@ -201,7 +201,7 @@ func readCRDs(path string) ([]*apiextensionsv1beta1.CustomResourceDefinition, er | |||
} | |||
|
|||
// Unmarshal the file into a struct | |||
b, err := ioutil.ReadFile(filepath.Join(path, file.Name())) | |||
b, err := ioutil.ReadFile(filepath.Join(path, file.Name())) // nolint: gosec |
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.
Can we configure the gosec linter to ignore these types or errors (or specific files) ? Annotating the source code to exclude is not right.
8de0c0d
to
69480fb
Compare
I have tried to follow the document about how to add an custom linter. |
Can you write a PR description about why you're doing this, for posterity? |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: mengqiy 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 |
skip gosec linting for now
gosec complains when we load from a file path which is a variable. Example error message:
One possible way to make it work is ignoring this kind of error by running
gosec
as a custom linter and exclude G304 errors.