-
-
Notifications
You must be signed in to change notification settings - Fork 621
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
No issues reported for secDevLabs (vulnerable apps) #885
Comments
I think on a first look that we should detect this issue, but it seems that somehow the SQL rule doesn't. This looks like a bug to me. |
Might be that some of these apps from secDevLabs could be good to benchmark the performance of gosec? |
I have a hypothesis of why this is happening, will try to implement a fix. Specifically, I think the issue is that gosec looks for uses of string formatting calls, and for concat calls, but never both on the same statement |
Just saw that the SQL in test is borked.. Disregard that 😅. Bug is still there though |
SQL injections rule needs a revamp to catch more advanced issue. Closing this for now. |
Summary
I am new to using gosec. So, I was trying it against a set of vulnerable go apps in the secDevLabs. The tools reports absolutely no issues although the apps are designed to be vulnerable with some of the vulnerabilities being really obvious (e.g., concatenated SQL statements for SQLi). Am I doing something wrong? Thanks a lot in advance :)
Steps to reproduce the behavior
app/
directory (not sure if necessary but it avoids "failed to import" errors).gosec ./... --verbose
(just to check the vulnerable files are scanned).gosec version
v2.14.0
Go version (output of 'go version')
go1.18.7 linux/amd64
Operating system / Environment
Ubuntu Linux 22.04
Expected behavior
I expect to see some security issues like in line 49 according to the rule G202: SQL query construction using string concatenation.
Actual behavior
The tools reports zero issues:
Summary:
Gosec : v2.14.0
Files : 6
Lines : 391
Nosec : 0
Issues : 0
The text was updated successfully, but these errors were encountered: