codeql-go
codeql-go copied to clipboard
Switch to use-use dataflow
This will make post-update nodes easy to implement.
Queries / tests that required changes:
- The CleartextLogging and MissingErrorCheck queries are updated because they assumed def-use flow
- The CommandInjection query works around the shortcomings of use-use flow by essentially reintroducing def-use flow when it applies a sanitizer
- The OpenUrlRedirect query currently just accepts its fate; the tests are updated to avoid excess sanitization while the query comments on the problem. We should choose this approach or the CommandInjection one.
Performance results: mostly remarkable except for vitess, which takes 50% longer to run, and cockroach, which times out while computing varBlockReaches. Will review whether that predicate could be made less costly, and/or run this off against an alternative solution.
Many results were removed: mostly path-injection and command-injection, both of which use sanitisers, so my initial suspicion is caused by sanitisers propagating to subsequent uses.