codeql icon indicating copy to clipboard operation
codeql copied to clipboard

python: Rewrite `HardcodedCredentials` away from `PointsTo`

Open yoff opened this issue 1 year ago • 1 comments
trafficstars

  • ModuleValue.attr and ClassValue.lookup are approximated by Function.getName
  • ClassValue.getName is apprximated by Class.getName
  • Module::named is approximated by Module.getName
  • Value::named is approximated by Builtins::likelyBuiltin
  • FunctionValue.getNamedArgumentForCall is approximated by ArgumentNode.argumentOf

yoff avatar Feb 26 '24 16:02 yoff

As far as I can tell from the evaluation, it gets slightly more noisy, adding 21 alerts and losing 14. All of the added and lost alerts seem to be false positives, it is not really better or worse precision-wise. It is a massive improvement, though, to not have to run the PointsTo computation in the securty-extended suite. So for this reason, I propose to take this rewrite as is. If we get many more false positive reports, we will perhaps be pushed to rewrite the query based on fewer heuristics, as we have discussed a few times.

yoff avatar Mar 06 '24 12:03 yoff