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

Taint Analysis #56

Open
ShriShalini opened this issue Apr 1, 2019 · 4 comments
Open

Taint Analysis #56

ShriShalini opened this issue Apr 1, 2019 · 4 comments
Labels

Comments

@ShriShalini
Copy link

ShriShalini commented Apr 1, 2019

Puma gives false positives at times. In the following example:

string sq = "select * from tab";
SqlCommand sqll = new SqlCommand(sq);
SqlDataAdapter sqa = new SqlDataAdapter(sqll);

I tried modifying the SqlCommandInjectionObjectCreationExpressionAnalyzer.cs for detecting and raising warnings if the first argument of SqlCommand and SqlDataAdapter are tainted. So if they are tainted , diagnostics are raised properly. String "sq" in this case is not tainted. But still diagnostics are raised for SqlDataAdapter.

@ejohn20
Copy link
Member

ejohn20 commented Apr 6, 2019

This is likely something that can be handled in the general code block analyzer. @meadisu27 and I can take a look at this to see if this FP can be eliminated.

@ShriShalini
Copy link
Author

I am stuck at this for quite some time. So any help is appreciated!

@ejohn20 ejohn20 added the bug label Apr 11, 2019
@ejohn20
Copy link
Member

ejohn20 commented Apr 11, 2019

For now, I would recommend suppressing the false positive. We'll see if we can address this in a future release. @meadisu27 any recommendation on the best place in the code block analyzer to look at for fixing this across the board instead of in the sql expression analyzer specifically?

@meadisu27
Copy link
Member

Is the issue here trying to get warnings raised on the SqlDataAdapter? As it appears the code block analyzer is correctly suppressing the warning for the SqlCommand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants