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

Gosec #455

Merged
merged 39 commits into from May 1, 2020
Merged

Gosec #455

merged 39 commits into from May 1, 2020

Conversation

jonnydawg
Copy link
Collaborator

Implements a github workflow to run gosec on external checks for PRs against master

@jonnydawg
Copy link
Collaborator Author

https://github.com/Comcast/kuberhealthy/runs/637224151?check_suite_focus=true

Currently, here are the issues found:

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/deployment-check/input.go:78] - G109 (CWE-190): Potential Integer overflow made by strconv.Atoi result conversion to int16/32 (Confidence: MEDIUM, Severity: HIGH)
  > port, err := strconv.Atoi(checkContainerPortEnv)

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/deployment-check/input.go:89] - G109 (CWE-190): Potential Integer overflow made by strconv.Atoi result conversion to int16/32 (Confidence: MEDIUM, Severity: HIGH)
  > port, err := strconv.Atoi(checkLoadBalancerPortEnv)

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/daemonset-check/main.go:304] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > dsc.remove()

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/deployment-check/run_check.go:235] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > cleanUp(ctx)

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/deployment-check/service_requester.go:141] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > resp.Body.Close()

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/deployment-check/service_requester.go:153] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > resp.Body.Close()

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/http-check/main.go:49] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > kh.ReportSuccess()

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/http-check/main.go:55] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > kh.ReportFailure([]string{reportErr.Error()})

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/resource-quota-check/main.go:87] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > kh.ReportFailure([]string{errorMessage})

[/home/runner/work/kuberhealthy/kuberhealthy/cmd/resource-quota-check/main.go:98] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > kh.ReportFailure([]string{r.(string)})

Summary:
   Files: 48
   Lines: 8115
   Nosec: 0
  Issues: 10

##[error]Process completed with exit code 1.

@jonnydawg
Copy link
Collaborator Author

I also think we should remove the gosec layer from the dockerfile from cmd/kuberhealthy and do it via a github action instead.

Copy link
Collaborator

@integrii integrii left a comment

Choose a reason for hiding this comment

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

This is great upkeep. Thanks!

@integrii
Copy link
Collaborator

integrii commented May 1, 2020

#458

@integrii integrii merged commit 633196f into master May 1, 2020
@integrii integrii deleted the gosec branch May 1, 2020 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants