Remove identity steps

This commit is contained in:
Owen Mansel-Chan
2025-11-26 10:15:06 +00:00
parent afb810cdeb
commit 9bf20702c6
22 changed files with 2 additions and 140 deletions

View File

@@ -89,7 +89,8 @@ predicate basicLocalFlowStep(Node nodeFrom, Node nodeTo) {
nodeFrom = instructionNode(pred) or
nodeFrom.(PostUpdateNode).getPreUpdateNode() = instructionNode(pred)
) and
nodeTo = instructionNode(succ)
nodeTo = instructionNode(succ) and
nodeTo != nodeFrom
)
or
// GlobalFunctionNode -> use

View File

@@ -1,3 +0,0 @@
identityLocalStep
| main.go:46:18:46:18 | n | Node steps to itself |
| main.go:47:3:47:3 | c | Node steps to itself |

View File

@@ -1,4 +0,0 @@
identityLocalStep
| DatabaseCallInLoop.go:9:3:9:4 | db | Node steps to itself |
| test.go:21:12:21:13 | db | Node steps to itself |
| test.go:25:15:25:16 | db | Node steps to itself |

View File

@@ -34,25 +34,3 @@ reverseRead
| test.go:92:19:92:25 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| test.go:93:5:93:11 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| test.go:94:9:94:15 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| test.go:114:37:114:38 | rc | Node steps to itself |
| test.go:198:27:198:29 | out | Node steps to itself |
| test.go:224:27:224:29 | out | Node steps to itself |
| test.go:249:27:249:29 | out | Node steps to itself |
| test.go:274:27:274:29 | out | Node steps to itself |
| test.go:299:27:299:29 | out | Node steps to itself |
| test.go:324:26:324:28 | out | Node steps to itself |
| test.go:349:26:349:28 | out | Node steps to itself |
| test.go:375:28:375:30 | out | Node steps to itself |
| test.go:403:28:403:30 | out | Node steps to itself |
| test.go:431:24:431:26 | out | Node steps to itself |
| test.go:463:26:463:28 | out | Node steps to itself |
| test.go:490:26:490:28 | out | Node steps to itself |
| test.go:517:27:517:29 | out | Node steps to itself |
| test.go:546:26:546:28 | out | Node steps to itself |
| test.go:571:26:571:28 | out | Node steps to itself |
| test.go:601:24:601:26 | out | Node steps to itself |
| test.go:614:15:614:21 | tarRead | Node steps to itself |
| test.go:622:3:622:7 | files | Node steps to itself |
| test.go:637:10:637:16 | tarRead | Node steps to itself |
| test.go:647:10:647:16 | tarRead | Node steps to itself |

View File

@@ -13,6 +13,3 @@ reverseRead
| CorsMisconfiguration.go:170:14:170:16 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| CorsMisconfiguration.go:194:17:194:19 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| CorsMisconfiguration.go:206:14:206:16 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| CorsMisconfiguration.go:208:13:208:18 | origin | Node steps to itself |
| CorsMisconfiguration.go:235:6:235:8 | try | Node steps to itself |

View File

@@ -2,14 +2,3 @@ reverseRead
| test.go:90:10:90:15 | taint8 | Origin of readStep is missing a PostUpdateNode. |
| test.go:104:12:104:18 | taint10 | Origin of readStep is missing a PostUpdateNode. |
| test.go:150:10:150:14 | slice | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| test.go:92:3:92:3 | b | Node steps to itself |
| test.go:95:3:95:3 | b | Node steps to itself |
| test.go:106:3:106:3 | b | Node steps to itself |
| test.go:109:3:109:3 | b | Node steps to itself |
| test.go:119:3:119:3 | b | Node steps to itself |
| test.go:122:3:122:3 | b | Node steps to itself |
| test.go:125:3:125:3 | b | Node steps to itself |
| test.go:128:3:128:3 | b | Node steps to itself |
| test.go:138:3:138:3 | b | Node steps to itself |
| test.go:141:3:141:3 | b | Node steps to itself |

View File

@@ -2,14 +2,3 @@ reverseRead
| test.go:90:10:90:15 | taint8 | Origin of readStep is missing a PostUpdateNode. |
| test.go:104:12:104:18 | taint10 | Origin of readStep is missing a PostUpdateNode. |
| test.go:150:10:150:14 | slice | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| test.go:92:3:92:3 | b | Node steps to itself |
| test.go:95:3:95:3 | b | Node steps to itself |
| test.go:106:3:106:3 | b | Node steps to itself |
| test.go:109:3:109:3 | b | Node steps to itself |
| test.go:119:3:119:3 | b | Node steps to itself |
| test.go:122:3:122:3 | b | Node steps to itself |
| test.go:125:3:125:3 | b | Node steps to itself |
| test.go:128:3:128:3 | b | Node steps to itself |
| test.go:138:3:138:3 | b | Node steps to itself |
| test.go:141:3:141:3 | b | Node steps to itself |

