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

G304: os.Open() and. os.OpenFile() #488

Closed
MrHappyCPP opened this issue Jun 16, 2020 · 2 comments · Fixed by #489
Closed

G304: os.Open() and. os.OpenFile() #488

MrHappyCPP opened this issue Jun 16, 2020 · 2 comments · Fixed by #489

Comments

@MrHappyCPP
Copy link

Summary

Is there a particular reason why an error G304 is thrown with os.Open() but not with os.OpenFile()?
Since os.Open() is only a wrapper for os.OpenFile(), this seems strange to me.

gosec version

current master

Expected behavior

G304 is created for os.Open() and os.OpenFile()

Actual behavior

G304 only thrown for os.Open(someString)

@ccojocar
Copy link
Member

That call was missed from the rule. Thanks for bringing this up. I raised a PR which it will add it.

@MrHappyCPP
Copy link
Author

@ccojocar thx

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