-
Notifications
You must be signed in to change notification settings - Fork 135
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
(bugbash) fixes potential file inclusion via variable. #490
(bugbash) fixes potential file inclusion via variable. #490
Conversation
Signed-off-by: Rahul Grover <[email protected]>
Thank you for this pr and welcome to the community |
Codecov Report
@@ Coverage Diff @@
## master #490 +/- ##
=======================================
Coverage 32.70% 32.70%
=======================================
Files 44 44
Lines 3137 3137
=======================================
Hits 1026 1026
Misses 2019 2019
Partials 92 92
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need better test coverage before we can approve and merge. Let me know if you need any help with that.
Oh, I thought the changes won't require any test coverage. Can you please point me to where I could get started for this? |
@rahulgrover99 take a look at the current set of test and see if you can add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the Codecov complaints are warnings, and this seems like a good change from a security perspective so I will be merging it. Thank you!
The Codecov complaints are only warnings and this seems like a valuable change to take now.
Signed-off-by: Rahul Grover [email protected]
Description
gosec was showing the following warning "Potential file inclusion via variable". This is because we are trying to open files using dynamic variables. Hence, I've cleaned the bad file paths using filepath.Clean()
Fixes:
G304 Potential file inclusion via variable