View File

@@ -18,11 +18,3 @@ reverseRead
| test_jmoiron_sqlx.go:263:8:263:11 | rows | Origin of readStep is missing a PostUpdateNode. |
| test_jmoiron_sqlx.go:265:6:265:9 | rows | Origin of readStep is missing a PostUpdateNode. |
| test_jmoiron_sqlx.go:268:9:268:12 | rows | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| test_couchbase_gocb_v1.go:20:6:20:7 | r1 | Node steps to itself |
| test_couchbase_gocb_v1.go:40:6:40:7 | r2 | Node steps to itself |
| test_mongo_driver_mongo.go:80:24:80:26 | ctx | Node steps to itself |
| test_mongo_driver_mongo.go:103:24:103:26 | ctx | Node steps to itself |
| test_mongo_driver_mongo.go:116:24:116:26 | ctx | Node steps to itself |
| test_uptrace_bun.go:27:3:27:4 | db | Node steps to itself |
| test_uptrace_bun.go:27:14:27:16 | ctx | Node steps to itself |

View File

@@ -14,6 +14,3 @@ reverseRead
| test.go:318:20:318:22 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| test.go:324:17:324:19 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| test.go:324:17:324:25 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| test.go:278:3:278:14 | genericFiles | Node steps to itself |
| test.go:278:21:278:25 | files | Node steps to itself |

View File

@@ -169,5 +169,3 @@ reverseRead
| examples/booking/app/models/booking.go:82:14:82:14 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| examples/booking/app/models/booking.go:83:17:83:17 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| examples/booking/app/models/booking.go:84:18:84:18 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| examples/booking/app/controllers/app.go:95:10:95:10 | c | Node steps to itself |

View File

@@ -95,9 +95,3 @@ reverseRead
| rpc/notes/service.twirp.go:1278:11:1278:14 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| rpc/notes/service.twirp.go:1292:23:1292:26 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| server/main.go:33:19:33:19 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| rpc/notes/service.twirp.go:60:6:60:15 | clientOpts | Node steps to itself |
| rpc/notes/service.twirp.go:199:6:199:15 | clientOpts | Node steps to itself |
| rpc/notes/service.twirp.go:852:6:852:15 | serverOpts | Node steps to itself |
| rpc/notes/service.twirp.go:854:29:854:38 | serverOpts | Node steps to itself |
| rpc/notes/service.twirp.go:965:4:965:9 | copied | Node steps to itself |

View File

@@ -1,6 +0,0 @@
identityLocalStep
| InconsistentLoopOrientation.go:6:3:6:3 | a | Node steps to itself |
| InconsistentLoopOrientationGood.go:6:3:6:3 | a | Node steps to itself |
| main.go:9:26:9:26 | s | Node steps to itself |
| main.go:14:29:14:29 | l | Node steps to itself |
| main.go:20:3:20:3 | a | Node steps to itself |

View File

@@ -1,3 +0,0 @@
identityLocalStep
| LengthComparisonOffByOne.go:10:19:10:28 | searchName | Node steps to itself |
| LengthComparisonOffByOneGood.go:9:14:9:23 | searchName | Node steps to itself |

View File

@@ -1,4 +1,2 @@
reverseRead
| testdata.go:206:7:206:7 | x | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| testdata.go:583:7:583:7 | x | Node steps to itself |

View File

@@ -1,3 +0,0 @@
identityLocalStep
| main.go:35:6:35:9 | cond | Node steps to itself |
| main.go:44:6:44:9 | cond | Node steps to itself |

View File

