Hello Gilbert,
Thank you for your feedback. Variables, when provided directly to the query, are not considered by the rule as we can't say something about it (maybe it has already been sanitized prior to the method call).
As soon as a string concatenation is done, however (your 2nd case), the string is modified, so we raise an issue. As you can notice, our implementation is pretty naive for the moment, as we don't read values from constants and literals. So we could think about adding the exception for this one but that seems a bit complex to handle with the approach we chose.
We plan to rework the rule when we will be able to efficiently track changes (requires symbolic execution and cross-procedural analysis). Once done, this cases should be correctly handled.
Cheers,