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

G306 can be easily bypassed with os.ModePerm #1126

Closed
seiyab opened this issue Apr 11, 2024 · 0 comments · Fixed by #1138
Closed

G306 can be easily bypassed with os.ModePerm #1126

seiyab opened this issue Apr 11, 2024 · 0 comments · Fixed by #1138

Comments

@seiyab
Copy link

seiyab commented Apr 11, 2024

Summary

os.WriteFile(file, bytes, os.ModePerm)

should be reported

Steps to reproduce the behavior

gosec version

latest (2.19.0)

Go version (output of 'go version')

go version go1.22.0 darwin/arm64

Operating system / Environment

macOS

Expected behavior

os.WriteFile(file, bytes, os.ModePerm)

should be reported

Actual behavior

os.WriteFile(file, bytes, os.ModePerm)

is ignored though the permission is too loose

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.

1 participant