C++: Fix for the SQL query. #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @ebickle , it looks like when I recommended the one-line change to
SqlTainted.ql
to add support for MaD, I had missed a few details. Below is a fix which you can merge into your PR to get this fully working.More detail: the query attempts to "decode" the sink into a chain of calls so it can put the alert at the outermost call that takes the SQL string argument, but name the inner modelled function as the true sink. Unfortunately this logic failed for the new MaD sinks, so they were not being included in results. We haven't really needed this kind of extra information since the addition of
@kind path-problem
queries which let users explore the flow path in detail themselves. The changes below circumvent this logic for new MaD sinks, while preserving existing results exactly as they are to avoid unforeseen consequences.