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 error - Potential DoS vulnerability via decompression #49

Open
FilipNikolovski opened this issue Jan 26, 2020 · 1 comment · May be fixed by #50
Open

gosec error - Potential DoS vulnerability via decompression #49

FilipNikolovski opened this issue Jan 26, 2020 · 1 comment · May be fixed by #50

Comments

@FilipNikolovski
Copy link

When running the tool gosec, it throws an error on the generated code, for the G110 rule - Potential DoS vulnerability via decompression bomb.

G110 (CWE-409): Potential DoS vulnerability via decompression bomb (Confidence: MEDIUM, Severity: MEDIUM)

io.Copy(&buf, gz)

It is advised to use io.CopyN when doing a decompression. Related issue - securego/gosec#433

@FilipNikolovski FilipNikolovski linked a pull request Feb 19, 2020 that will close this issue
@JohnAnthony
Copy link

As a workaround, using the -nocompress flag causes the data to be included uncompressed and therefore avoids this issue. I'll be doing this until #50 is merged.

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 a pull request may close this issue.

2 participants