Skip to content

Commit

Permalink
Merge pull request #16305 from github/go/value-flow-instead-of-taint-…
Browse files Browse the repository at this point in the history
…flow

Go: Use value flow instead of taint flow for `go/incorrect-integer-conversion`
  • Loading branch information
owen-mc committed May 16, 2024
2 parents 499c4df + 410543f commit 2b7394c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ private module ConversionWithoutBoundsCheckConfig implements DataFlow::StateConf
* Tracks taint flow from an integer obtained from parsing a string that flows
* to a type conversion to a smaller integer type, which could cause data loss.
*/
module Flow = TaintTracking::GlobalWithState<ConversionWithoutBoundsCheckConfig>;
module Flow = DataFlow::GlobalWithState<ConversionWithoutBoundsCheckConfig>;

/** Gets a string describing the size of the integer parsed. */
deprecated string describeBitSize(int bitSize, int intTypeBitSize) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The query `go/incorrect-integer-conversion` has now been restricted to only use flow through value-preserving steps. This reduces false positives, especially around type switches.

0 comments on commit 2b7394c

Please sign in to comment.