mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
2.5 KiB
2.5 KiB
Improvements to Java analysis
The following changes in version 1.22 affect Java analysis in all applications.
Changes to existing queries
| Query | Expected impact | Change |
|---|---|---|
Equals method does not inspect argument type (java/unchecked-cast-in-equals) |
Fewer false positive and more true positive results | Precision has been improved by doing a bit of inter-procedural analysis and relying less on ad-hoc method names. |
Uncontrolled data in arithmetic expression (java/uncontrolled-arithmetic) |
Fewer false positive results | Precision has been improved in several ways, in particular, by better detection of guards along the data-flow path. |
Uncontrolled data used in path expression (java/path-injection) |
Fewer false positive results | The query no longer reports results guarded by !var.contains(".."). |
User-controlled data in arithmetic expression (java/tainted-arithmetic) |
Fewer false positive results | Precision has been improved in several ways, in particular, by better detection of guards along the data-flow path. |
Changes to QL libraries
- The virtual dispatch library has been updated to give more precise dispatch
targets for
Object.toString()calls. This affects all security queries and removes false positive results that arose from paths through impossibletoString()calls. - The library
VCS.qlland all queries that imported it have been removed. - The second copy of the interprocedural
TaintTrackinglibrary has been renamed fromTaintTracking::Configuration2toTaintTracking2::Configuration, and the old name is now deprecated. Importsemmle.code.java.dataflow.TaintTracking2to access the new name. - The data-flow library now makes it easier to specify barriers/sanitizers
arising from guards by overriding the predicate
isBarrierGuard/isSanitizerGuardon data-flow and taint-tracking configurations respectively. - The possibility of specifying barrier edges using
isBarrierEdge/isSanitizerEdgein data-flow and taint-tracking configurations has been replaced with the option of specifying in- and out-barriers on nodes by overridingisBarrierIn/isSanitizerInandisBarrierOut/isSanitizerOut. This should be simpler to use effectively, as it does not require knowledge about the actual edges used internally by the library.