Skip to content

Commit 814f6f7

Browse files
committed
Lift Go read steps to taint steps
1 parent dd909be commit 814f6f7

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ private predicate localAdditionalForwardTaintStep(
9696
pred2 = pred.(DataFlow::PostUpdateNode).getPreUpdateNode()
9797
|
9898
referenceStep(pred2, succ) or
99+
DataFlowPrivate::readStep(pred2, _, succ) or
99100
elementWriteStep(pred2, succ) or
100101
fieldReadStep(pred2, succ) or
101102
elementStep(pred2, succ) or

go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalTaintStep.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
| main.go:47:2:50:2 | next range element | main.go:47:2:50:2 | extract:0 range element |
1212
| main.go:47:2:50:2 | next range element | main.go:47:2:50:2 | extract:1 range element |
1313
| main.go:47:20:47:21 | xs | main.go:47:2:50:2 | extract:1 range element |
14+
| main.go:57:4:57:5 | ch | main.go:57:2:57:5 | <-... |
1415
| strings.go:9:24:9:24 | s | strings.go:9:8:9:38 | call to Replace |
1516
| strings.go:9:32:9:34 | "_" | strings.go:9:8:9:38 | call to Replace |
1617
| strings.go:10:27:10:27 | s | strings.go:10:8:10:42 | call to ReplaceAll |

0 commit comments

Comments
 (0)