@@ -1,22 +1,3 @@
reverseRead
| TaintedPath.go:15:18:15:18 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| TaintedPath.go:84:28:84:32 | files | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| UnsafeUnzipSymlink.go:26:18:26:18 | r | Node steps to itself |
| UnsafeUnzipSymlink.go:30:29:30:34 | target | Node steps to itself |
| UnsafeUnzipSymlink.go:42:22:42:27 | target | Node steps to itself |
| UnsafeUnzipSymlink.go:58:18:58:18 | r | Node steps to itself |
| UnsafeUnzipSymlink.go:62:3:62:7 | links | Node steps to itself |
| UnsafeUnzipSymlink.go:79:18:79:18 | r | Node steps to itself |
| UnsafeUnzipSymlink.go:85:29:85:34 | target | Node steps to itself |
| UnsafeUnzipSymlink.go:94:18:94:18 | r | Node steps to itself |
| UnsafeUnzipSymlink.go:98:29:98:34 | target | Node steps to itself |
| UnsafeUnzipSymlink.go:121:32:121:32 | r | Node steps to itself |
| UnsafeUnzipSymlink.go:125:29:125:34 | target | Node steps to itself |
| UnsafeUnzipSymlink.go:146:32:146:32 | r | Node steps to itself |
| UnsafeUnzipSymlink.go:150:29:150:34 | target | Node steps to itself |
| UnsafeUnzipSymlinkGood.go:30:18:30:18 | r | Node steps to itself |
| UnsafeUnzipSymlinkGood.go:34:33:34:38 | target | Node steps to itself |
| UnsafeUnzipSymlinkGood.go:46:26:46:31 | target | Node steps to itself |
| UnsafeUnzipSymlinkGood.go:72:18:72:18 | r | Node steps to itself |
| UnsafeUnzipSymlinkGood.go:76:41:76:46 | target | Node steps to itself |

View File

@@ -19,8 +19,3 @@ reverseRead
| tst.go:48:14:48:14 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| tst.go:66:15:66:15 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| websocketXss.go:26:9:26:9 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| StoredXss.go:13:18:13:18 | w | Node steps to itself |
| StoredXssGood.go:17:3:17:10 | template | Node steps to itself |
| stored.go:30:19:30:19 | w | Node steps to itself |
| stored.go:51:20:51:20 | w | Node steps to itself |

View File

@@ -29,6 +29,3 @@ reverseRead
| server1.go:14:11:14:14 | vals | Origin of readStep is missing a PostUpdateNode. |
| server1.go:17:41:17:41 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| server1.go:21:46:21:46 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| klog.go:24:20:24:23 | name | Node steps to itself |
| server1.go:29:3:29:3 | s | Node steps to itself |

View File

@@ -2,5 +2,3 @@ reverseRead
| UnsafeTLS.go:329:32:329:37 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| UnsafeTLS.go:336:33:336:38 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| UnsafeTLS.go:353:40:353:45 | suites | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| UnsafeTLS.go:353:40:353:45 | suites | Node steps to itself |

View File

@@ -1,3 +0,0 @@
identityLocalStep
| InsecureRandomness.go:12:3:12:3 | s | Node steps to itself |
| InsecureRandomnessGood.go:15:3:15:3 | s | Node steps to itself |

View File

@@ -4,14 +4,3 @@ reverseRead
| UncontrolledAllocationSizeGood.go:32:12:32:12 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| UncontrolledAllocationSizeGood.go:52:12:52:12 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
| UncontrolledAllocationSizeGood.go:73:12:73:12 | implicit dereference | Origin of readStep is missing a PostUpdateNode. |
identityLocalStep
| UncontrolledAllocationSizeBad.go:21:18:21:21 | sink | Node steps to itself |
| UncontrolledAllocationSizeBad.go:22:3:22:8 | result | Node steps to itself |
| UncontrolledAllocationSizeGood.go:23:18:23:21 | sink | Node steps to itself |
| UncontrolledAllocationSizeGood.go:24:3:24:8 | result | Node steps to itself |
| UncontrolledAllocationSizeGood.go:42:19:42:22 | sink | Node steps to itself |
| UncontrolledAllocationSizeGood.go:43:4:43:9 | result | Node steps to itself |
| UncontrolledAllocationSizeGood.go:63:19:63:22 | sink | Node steps to itself |
| UncontrolledAllocationSizeGood.go:64:4:64:9 | result | Node steps to itself |
| UncontrolledAllocationSizeGood.go:88:18:88:21 | sink | Node steps to itself |
| UncontrolledAllocationSizeGood.go:89:3:89:8 | result | Node steps to itself |

View File

@@ -1,9 +0,0 @@
identityLocalStep
| HardcodedKeysGood.go:20:3:20:5 | ret | Node steps to itself |
| sanitizer.go:26:3:26:7 | bytes | Node steps to itself |
| sanitizer.go:39:3:39:5 | ret | Node steps to itself |
| sanitizer.go:49:3:49:7 | bytes | Node steps to itself |
| sanitizer.go:70:12:70:17 | length | Node steps to itself |
| sanitizer.go:71:27:71:33 | sources | Node steps to itself |
| sanitizer.go:71:35:71:35 | r | Node steps to itself |
| sanitizer.go:71:42:71:53 | sourceLength | Node steps to itself |