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

feat: workflow to verify security using GoSec #747

Merged
merged 6 commits into from
Feb 28, 2020

Conversation

renanbastos93
Copy link
Contributor

@renanbastos93 renanbastos93 commented Feb 25, 2020

I believe that is much important use to verify possible fail security from this project.
It was chosen version >= 1.13.x because Gosec running only greater and equal to 1.13.x because this lib is using go version 1.13

Some examples based on this project running GoSEC


[/home/runner/work/fasthttp/fasthttp/fs.go:934] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > os.Open(dirPath)


[/home/runner/work/fasthttp/fasthttp/prefork/prefork.go:125] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(os.Args[0], append(os.Args[1:], preforkChildFlag)...)


[/home/runner/work/fasthttp/fasthttp/http.go:164] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > os.Open(path)


[/home/runner/work/fasthttp/fasthttp/fs.go:1243] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > os.Open(path)


[/home/runner/work/fasthttp/fasthttp/fs.go:1105] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > os.Open(filePath)


[/home/runner/work/fasthttp/fasthttp/fs.go:1087] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > os.Open(filePath)


[/home/runner/work/fasthttp/fasthttp/client.go:1523] - G402 (CWE-295): TLS InsecureSkipVerify may be true. (Confidence: LOW, Severity: HIGH)
  > InsecureSkipVerify: c.InsecureSkipVerify

[/home/runner/work/fasthttp/fasthttp/fasthttputil/inmemory_listener.go:88] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > cConn.Close()


[/home/runner/work/fasthttp/fasthttp/fasthttputil/pipeconns.go:235] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > c.SetReadDeadline(deadline)


[/home/runner/work/fasthttp/fasthttp/fasthttputil/pipeconns.go:236] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
  > c.SetWriteDeadline(deadline)


Summary:
   Files: 43
   Lines: 16117
   Nosec: 0
  Issues: 93

More info about it https://github.com/valyala/fasthttp/runs/468076797?check_suite_focus=true

renanbastos93 and others added 6 commits February 25, 2020 16:52
These are all either false positives or os.Open operations done on
filenames supplied by the fasthttp user which we have to assume is safe.
@erikdubbelboer erikdubbelboer merged commit 695f713 into valyala:master Feb 28, 2020
@erikdubbelboer
Copy link
Collaborator

Thanks!

@renanbastos93 renanbastos93 deleted the patch-1 branch March 10, 2021 10:22
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.

2 participants