From 083925454a3712733223cfa3a70c4483ec036e7c Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 1 Dec 2026 11:09:14 +0000 Subject: [PATCH 1/5] Go: Add PostUpdateNode regression tests Cover nested receivers and arguments, channel receives, address-of fields, and spurious caller updates after read-only dereferences. Record baseline MISSING and SPURIOUS expectations so later commits expose their effects. Also check value flow through an explicit double-pointer field write. This protects necessary post-update nodes when unconditional dereference nodes are removed, complementing the implicit-dereference cases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../CONSISTENCY/DataFlowConsistency.expected | 22 ++++ .../dataflow/PostUpdateNodes/Flows.expected | 2 + .../go/dataflow/PostUpdateNodes/Flows.ql | 5 + .../go/dataflow/PostUpdateNodes/flows.go | 103 ++++++++++++++++++ .../go/dataflow/PostUpdateNodes/test.expected | 12 +- .../go/dataflow/PostUpdateNodes/test.go | 20 ++++ .../go/dataflow/PostUpdateNodes/test.ql | 1 + 7 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/Flows.expected create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/Flows.ql create mode 100644 go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/CONSISTENCY/DataFlowConsistency.expected index a9ab5a81df3d..d04030aebe62 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/CONSISTENCY/DataFlowConsistency.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/CONSISTENCY/DataFlowConsistency.expected @@ -1,2 +1,24 @@ reverseRead +| flows.go:40:2:40:7 | selection of mid | Origin of readStep is missing a PostUpdateNode. | +| flows.go:41:7:41:12 | selection of mid | Origin of readStep is missing a PostUpdateNode. | +| flows.go:44:2:44:3 | o2 | Origin of readStep is missing a PostUpdateNode. | +| flows.go:44:2:44:9 | implicit-deref selection of midPt | Origin of readStep is missing a PostUpdateNode. | +| flows.go:45:7:45:8 | o2 | Origin of readStep is missing a PostUpdateNode. | +| flows.go:45:7:45:14 | implicit-deref selection of midPt | Origin of readStep is missing a PostUpdateNode. | +| flows.go:48:2:48:11 | index expression | Origin of readStep is missing a PostUpdateNode. | +| flows.go:49:7:49:16 | index expression | Origin of readStep is missing a PostUpdateNode. | +| flows.go:52:2:52:3 | o4 | Origin of readStep is missing a PostUpdateNode. | +| flows.go:58:11:58:15 | selection of mid | Origin of readStep is missing a PostUpdateNode. | +| flows.go:59:7:59:11 | selection of mid | Origin of readStep is missing a PostUpdateNode. | +| flows.go:63:5:63:6 | ch | Origin of readStep is missing a PostUpdateNode. | +| flows.go:64:10:64:11 | ch | Origin of readStep is missing a PostUpdateNode. | +| flows.go:77:40:77:40 | o | Origin of readStep is missing a PostUpdateNode. | +| flows.go:78:7:78:7 | o | Origin of readStep is missing a PostUpdateNode. | | test.go:23:12:23:12 | a | Origin of readStep is missing a PostUpdateNode. | +| test.go:47:6:47:6 | a | Origin of readStep is missing a PostUpdateNode. | +| test.go:47:6:47:11 | implicit-deref selection of bptr | Origin of readStep is missing a PostUpdateNode. | +| test.go:50:2:50:2 | a | Origin of readStep is missing a PostUpdateNode. | +| test.go:50:2:50:7 | implicit-deref selection of bptr | Origin of readStep is missing a PostUpdateNode. | +| test.go:53:10:53:10 | a | Origin of readStep is missing a PostUpdateNode. | +| test.go:53:10:53:15 | implicit-deref selection of bptr | Origin of readStep is missing a PostUpdateNode. | +| test.go:56:5:56:6 | ch | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/Flows.expected b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/Flows.expected new file mode 100644 index 000000000000..42831abaf155 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/Flows.expected @@ -0,0 +1,2 @@ +invalidModelRow +testFailures diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/Flows.ql new file mode 100644 index 000000000000..31483a02004a --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/Flows.ql @@ -0,0 +1,5 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import utils.test.InlineFlowTest +import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go new file mode 100644 index 000000000000..74ccd504f09a --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go @@ -0,0 +1,103 @@ +package a + +import "encoding/json" + +func source() string { + return "tainted" +} + +func sink(any) {} + +type inner struct { + val string +} + +func (i *inner) setVal(v string) { + i.val = v +} + +func setInner(i *inner, v string) { + i.val = v +} + +type middle struct { + in *inner +} + +type embedded struct { + *inner +} + +type outer struct { + mid middle + midPt *middle + mids []middle + emb embedded +} + +func testNestedReceiver() { + o1 := outer{mid: middle{in: &inner{}}} + o1.mid.in.setVal(source()) + sink(o1.mid.in.val) // $ MISSING: hasValueFlow="selection of val" + + o2 := outer{midPt: &middle{in: &inner{}}} + o2.midPt.in.setVal(source()) + sink(o2.midPt.in.val) // $ MISSING: hasValueFlow="selection of val" + + o3 := outer{mids: []middle{{in: &inner{}}}} + o3.mids[0].in.setVal(source()) + sink(o3.mids[0].in.val) // $ MISSING: hasValueFlow="selection of val" + + o4 := outer{emb: embedded{inner: &inner{}}} + o4.emb.setVal(source()) + sink(o4.emb.val) // $ MISSING: hasValueFlow="selection of val" +} + +func testNestedArgument() { + o := outer{mid: middle{in: &inner{}}} + setInner(o.mid.in, source()) + sink(o.mid.in.val) // $ MISSING: hasValueFlow="selection of val" +} + +func testChannelReceiveReceiver(ch chan *inner) { + (<-ch).setVal(source()) + sink((<-ch).val) // $ MISSING: hasValueFlow="selection of val" +} + +type jsonInner struct { + Val string +} + +type jsonOuter struct { + Inner jsonInner +} + +func testAddressOfFieldUnmarshal() { + var o jsonOuter + _ = json.Unmarshal([]byte(source()), &o.Inner) + sink(o.Inner) // $ MISSING: hasTaintFlow="selection of Inner" + sink(o.Inner.Val) // $ MISSING: hasTaintFlow="selection of Val" +} + +func taint() *inner { + return &inner{} +} + +func calleeReadsOnly(p *inner) { + if p == nil { + p = taint() + } + _ = p.val +} + +func testNoBackflowFromReadOnlyDeref() { + clean := &inner{val: "safe"} + calleeReadsOnly(clean) + sink(clean) // $ SPURIOUS: hasTaintFlow="clean" + sink(clean.val) // $ SPURIOUS: hasTaintFlow="selection of val" +} + +func testWriteThroughExplicitDereferences(p **inner) { + (**p).val = source() + sink((**p).val) // $ hasValueFlow="selection of val" +} diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected index f0d15090e67f..5fcb67b4a860 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected @@ -1,4 +1,3 @@ -| file://:0:0:0:0 | [summary param] 0 in copy | file://:0:0:0:0 | [summary] to write: Argument[0] in copy | | test.go:23:2:23:2 | a | test.go:23:2:23:2 | a [postupdate] | | test.go:23:11:23:14 | &... | test.go:23:11:23:14 | &... [postupdate] | | test.go:23:12:23:14 | selection of b | test.go:23:12:23:14 | selection of b [postupdate] | @@ -24,3 +23,14 @@ | test.go:30:7:30:7 | a | test.go:30:7:30:7 | a [postupdate] | | test.go:35:4:35:4 | a | test.go:35:4:35:4 | a [postupdate] | | test.go:36:5:36:5 | a | test.go:36:5:36:5 | a [postupdate] | +| test.go:40:2:40:2 | c | test.go:40:2:40:2 | c [postupdate] | +| test.go:40:2:40:2 | implicit-deref c | test.go:40:2:40:2 | implicit-deref c [postupdate] | +| test.go:47:6:47:11 | selection of bptr | test.go:47:6:47:11 | selection of bptr [postupdate] | +| test.go:47:6:47:16 | selection of cptr | test.go:47:6:47:16 | selection of cptr [postupdate] | +| test.go:50:2:50:7 | selection of bptr | test.go:50:2:50:7 | selection of bptr [postupdate] | +| test.go:50:2:50:12 | selection of cptr | test.go:50:2:50:12 | selection of cptr [postupdate] | +| test.go:50:17:50:17 | a | test.go:50:17:50:17 | a [postupdate] | +| test.go:53:10:53:15 | selection of bptr | test.go:53:10:53:15 | selection of bptr [postupdate] | +| test.go:53:10:53:20 | selection of cptr | test.go:53:10:53:20 | selection of cptr [postupdate] | +| test.go:56:3:56:6 | <-... | test.go:56:3:56:6 | <-... [postupdate] | +| test.go:56:12:56:12 | a | test.go:56:12:56:12 | a [postupdate] | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.go b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.go index 3cb8656b96dd..622331fbdf3f 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.go @@ -35,3 +35,23 @@ func f() { f(a) fp(a) } + +func mutateC(c *C) { + c.field = 200 +} + +func g(ch chan *C) { + a := A{} + + // Read-only pointer dereference chain: no post-update nodes + _ = a.bptr.cptr.field + + // Nested method call receiver: post-update nodes propagate along the chain + a.bptr.cptr.mp(a) + + // Nested call argument: post-update nodes propagate along the chain + mutateC(a.bptr.cptr) + + // Method call on channel receive: post-update nodes on `<-ch` and `ch` + (<-ch).mp(a) +} diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.ql index b200ed4b8a7d..b9b2645dbbc6 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.ql @@ -1,4 +1,5 @@ import go from DataFlow::PostUpdateNode pun +where pun.getFile().getBaseName() = "test.go" select pun.getPreUpdateNode(), pun From b48c542f63b99d89816712522a2b71fe043c949f Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 1 Dec 2026 11:10:40 +0000 Subject: [PATCH 2/5] Go: Refactor PostUpdateNode trigger predicates Extract insnDirectlyHasPostUpdateNode and inline the write and receiver helpers. Express their existing recursive definitions as closures, keeping the same per-trigger propagation and all dereference triggers. Normalize expression-to-instruction lookups and remove the redundant Method check. This commit changes no test or consistency output; the next commit broadens propagation to all post-update triggers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../go/dataflow/internal/DataFlowNodes.qll | 68 ++++++++----------- 1 file changed, 28 insertions(+), 40 deletions(-) diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll index 6cb4d671b9cb..1a5c37461965 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll @@ -811,44 +811,19 @@ module Public { predicate isReceiverOf(MethodDecl m) { parm.isReceiverOf(m) } } - private IR::Instruction getADirectlyWrittenInsn() { - exists(Write w | w.writesComponentInstruction(result, _)) - or - result = any(Write w).getLhs().(IR::PointerTarget).getBase() - or - result = IR::evalExprInstruction(any(SendStmt s).getChannel()) - } - private IR::Instruction getAccessPathPredecessorInsn(IR::Instruction insn) { exists(Expr e1, Expr e2 | - insn = IR::evalExprInstruction(e1) and result = IR::evalExprInstruction(e2) + insn = IR::evalExprInstruction(e1) and result = IR::evalExprInstruction(e2.stripParens()) | - e2 = e1.(DerefExpr).getOperand() or e2 = e1.(StarExpr).getBase() + e2 = e1.(DerefExpr).getOperand() or + e2 = e1.(StarExpr).getBase() ) or - exists(Expr e | insn = IR::implicitDerefInstruction(e) and result = IR::evalExprInstruction(e)) - or - result = insn.(IR::ComponentReadInstruction).getBase() - } - - private IR::Instruction getAWrittenInsn() { - result = getADirectlyWrittenInsn() - or - result = getAccessPathPredecessorInsn(getAWrittenInsn()) - } - - private IR::Instruction getAMethodReceiverInsn() { - exists(CallExpr call, IR::MethodReadInstruction methodRead | - call.getTarget() instanceof Method and - methodRead = IR::evalExprInstruction(call.getCalleeExpr()) and - result = methodRead.getReceiver() + exists(Expr e | + insn = IR::implicitDerefInstruction(e) and result = IR::evalExprInstruction(e.stripParens()) ) or - // If a.x is reading a promoted field, and it's equivalent to a.b.c.x, - // then methodRead.getReceiver() will give us the implicit field read a.b.c - // and we want to have post-update nodes for a, the implicit field - // read a.b and the implicit field read a.b.c. - result = IR::lookThroughImplicitFieldRead(getAMethodReceiverInsn()) + result = insn.(IR::ComponentReadInstruction).getBase() } /** @@ -885,9 +860,8 @@ module Public { abstract Node getPreUpdateNode(); } - /** Holds if the node corresponding to `insn` has a post-update node. */ - predicate insnHasPostUpdateNode(IR::Instruction insn) { - exists(Expr e | insn.(IR::EvalInstruction).getExpr() = e | + private predicate insnDirectlyHasPostUpdateNode(IR::Instruction insn) { + exists(Expr e | insn = IR::evalExprInstruction(e.stripParens()) | e instanceof AddressExpr or e = any(AddressExpr ae).getOperand() or e = any(StarExpr ae).getBase() or @@ -897,21 +871,35 @@ module Public { or ( exists(CallExpr ce | - ce.getArgument(0).getType() instanceof TupleType and - insn = IR::extractTupleElement(IR::evalExprInstruction(ce.getArgument(0)), _) + ce.getArgument(0).stripParens().getType() instanceof TupleType and + insn = IR::extractTupleElement(IR::evalExprInstruction(ce.getArgument(0).stripParens()), _) or - not ce.getArgument(0).getType() instanceof TupleType and - insn = IR::evalExprInstruction(ce.getAnArgument()) + not ce.getArgument(0).stripParens().getType() instanceof TupleType and + insn = IR::evalExprInstruction(ce.getAnArgument().stripParens()) ) or // Receiver of a method call - insn = getAMethodReceiverInsn() + exists(CallExpr call, IR::MethodReadInstruction methodRead | + methodRead = IR::evalExprInstruction(call.getCalleeExpr().stripParens()) and + insn = IR::lookThroughImplicitFieldRead*(methodRead.getReceiver()) + ) ) and mutableType(insn.getResultType()) or - insn = getAWrittenInsn() + exists(IR::Instruction written | + exists(Write w | w.writesComponentInstruction(written, _)) + or + written = any(Write w).getLhs().(IR::PointerTarget).getBase() + or + written = IR::evalExprInstruction(any(SendStmt s).getChannel().stripParens()) + | + insn = getAccessPathPredecessorInsn*(written) + ) } + /** Holds if the node corresponding to `insn` has a post-update node. */ + predicate insnHasPostUpdateNode(IR::Instruction insn) { insnDirectlyHasPostUpdateNode(insn) } + private class DefaultPostUpdateNode extends PostUpdateNode, MkDefaultPostUpdateNode { Node preupd; From 6faf7b1718b9a7ad66bd04c1bd06868b73a21c98 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 1 Dec 2026 11:16:21 +0000 Subject: [PATCH 3/5] Go: Propagate PostUpdateNodes along read chains Apply predecessor closure to every post-update trigger, rather than only to writes and promoted method receivers, and include channel receives. This adds the missing nodes for nested arguments, receivers, and addresses and resolves the existing reverseRead consistency warnings. Update flow expectations and snapshots for propagation alone. Keep the unconditional dereference triggers and the SPURIOUS backflow expectations so their removal is visible independently in the next commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../2026-11-25-post-update-nodes.md | 4 + .../go/dataflow/internal/DataFlowNodes.qll | 32 +++-- .../CONSISTENCY/DataFlowConsistency.expected | 5 - .../CONSISTENCY/DataFlowConsistency.expected | 4 - .../CONSISTENCY/DataFlowConsistency.expected | 3 - .../CONSISTENCY/DataFlowConsistency.expected | 10 -- .../CONSISTENCY/DataFlowConsistency.expected | 36 ----- .../CONSISTENCY/DataFlowConsistency.expected | 13 -- .../CONSISTENCY/DataFlowConsistency.expected | 7 - .../CONSISTENCY/DataFlowConsistency.expected | 8 -- .../CONSISTENCY/DataFlowConsistency.expected | 16 --- .../CONSISTENCY/DataFlowConsistency.expected | 6 - .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 5 - .../CONSISTENCY/DataFlowConsistency.expected | 9 -- .../CONSISTENCY/DataFlowConsistency.expected | 6 - .../CONSISTENCY/DataFlowConsistency.expected | 4 - .../CONSISTENCY/DataFlowConsistency.expected | 4 - .../CONSISTENCY/DataFlowConsistency.expected | 3 - .../CONSISTENCY/DataFlowConsistency.expected | 3 - .../CONSISTENCY/DataFlowConsistency.expected | 24 ---- .../go/dataflow/PostUpdateNodes/flows.go | 16 +-- .../go/dataflow/PostUpdateNodes/test.expected | 8 ++ .../CONSISTENCY/DataFlowConsistency.expected | 5 - .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 16 --- .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 4 - .../CONSISTENCY/DataFlowConsistency.expected | 22 --- .../CONSISTENCY/DataFlowConsistency.expected | 5 - .../CONSISTENCY/DataFlowConsistency.expected | 14 -- .../CONSISTENCY/DataFlowConsistency.expected | 32 ----- .../CONSISTENCY/DataFlowConsistency.expected | 127 ------------------ .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 4 - .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 3 - .../frameworks/TaintSteps/TaintStep.expected | 4 + .../CONSISTENCY/DataFlowConsistency.expected | 97 ------------- .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 12 -- .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 5 - .../CONSISTENCY/DataFlowConsistency.expected | 3 - .../CONSISTENCY/DataFlowConsistency.expected | 3 - .../CONSISTENCY/DataFlowConsistency.expected | 11 -- .../CONSISTENCY/DataFlowConsistency.expected | 21 --- .../CONSISTENCY/DataFlowConsistency.expected | 23 ---- .../CONSISTENCY/DataFlowConsistency.expected | 11 -- .../CONSISTENCY/DataFlowConsistency.expected | 3 - .../CONSISTENCY/DataFlowConsistency.expected | 31 ----- .../CONSISTENCY/DataFlowConsistency.expected | 4 - .../CONSISTENCY/DataFlowConsistency.expected | 5 - .../CONSISTENCY/DataFlowConsistency.expected | 3 - .../CONSISTENCY/DataFlowConsistency.expected | 26 ---- .../OpenUrlRedirect/OpenUrlRedirect.expected | 31 +++++ .../CONSISTENCY/DataFlowConsistency.expected | 2 - .../CONSISTENCY/DataFlowConsistency.expected | 13 -- .../CONSISTENCY/DataFlowConsistency.expected | 6 - .../CONSISTENCY/DataFlowConsistency.expected | 5 - 62 files changed, 75 insertions(+), 720 deletions(-) create mode 100644 go/ql/lib/change-notes/2026-11-25-post-update-nodes.md delete mode 100644 go/ql/test/experimental/CWE-203/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/CWE-287/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/CWE-321-V2/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/CWE-369/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/CWE-522-DecompressionBombs/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/CWE-807/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/CWE-840/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/CWE-918/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/CWE-942/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/Unsafe/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/experimental/frameworks/CleverGo/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/Types/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/concepts/HTTP/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/DefaultTaintSanitizer/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/GlobalValueNumbering/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/GlobalVariableSideEffects/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/SSA/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/dataflow/ThreatModels/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Afero/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Beego/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Chi/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Echo/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Gin/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/GoMicro/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Protobuf/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Revel/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Slog/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/SystemCommandExecutors/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/Twirp/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/WebSocket/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/RedundantCode/DeadStoreOfLocal/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegexp/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-020/MissingRegexpAnchor/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-022/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-078/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-079/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-089/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-117/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-190/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-312/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-327/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-347/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-640/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-643/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-770/CONSISTENCY/DataFlowConsistency.expected delete mode 100644 go/ql/test/query-tests/Security/CWE-918/CONSISTENCY/DataFlowConsistency.expected diff --git a/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md b/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md new file mode 100644 index 000000000000..ab4e515d96fe --- /dev/null +++ b/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Improved `DataFlow::PostUpdateNode` generation so post-update nodes propagate along the full chain of field reads, index reads, pointer dereferences, and channel receives when a nested value may be mutated. diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll index 1a5c37461965..579b486b5eed 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll @@ -811,12 +811,17 @@ module Public { predicate isReceiverOf(MethodDecl m) { parm.isReceiverOf(m) } } + /** + * Gets an instruction from which `insn` is read in a single `readStep` + * (pointer dereference, field or element read, or channel receive). + */ private IR::Instruction getAccessPathPredecessorInsn(IR::Instruction insn) { exists(Expr e1, Expr e2 | insn = IR::evalExprInstruction(e1) and result = IR::evalExprInstruction(e2.stripParens()) | e2 = e1.(DerefExpr).getOperand() or - e2 = e1.(StarExpr).getBase() + e2 = e1.(StarExpr).getBase() or + e2 = e1.(RecvExpr).getOperand() ) or exists(Expr e | @@ -881,24 +886,27 @@ module Public { // Receiver of a method call exists(CallExpr call, IR::MethodReadInstruction methodRead | methodRead = IR::evalExprInstruction(call.getCalleeExpr().stripParens()) and - insn = IR::lookThroughImplicitFieldRead*(methodRead.getReceiver()) + insn = methodRead.getReceiver() ) ) and mutableType(insn.getResultType()) or - exists(IR::Instruction written | - exists(Write w | w.writesComponentInstruction(written, _)) - or - written = any(Write w).getLhs().(IR::PointerTarget).getBase() - or - written = IR::evalExprInstruction(any(SendStmt s).getChannel().stripParens()) - | - insn = getAccessPathPredecessorInsn*(written) - ) + exists(Write w | w.writesComponentInstruction(insn, _)) + or + insn = any(Write w).getLhs().(IR::PointerTarget).getBase() + or + insn = IR::evalExprInstruction(any(SendStmt s).getChannel().stripParens()) } /** Holds if the node corresponding to `insn` has a post-update node. */ - predicate insnHasPostUpdateNode(IR::Instruction insn) { insnDirectlyHasPostUpdateNode(insn) } + predicate insnHasPostUpdateNode(IR::Instruction insn) { + insnDirectlyHasPostUpdateNode(insn) + or + exists(IR::Instruction succ | + insnHasPostUpdateNode(succ) and + insn = getAccessPathPredecessorInsn(succ) + ) + } private class DefaultPostUpdateNode extends PostUpdateNode, MkDefaultPostUpdateNode { Node preupd; diff --git a/go/ql/test/experimental/CWE-203/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/CWE-203/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index cabe6568e9c0..000000000000 --- a/go/ql/test/experimental/CWE-203/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -reverseRead -| timing.go:15:18:15:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| timing.go:28:18:28:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| timing.go:41:18:41:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| timing.go:53:18:53:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/CWE-287/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/CWE-287/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index a45a61725b92..000000000000 --- a/go/ql/test/experimental/CWE-287/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,4 +0,0 @@ -reverseRead -| ImproperLdapAuth.go:18:18:18:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| ImproperLdapAuth.go:39:18:39:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| ImproperLdapAuth.go:64:18:64:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/CWE-321-V2/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/CWE-321-V2/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 00934dd30c49..000000000000 --- a/go/ql/test/experimental/CWE-321-V2/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -reverseRead -| go-jose.v3.go:16:17:16:17 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| golang-jwt-v5.go:22:17:22:17 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/CWE-369/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/CWE-369/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 2c48b7b383c9..000000000000 --- a/go/ql/test/experimental/CWE-369/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,10 +0,0 @@ -reverseRead -| DivideByZero.go:10:12:10:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| DivideByZero.go:17:12:17:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| DivideByZero.go:24:12:24:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| DivideByZero.go:31:12:31:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| DivideByZero.go:38:12:38:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| DivideByZero.go:45:12:45:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| DivideByZero.go:54:12:54:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| DivideByZero.go:63:12:63:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| DivideByZero.go:72:12:72:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/CWE-522-DecompressionBombs/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 3cb5d9567bf5..000000000000 --- a/go/ql/test/experimental/CWE-522-DecompressionBombs/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,36 +0,0 @@ -reverseRead -| test.go:60:15:60:21 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:61:24:61:30 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:62:13:62:19 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:63:17:63:23 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:64:8:64:14 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:65:12:65:18 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:66:8:66:14 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:67:12:67:18 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:68:17:68:23 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:69:21:69:27 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:70:13:70:19 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:71:17:71:23 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:72:16:72:22 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:73:20:73:26 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:74:7:74:13 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:75:11:75:17 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:76:9:76:15 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:77:13:77:19 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:78:18:78:24 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:79:22:79:28 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:80:5:80:11 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:81:9:81:15 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:82:7:82:13 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:83:11:83:17 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:84:15:84:21 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:85:16:85:22 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:86:20:86:26 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:87:16:87:22 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:88:20:88:26 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:89:17:89:23 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:90:21:90:27 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:91:15:91:21 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:92:19:92:25 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:93:5:93:11 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:94:9:94:15 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/CWE-807/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/CWE-807/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index f230dfa91685..000000000000 --- a/go/ql/test/experimental/CWE-807/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,13 +0,0 @@ -reverseRead -| SensitiveConditionBypassBad.go:7:5:7:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:16:5:16:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:25:5:25:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:34:5:34:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:41:5:41:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:41:35:41:35 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:49:5:49:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:56:5:56:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:63:5:63:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:70:5:70:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:77:5:77:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:84:5:84:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/CWE-840/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/CWE-840/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index fedb34fec073..000000000000 --- a/go/ql/test/experimental/CWE-840/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,7 +0,0 @@ -reverseRead -| ConditionalBypassBad.go:9:5:9:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| ConditionalBypassGood.go:9:5:9:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:9:5:9:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:16:5:16:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:16:41:16:41 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| condition.go:23:5:23:5 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/CWE-918/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/CWE-918/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 8b2cc46f5851..000000000000 --- a/go/ql/test/experimental/CWE-918/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,8 +0,0 @@ -reverseRead -| builtin.go:115:31:115:31 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| builtin.go:124:32:124:32 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| builtin.go:133:54:133:54 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| builtin.go:142:55:142:55 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| new-tests.go:62:31:62:33 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| new-tests.go:78:18:78:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| new-tests.go:81:37:81:39 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/CWE-942/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/CWE-942/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 20e32467bcbb..000000000000 --- a/go/ql/test/experimental/CWE-942/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,16 +0,0 @@ -reverseRead -| CorsMisconfiguration.go:52:14:52:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:59:14:59:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:66:17:66:19 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:74:14:74:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:81:14:81:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:88:14:88:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:101:14:101:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:112:14:112:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:126:15:126:17 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:141:14:141:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:156:14:156:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:170:14:170:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:194:17:194:19 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:206:14:206:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CorsMisconfiguration.go:219:14:219:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/Unsafe/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/Unsafe/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 95ae768a95ee..000000000000 --- a/go/ql/test/experimental/Unsafe/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,6 +0,0 @@ -reverseRead -| WrongUsageOfUnsafe.go:34:40:34:47 | harmless | Origin of readStep is missing a PostUpdateNode. | -| WrongUsageOfUnsafe.go:55:40:55:47 | harmless | Origin of readStep is missing a PostUpdateNode. | -| WrongUsageOfUnsafe.go:77:43:77:50 | harmless | Origin of readStep is missing a PostUpdateNode. | -| WrongUsageOfUnsafe.go:111:47:111:54 | harmless | Origin of readStep is missing a PostUpdateNode. | -| WrongUsageOfUnsafe.go:211:47:211:54 | harmless | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/experimental/frameworks/CleverGo/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/experimental/frameworks/CleverGo/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index d3f4571abef8..000000000000 --- a/go/ql/test/experimental/frameworks/CleverGo/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| RemoteSources.go:98:9:98:24 | implicit-deref structContext409 | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/Types/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/Types/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index d0324c7c4eb3..000000000000 --- a/go/ql/test/library-tests/semmle/go/Types/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -reverseRead -| pkg1/tst.go:43:6:43:6 | t | Origin of readStep is missing a PostUpdateNode. | -| pkg1/tst.go:46:6:46:6 | t | Origin of readStep is missing a PostUpdateNode. | -| pkg1/tst.go:53:6:53:7 | t2 | Origin of readStep is missing a PostUpdateNode. | -| pkg1/tst.go:55:6:55:7 | t2 | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/concepts/HTTP/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/concepts/HTTP/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 56f4c17d2240..000000000000 --- a/go/ql/test/library-tests/semmle/go/concepts/HTTP/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,9 +0,0 @@ -reverseRead -| main.go:49:2:49:4 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| main.go:50:2:50:4 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| main.go:58:2:58:5 | implicit-deref resp | Origin of readStep is missing a PostUpdateNode. | -| main.go:63:49:63:49 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| server.go:8:6:8:6 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| server.go:9:6:9:6 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| server.go:10:6:10:6 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| server.go:13:6:13:6 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/DefaultTaintSanitizer/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/dataflow/DefaultTaintSanitizer/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index c1715caa6ec3..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/DefaultTaintSanitizer/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,6 +0,0 @@ -reverseRead -| Builtin.go:7:2:7:10 | implicit-deref sourceReq | Origin of readStep is missing a PostUpdateNode. | -| Builtin.go:13:2:13:10 | implicit-deref sourceReq | Origin of readStep is missing a PostUpdateNode. | -| Builtin.go:22:2:22:10 | implicit-deref sourceReq | Origin of readStep is missing a PostUpdateNode. | -| Builtin.go:32:2:32:10 | implicit-deref sourceReq | Origin of readStep is missing a PostUpdateNode. | -| Builtin.go:39:2:39:10 | implicit-deref sourceReq | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 44b43af68873..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,4 +0,0 @@ -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. | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 44b43af68873..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,4 +0,0 @@ -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. | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/GlobalValueNumbering/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/dataflow/GlobalValueNumbering/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 3eb5ee54756a..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/GlobalValueNumbering/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -reverseRead -| regressions.go:21:3:21:3 | x | Origin of readStep is missing a PostUpdateNode. | -| regressions.go:22:3:22:3 | y | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/GlobalVariableSideEffects/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/dataflow/GlobalVariableSideEffects/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index c9202aa28e6a..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/GlobalVariableSideEffects/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -reverseRead -| globalVariable.go:17:7:17:17 | globalArray | Origin of readStep is missing a PostUpdateNode. | -| globalVariable.go:18:7:18:17 | globalSlice | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index d04030aebe62..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,24 +0,0 @@ -reverseRead -| flows.go:40:2:40:7 | selection of mid | Origin of readStep is missing a PostUpdateNode. | -| flows.go:41:7:41:12 | selection of mid | Origin of readStep is missing a PostUpdateNode. | -| flows.go:44:2:44:3 | o2 | Origin of readStep is missing a PostUpdateNode. | -| flows.go:44:2:44:9 | implicit-deref selection of midPt | Origin of readStep is missing a PostUpdateNode. | -| flows.go:45:7:45:8 | o2 | Origin of readStep is missing a PostUpdateNode. | -| flows.go:45:7:45:14 | implicit-deref selection of midPt | Origin of readStep is missing a PostUpdateNode. | -| flows.go:48:2:48:11 | index expression | Origin of readStep is missing a PostUpdateNode. | -| flows.go:49:7:49:16 | index expression | Origin of readStep is missing a PostUpdateNode. | -| flows.go:52:2:52:3 | o4 | Origin of readStep is missing a PostUpdateNode. | -| flows.go:58:11:58:15 | selection of mid | Origin of readStep is missing a PostUpdateNode. | -| flows.go:59:7:59:11 | selection of mid | Origin of readStep is missing a PostUpdateNode. | -| flows.go:63:5:63:6 | ch | Origin of readStep is missing a PostUpdateNode. | -| flows.go:64:10:64:11 | ch | Origin of readStep is missing a PostUpdateNode. | -| flows.go:77:40:77:40 | o | Origin of readStep is missing a PostUpdateNode. | -| flows.go:78:7:78:7 | o | Origin of readStep is missing a PostUpdateNode. | -| test.go:23:12:23:12 | a | Origin of readStep is missing a PostUpdateNode. | -| test.go:47:6:47:6 | a | Origin of readStep is missing a PostUpdateNode. | -| test.go:47:6:47:11 | implicit-deref selection of bptr | Origin of readStep is missing a PostUpdateNode. | -| test.go:50:2:50:2 | a | Origin of readStep is missing a PostUpdateNode. | -| test.go:50:2:50:7 | implicit-deref selection of bptr | Origin of readStep is missing a PostUpdateNode. | -| test.go:53:10:53:10 | a | Origin of readStep is missing a PostUpdateNode. | -| test.go:53:10:53:15 | implicit-deref selection of bptr | Origin of readStep is missing a PostUpdateNode. | -| test.go:56:5:56:6 | ch | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go index 74ccd504f09a..0f35ac578301 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go @@ -38,30 +38,30 @@ type outer struct { func testNestedReceiver() { o1 := outer{mid: middle{in: &inner{}}} o1.mid.in.setVal(source()) - sink(o1.mid.in.val) // $ MISSING: hasValueFlow="selection of val" + sink(o1.mid.in.val) // $ hasValueFlow="selection of val" o2 := outer{midPt: &middle{in: &inner{}}} o2.midPt.in.setVal(source()) - sink(o2.midPt.in.val) // $ MISSING: hasValueFlow="selection of val" + sink(o2.midPt.in.val) // $ hasValueFlow="selection of val" o3 := outer{mids: []middle{{in: &inner{}}}} o3.mids[0].in.setVal(source()) - sink(o3.mids[0].in.val) // $ MISSING: hasValueFlow="selection of val" + sink(o3.mids[0].in.val) // $ hasValueFlow="selection of val" o4 := outer{emb: embedded{inner: &inner{}}} o4.emb.setVal(source()) - sink(o4.emb.val) // $ MISSING: hasValueFlow="selection of val" + sink(o4.emb.val) // $ hasValueFlow="selection of val" } func testNestedArgument() { o := outer{mid: middle{in: &inner{}}} setInner(o.mid.in, source()) - sink(o.mid.in.val) // $ MISSING: hasValueFlow="selection of val" + sink(o.mid.in.val) // $ hasValueFlow="selection of val" } func testChannelReceiveReceiver(ch chan *inner) { (<-ch).setVal(source()) - sink((<-ch).val) // $ MISSING: hasValueFlow="selection of val" + sink((<-ch).val) // $ hasValueFlow="selection of val" } type jsonInner struct { @@ -75,8 +75,8 @@ type jsonOuter struct { func testAddressOfFieldUnmarshal() { var o jsonOuter _ = json.Unmarshal([]byte(source()), &o.Inner) - sink(o.Inner) // $ MISSING: hasTaintFlow="selection of Inner" - sink(o.Inner.Val) // $ MISSING: hasTaintFlow="selection of Val" + sink(o.Inner) // $ hasTaintFlow="selection of Inner" + sink(o.Inner.Val) // $ hasTaintFlow="selection of Val" } func taint() *inner { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected index 5fcb67b4a860..234d136472a5 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected @@ -1,5 +1,6 @@ | test.go:23:2:23:2 | a | test.go:23:2:23:2 | a [postupdate] | | test.go:23:11:23:14 | &... | test.go:23:11:23:14 | &... [postupdate] | +| test.go:23:12:23:12 | a | test.go:23:12:23:12 | a [postupdate] | | test.go:23:12:23:14 | selection of b | test.go:23:12:23:14 | selection of b [postupdate] | | test.go:24:2:24:2 | a | test.go:24:2:24:2 | a [postupdate] | | test.go:24:2:24:5 | selection of bs | test.go:24:2:24:5 | selection of bs [postupdate] | @@ -25,12 +26,19 @@ | test.go:36:5:36:5 | a | test.go:36:5:36:5 | a [postupdate] | | test.go:40:2:40:2 | c | test.go:40:2:40:2 | c [postupdate] | | test.go:40:2:40:2 | implicit-deref c | test.go:40:2:40:2 | implicit-deref c [postupdate] | +| test.go:47:6:47:6 | a | test.go:47:6:47:6 | a [postupdate] | +| test.go:47:6:47:11 | implicit-deref selection of bptr | test.go:47:6:47:11 | implicit-deref selection of bptr [postupdate] | | test.go:47:6:47:11 | selection of bptr | test.go:47:6:47:11 | selection of bptr [postupdate] | | test.go:47:6:47:16 | selection of cptr | test.go:47:6:47:16 | selection of cptr [postupdate] | +| test.go:50:2:50:2 | a | test.go:50:2:50:2 | a [postupdate] | +| test.go:50:2:50:7 | implicit-deref selection of bptr | test.go:50:2:50:7 | implicit-deref selection of bptr [postupdate] | | test.go:50:2:50:7 | selection of bptr | test.go:50:2:50:7 | selection of bptr [postupdate] | | test.go:50:2:50:12 | selection of cptr | test.go:50:2:50:12 | selection of cptr [postupdate] | | test.go:50:17:50:17 | a | test.go:50:17:50:17 | a [postupdate] | +| test.go:53:10:53:10 | a | test.go:53:10:53:10 | a [postupdate] | +| test.go:53:10:53:15 | implicit-deref selection of bptr | test.go:53:10:53:15 | implicit-deref selection of bptr [postupdate] | | test.go:53:10:53:15 | selection of bptr | test.go:53:10:53:15 | selection of bptr [postupdate] | | test.go:53:10:53:20 | selection of cptr | test.go:53:10:53:20 | selection of cptr [postupdate] | | test.go:56:3:56:6 | <-... | test.go:56:3:56:6 | <-... [postupdate] | +| test.go:56:5:56:6 | ch | test.go:56:5:56:6 | ch [postupdate] | | test.go:56:12:56:12 | a | test.go:56:12:56:12 | a [postupdate] | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/SSA/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/dataflow/SSA/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 3870f4b071bc..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/SSA/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -reverseRead -| main.go:97:2:97:8 | wrapper | Origin of readStep is missing a PostUpdateNode. | -| main.go:105:2:105:8 | wrapper | Origin of readStep is missing a PostUpdateNode. | -| main.go:114:2:114:8 | wrapper | Origin of readStep is missing a PostUpdateNode. | -| main.go:135:2:135:2 | p | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ThreatModels/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/dataflow/ThreatModels/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 0a79232575c2..000000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/ThreatModels/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| test.go:32:11:32:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Afero/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Afero/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 40a0dda55e33..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Afero/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| test.go:19:14:19:20 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Beego/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Beego/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index fe63cabf552a..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Beego/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,16 +0,0 @@ -reverseRead -| test.go:142:3:142:9 | implicit-deref context | Origin of readStep is missing a PostUpdateNode. | -| test.go:143:3:143:9 | implicit-deref context | Origin of readStep is missing a PostUpdateNode. | -| test.go:143:23:143:29 | implicit-deref context | Origin of readStep is missing a PostUpdateNode. | -| test.go:208:18:208:20 | implicit-deref ctx | Origin of readStep is missing a PostUpdateNode. | -| test.go:208:18:208:28 | implicit-deref selection of Request | Origin of readStep is missing a PostUpdateNode. | -| test.go:229:21:229:25 | files | Origin of readStep is missing a PostUpdateNode. | -| test.go:259:2:259:2 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| test.go:270:37:270:37 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| test.go:283:44:283:48 | files | Origin of readStep is missing a PostUpdateNode. | -| test.go:297:51:297:62 | genericFiles | Origin of readStep is missing a PostUpdateNode. | -| test.go:298:54:298:62 | untainted | Origin of readStep is missing a PostUpdateNode. | -| test.go:317:13:317:15 | implicit-deref ctx | Origin of readStep is missing a PostUpdateNode. | -| test.go:318:20:318:22 | implicit-deref ctx | Origin of readStep is missing a PostUpdateNode. | -| test.go:324:17:324:19 | implicit-deref ctx | Origin of readStep is missing a PostUpdateNode. | -| test.go:324:17:324:25 | implicit-deref selection of Input | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 9f6ffe14c070..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| test.go:110:20:110:23 | objs | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Chi/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Chi/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 4bd409e41d29..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Chi/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| test.go:13:12:13:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Echo/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Echo/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 01ec84e742c6..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Echo/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,4 +0,0 @@ -reverseRead -| test.go:89:16:89:22 | cookies | Origin of readStep is missing a PostUpdateNode. | -| test.go:193:10:193:22 | implicit-deref call to Request | Origin of readStep is missing a PostUpdateNode. | -| test.go:216:20:216:26 | cookies | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index ce16ef565303..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,22 +0,0 @@ -reverseRead -| fasthttp.go:75:28:75:35 | lbclient | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:102:7:102:16 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:162:3:162:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:163:3:163:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:164:3:164:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:165:15:165:24 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:166:15:166:24 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:167:15:167:24 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:168:15:168:24 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:170:3:170:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:172:3:172:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:173:3:173:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:174:3:174:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:175:3:175:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:183:3:183:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:184:3:184:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:185:16:185:25 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:194:3:194:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:195:3:195:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:196:3:196:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | -| fasthttp.go:197:3:197:12 | implicit-deref requestCtx | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Gin/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Gin/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index a3358c49ec11..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Gin/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -reverseRead -| Gin.go:26:18:26:18 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Gin.go:26:28:26:28 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Gin.go:158:10:158:12 | implicit-deref ctx | Origin of readStep is missing a PostUpdateNode. | -| Gin.go:162:13:162:15 | implicit-deref ctx | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/GoMicro/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/GoMicro/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index d3172f5635cb..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/GoMicro/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,14 +0,0 @@ -reverseRead -| proto/Hello.pb.go:34:10:34:40 | file_proto_Hello_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.go:47:9:47:39 | file_proto_Hello_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.go:81:10:81:40 | file_proto_Hello_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.go:94:9:94:39 | file_proto_Hello_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.go:169:13:169:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.go:171:13:171:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.go:173:13:173:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.go:181:13:181:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.go:183:13:183:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.go:185:13:185:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.micro.go:55:9:55:9 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.micro.go:57:9:57:9 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| proto/Hello.pb.micro.go:86:9:86:9 | implicit-deref h | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Protobuf/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Protobuf/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 91e28a8114e8..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Protobuf/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,32 +0,0 @@ -reverseRead -| protos/query/query.pb.go:58:9:58:34 | file_query_proto_enumTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:62:10:62:35 | file_query_proto_enumTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:88:10:88:34 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:101:9:101:33 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:156:10:156:34 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:169:9:169:33 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:204:10:204:34 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:217:9:217:33 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:318:13:318:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:320:13:320:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:322:13:322:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:330:13:330:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:332:13:332:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:334:13:334:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:342:13:342:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:344:13:344:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:346:13:346:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| testDeprecatedApi.go:74:24:74:28 | implicit-deref query | Origin of readStep is missing a PostUpdateNode. | -| testDeprecatedApi.go:85:24:85:28 | implicit-deref query | Origin of readStep is missing a PostUpdateNode. | -| testDeprecatedApi.go:98:13:98:24 | selection of Alerts | Origin of readStep is missing a PostUpdateNode. | -| testDeprecatedApi.go:124:12:124:16 | implicit-deref query | Origin of readStep is missing a PostUpdateNode. | -| testDeprecatedApi.go:167:12:167:16 | implicit-deref query | Origin of readStep is missing a PostUpdateNode. | -| testDeprecatedApi.go:176:24:176:28 | query | Origin of readStep is missing a PostUpdateNode. | -| testModernApi.go:94:12:94:21 | serialized | Origin of readStep is missing a PostUpdateNode. | -| testModernApi.go:102:24:102:28 | implicit-deref query | Origin of readStep is missing a PostUpdateNode. | -| testModernApi.go:113:24:113:28 | implicit-deref query | Origin of readStep is missing a PostUpdateNode. | -| testModernApi.go:126:13:126:24 | selection of Alerts | Origin of readStep is missing a PostUpdateNode. | -| testModernApi.go:162:12:162:16 | implicit-deref query | Origin of readStep is missing a PostUpdateNode. | -| testModernApi.go:186:12:186:21 | serialized | Origin of readStep is missing a PostUpdateNode. | -| testModernApi.go:224:12:224:16 | implicit-deref query | Origin of readStep is missing a PostUpdateNode. | -| testModernApi.go:233:24:233:28 | query | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Revel/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Revel/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index c6c4611752d8..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Revel/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,127 +0,0 @@ -reverseRead -| EndToEnd.go:31:35:31:42 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:31:35:31:42 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:37:18:37:25 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:37:18:37:25 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:45:18:45:25 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:45:18:45:25 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:52:20:52:27 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:52:20:52:27 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:59:18:59:25 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:59:18:59:25 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:65:26:65:33 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:65:26:65:33 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:70:22:70:29 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:70:22:70:29 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:75:22:75:29 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:75:22:75:29 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:80:35:80:42 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:80:35:80:42 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:85:22:85:29 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:85:22:85:29 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:90:21:90:28 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:90:21:90:28 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:95:20:95:27 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| EndToEnd.go:95:20:95:27 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:26:7:26:14 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:27:7:27:14 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:27:7:27:14 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:30:2:30:9 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:33:7:33:15 | implicit-field:1 selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:37:7:37:14 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:37:7:37:14 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:38:24:38:32 | implicit-field:1 selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:42:7:42:14 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:43:24:43:32 | implicit-field:1 selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:47:7:47:14 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:51:7:51:14 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:52:7:52:15 | implicit-field:1 selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:56:7:56:14 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:56:7:56:27 | index expression | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:60:7:60:14 | implicit-deref selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:60:7:60:14 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:63:2:63:9 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:70:22:70:29 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:75:7:75:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:76:7:76:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:77:7:77:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:77:7:77:15 | implicit-deref selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:78:7:78:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:79:7:79:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:80:7:80:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:82:13:82:13 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:85:13:85:13 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:88:13:88:13 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:89:7:89:28 | index expression | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:91:7:91:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:91:7:91:15 | implicit-deref selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:91:7:91:41 | index expression | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:93:28:93:28 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:96:15:96:15 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:99:7:99:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:101:7:101:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:103:15:103:15 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:109:7:109:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:111:7:111:7 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:116:2:116:2 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:116:2:116:10 | implicit-deref selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:120:2:120:2 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:120:2:120:10 | implicit-deref selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:125:13:125:13 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:125:13:125:21 | implicit-deref selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:128:14:128:14 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:128:14:128:22 | implicit-deref selection of Request | Origin of readStep is missing a PostUpdateNode. | -| Revel.go:133:13:133:13 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:34:2:34:10 | implicit-field:1 selection of Session | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:47:2:47:8 | implicit-field:1 selection of Flash | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:56:2:56:13 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:57:2:57:13 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:59:16:59:27 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:61:5:61:16 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:62:3:62:14 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:68:2:68:8 | implicit-field:1 selection of Flash | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:79:5:79:13 | implicit-field:1 selection of Session | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:81:5:81:13 | implicit-field:1 selection of Session | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:83:4:83:10 | implicit-field:1 selection of Flash | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:89:2:89:8 | implicit-field:1 selection of Flash | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/app.go:95:10:95:18 | implicit-field:1 selection of Session | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:44:3:44:9 | implicit-field:1 selection of Flash | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:51:2:51:6 | implicit-field:1 selection of Log | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:143:26:143:37 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:144:2:144:13 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:146:2:146:13 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:148:5:148:16 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:149:3:149:14 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:153:2:153:8 | implicit-field:1 selection of Flash | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:166:19:166:30 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:168:5:168:16 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:168:33:168:40 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:169:3:169:14 | implicit-field:1 selection of Validation | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:174:5:174:12 | implicit-field:1 selection of Params | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:175:3:175:9 | implicit-field:1 selection of Flash | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:176:4:176:10 | booking | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/controllers/hotels.go:184:2:184:8 | implicit-field:1 selection of Flash | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/init.go:36:44:36:44 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/init.go:40:49:40:49 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/init.go:52:2:52:2 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/init.go:52:2:52:11 | implicit-deref selection of Response | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/init.go:53:2:53:2 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/init.go:53:2:53:11 | implicit-deref selection of Response | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/init.go:54:2:54:2 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/init.go:54:2:54:11 | implicit-deref selection of Response | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:33:13:33:19 | booking | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:34:13:34:19 | booking | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:35:13:35:19 | booking | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:36:13:36:19 | booking | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:49:9:49:9 | b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:53:14:53:14 | b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:53:38:53:38 | b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:67:3:67:3 | b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:68:3:68:3 | b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:69:3:69:3 | b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:73:39:73:39 | b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:73:47:73:47 | b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:81:13:81:13 | implicit-deref b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:82:14:82:14 | implicit-deref b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:83:17:83:17 | implicit-deref b | Origin of readStep is missing a PostUpdateNode. | -| examples/booking/app/models/booking.go:84:18:84:18 | implicit-deref b | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Slog/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Slog/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 8242ca2cdb72..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Slog/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| test.go:114:21:114:33 | call to Group | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 3c4f6abe39de..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,4 +0,0 @@ -reverseRead -| CryptoTls.go:66:23:66:27 | implicit-deref state | Origin of readStep is missing a PostUpdateNode. | -| CryptoTls.go:73:23:73:27 | state | Origin of readStep is missing a PostUpdateNode. | -| CryptoTls.go:119:23:119:27 | implicit-deref state | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SystemCommandExecutors/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/SystemCommandExecutors/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 22b7e84f85e2..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SystemCommandExecutors/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| SystemCommandExecutors.go:25:12:25:14 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 716050b1f160..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -reverseRead -| main.go:28:2:28:4 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| main.go:34:2:34:4 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/TaintStep.expected b/go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/TaintStep.expected index 98381fa1ed1c..3c13e016e533 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/TaintStep.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/TaintStep.expected @@ -98,11 +98,15 @@ invalidModelRow | main.go:23:39:23:47 | reEncoded | main.go:23:9:23:48 | slice literal | | main.go:28:2:28:4 | implicit-deref req | main.go:28:2:28:4 | req [postupdate] | | main.go:28:2:28:4 | implicit-deref req | main.go:28:2:28:9 | selection of Body | +| main.go:28:2:28:4 | implicit-deref req [postupdate] | main.go:28:2:28:4 | req [postupdate] | +| main.go:28:2:28:4 | implicit-deref req [postupdate] | main.go:28:2:28:9 | selection of Body | | main.go:28:2:28:4 | req | main.go:28:2:28:4 | implicit-deref req | | main.go:28:2:28:4 | req [postupdate] | main.go:28:2:28:4 | implicit-deref req | | main.go:28:2:28:9 | selection of Body | main.go:28:16:28:16 | b [postupdate] | | main.go:34:2:34:4 | implicit-deref req | main.go:34:2:34:4 | req [postupdate] | | main.go:34:2:34:4 | implicit-deref req | main.go:34:2:34:9 | selection of Body | +| main.go:34:2:34:4 | implicit-deref req [postupdate] | main.go:34:2:34:4 | req [postupdate] | +| main.go:34:2:34:4 | implicit-deref req [postupdate] | main.go:34:2:34:9 | selection of Body | | main.go:34:2:34:4 | req | main.go:34:2:34:4 | implicit-deref req | | main.go:34:2:34:4 | req [postupdate] | main.go:34:2:34:4 | implicit-deref req | | main.go:34:2:34:9 | selection of Body | main.go:34:16:34:16 | b [postupdate] | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Twirp/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/Twirp/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 71165fc94b07..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/Twirp/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,97 +0,0 @@ -reverseRead -| rpc/notes/service.pb.go:36:10:36:46 | file_rpc_notes_service_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:49:9:49:45 | file_rpc_notes_service_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:97:10:97:46 | file_rpc_notes_service_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:110:9:110:45 | file_rpc_notes_service_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:142:10:142:46 | file_rpc_notes_service_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:155:9:155:45 | file_rpc_notes_service_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:182:10:182:46 | file_rpc_notes_service_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:195:9:195:45 | file_rpc_notes_service_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:297:13:297:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:299:13:299:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:301:13:301:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:309:13:309:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:311:13:311:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:313:13:313:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:321:13:321:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:323:13:323:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:325:13:325:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:333:13:333:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:335:13:335:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.pb.go:337:13:337:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:82:40:82:49 | clientOpts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:118:37:118:37 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:118:47:118:52 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:124:24:124:29 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:128:34:128:39 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:164:37:164:37 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:164:47:164:52 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:170:24:170:29 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:174:34:174:39 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:221:40:221:49 | clientOpts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:257:33:257:33 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:257:43:257:48 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:263:24:263:29 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:267:34:267:39 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:303:33:303:33 | implicit-deref c | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:303:43:303:48 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:309:24:309:29 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:313:34:313:39 | selection of opts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:350:45:350:54 | implicit-deref serverOpts | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:360:29:360:29 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:389:38:389:38 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:397:58:397:60 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:402:47:402:49 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:404:48:404:50 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:405:58:405:60 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:409:95:409:97 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:410:58:410:60 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:422:48:422:50 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:423:58:423:60 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:429:12:429:14 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:440:53:440:55 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:441:43:441:45 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:449:36:449:36 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:455:23:455:25 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:477:13:477:13 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:494:41:494:41 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:507:34:507:34 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:524:24:524:24 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:526:24:526:24 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:532:36:532:36 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:538:25:538:27 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:558:13:558:13 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:575:41:575:41 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:588:34:588:34 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:603:24:603:24 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:605:24:605:24 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:609:12:609:14 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:620:53:620:55 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:621:43:621:45 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:629:36:629:36 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:635:23:635:25 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:657:13:657:13 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:674:41:674:41 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:687:34:687:34 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:704:24:704:24 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:706:24:706:24 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:712:36:712:36 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:718:25:718:27 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:738:13:738:13 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:755:41:755:41 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:768:34:768:34 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:783:24:783:24 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:785:24:785:24 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:969:8:969:13 | copied | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:984:2:984:4 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:985:2:985:4 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:986:2:986:4 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:1032:15:1032:18 | implicit-deref resp | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:1037:35:1037:38 | implicit-deref resp | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:1116:66:1116:66 | implicit-deref e | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:1159:98:1159:98 | implicit-deref e | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:1227:21:1227:24 | implicit-deref resp | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:1237:35:1237:38 | implicit-deref resp | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:1278:11:1278:14 | implicit-deref resp | Origin of readStep is missing a PostUpdateNode. | -| rpc/notes/service.twirp.go:1292:23:1292:26 | implicit-deref resp | Origin of readStep is missing a PostUpdateNode. | -| server/main.go:33:19:33:19 | implicit-deref s | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/WebSocket/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/WebSocket/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 980efad53219..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/WebSocket/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| WebSocketReadWrite.go:27:9:27:9 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 5cdc979ed6b1..000000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,12 +0,0 @@ -reverseRead -| test.go:12:12:12:18 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:17:24:17:30 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:20:36:20:42 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:23:33:23:39 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:24:22:24:26 | nodes | Origin of readStep is missing a PostUpdateNode. | -| test.go:26:45:26:51 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:27:22:27:27 | nodes2 | Origin of readStep is missing a PostUpdateNode. | -| test.go:31:33:31:39 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:39:49:39:55 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:43:31:43:37 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| test.go:48:32:48:38 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/RedundantCode/DeadStoreOfLocal/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/RedundantCode/DeadStoreOfLocal/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index fbede1f21200..000000000000 --- a/go/ql/test/query-tests/RedundantCode/DeadStoreOfLocal/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| testdata.go:206:7:206:7 | x | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegexp/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegexp/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 5290b84ea889..000000000000 --- a/go/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegexp/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -reverseRead -| IncompleteHostnameRegexp.go:12:42:12:44 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| IncompleteHostnameRegexpGood2.go:12:42:12:44 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| IncompleteHostnameRegexpGood.go:12:42:12:44 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| main.go:18:57:18:57 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-020/MissingRegexpAnchor/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-020/MissingRegexpAnchor/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 16052a78564a..000000000000 --- a/go/ql/test/query-tests/Security/CWE-020/MissingRegexpAnchor/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -reverseRead -| MissingRegexpAnchor.go:12:42:12:44 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| MissingRegexpAnchorGood.go:12:42:12:44 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-022/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-022/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 9f47590b9448..000000000000 --- a/go/ql/test/query-tests/Security/CWE-022/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -reverseRead -| TaintedPath.go:15:18:15:18 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| TaintedPath.go:84:28:84:32 | files | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-078/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-078/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 4a35d9f88b96..000000000000 --- a/go/ql/test/query-tests/Security/CWE-078/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,11 +0,0 @@ -reverseRead -| ArgumentInjection.go:9:10:9:12 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CommandInjection2.go:13:15:13:17 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CommandInjection2.go:21:15:21:17 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CommandInjection2.go:41:15:41:17 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| CommandInjection.go:9:13:9:15 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| GitSubcommands.go:11:13:11:15 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| GitSubcommands.go:22:13:22:15 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| GitSubcommands.go:33:13:33:15 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| SanitizingDoubleDash.go:9:13:9:15 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| SanitizingDoubleDash.go:92:13:92:15 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-079/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-079/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index ac74617174f9..000000000000 --- a/go/ql/test/query-tests/Security/CWE-079/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,21 +0,0 @@ -reverseRead -| HtmlTemplateEscapingBypassXss.go:99:9:99:9 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| ReflectedXss.go:11:15:11:15 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| ReflectedXssGood.go:15:15:15:15 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| contenttype.go:11:11:11:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| contenttype.go:25:11:25:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| contenttype.go:39:11:39:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| contenttype.go:49:11:49:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| contenttype.go:61:11:61:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| contenttype.go:71:11:71:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| contenttype.go:86:11:86:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| contenttype.go:98:11:98:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| contenttype.go:111:11:111:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| reflectedxsstest.go:15:13:15:13 | r | Origin of readStep is missing a PostUpdateNode. | -| reflectedxsstest.go:21:13:21:13 | r | Origin of readStep is missing a PostUpdateNode. | -| reflectedxsstest.go:51:14:51:14 | r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:14:15:14:15 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:33:15:33:15 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:48:14:48:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:66:15:66:15 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| websocketXss.go:27:9:27:9 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-089/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-089/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 3ec923eb2391..000000000000 --- a/go/ql/test/query-tests/Security/CWE-089/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,23 +0,0 @@ -reverseRead -| SqlInjection.go:11:3:11:5 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| SqlInjection.go:11:3:11:17 | call to Query | Origin of readStep is missing a PostUpdateNode. | -| SqlInjectionGood.go:10:14:10:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| SqlInjectionGood.go:10:14:10:28 | call to Query | Origin of readStep is missing a PostUpdateNode. | -| issue48.go:17:25:17:27 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| issue48.go:21:3:21:21 | RequestDataFromJson | Origin of readStep is missing a PostUpdateNode. | -| issue48.go:27:26:27:28 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| issue48.go:31:3:31:22 | RequestDataFromJson2 | Origin of readStep is missing a PostUpdateNode. | -| issue48.go:37:24:37:26 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| issue48.go:40:3:40:22 | RequestDataFromJson3 | Origin of readStep is missing a PostUpdateNode. | -| main.go:15:63:15:63 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| main.go:15:63:15:75 | call to Query | Origin of readStep is missing a PostUpdateNode. | -| main.go:16:63:16:63 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| main.go:30:13:30:15 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| main.go:34:3:34:13 | implicit-deref RequestData | Origin of readStep is missing a PostUpdateNode. | -| main.go:40:25:40:27 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| main.go:43:3:43:13 | implicit-deref RequestData | Origin of readStep is missing a PostUpdateNode. | -| main.go:49:28:49:30 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| main.go:52:3:52:13 | implicit-deref RequestData | Origin of readStep is missing a PostUpdateNode. | -| main.go:58:28:58:30 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| main.go:61:4:61:15 | star expression | Origin of readStep is missing a PostUpdateNode. | -| main.go:68:18:68:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-117/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-117/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index f519d603e82e..000000000000 --- a/go/ql/test/query-tests/Security/CWE-117/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,11 +0,0 @@ -reverseRead -| LogInjection.go:32:14:32:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| LogInjection.go:33:14:33:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| LogInjection.go:34:18:34:20 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| LogInjection.go:35:14:35:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| LogInjection.go:551:14:551:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| LogInjection.go:559:14:559:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| LogInjection.go:567:14:567:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| LogInjection.go:602:14:602:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| LogInjection.go:603:14:603:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| LogInjection.go:828:12:828:14 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-190/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-190/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 5d9da2284549..000000000000 --- a/go/ql/test/query-tests/Security/CWE-190/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -reverseRead -| array_vs_contents.go:16:25:16:31 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | -| array_vs_contents.go:33:25:33:31 | implicit-deref request | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-312/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-312/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 12cd207a4e09..000000000000 --- a/go/ql/test/query-tests/Security/CWE-312/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,31 +0,0 @@ -reverseRead -| CleartextLogging.go:11:11:11:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| CleartextLogging.go:12:9:12:9 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| CleartextLoggingGood.go:12:11:12:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| CleartextLoggingGood.go:13:9:13:9 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| CleartextLoggingGood.go:25:14:25:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| klog.go:27:13:27:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| klog.go:28:13:28:20 | selection of Header | Origin of readStep is missing a PostUpdateNode. | -| klog.go:29:13:29:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:58:9:58:34 | file_query_proto_enumTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:62:10:62:35 | file_query_proto_enumTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:88:10:88:34 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:101:9:101:33 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:156:10:156:34 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:169:9:169:33 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:204:10:204:34 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:217:9:217:33 | file_query_proto_msgTypes | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:318:13:318:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:320:13:320:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:322:13:322:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:330:13:330:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:332:13:332:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:334:13:334:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:342:13:342:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:344:13:344:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| protos/query/query.pb.go:346:13:346:13 | implicit-deref v | Origin of readStep is missing a PostUpdateNode. | -| server1.go:11:11:11:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| server1.go:13:11:13:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| server1.go:14:11:14:14 | vals | Origin of readStep is missing a PostUpdateNode. | -| server1.go:17:41:17:41 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| server1.go:21:46:21:46 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-327/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-327/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 256f53d2e623..000000000000 --- a/go/ql/test/query-tests/Security/CWE-327/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,4 +0,0 @@ -reverseRead -| UnsafeTLS.go:329:32:329:37 | implicit-deref config | Origin of readStep is missing a PostUpdateNode. | -| UnsafeTLS.go:336:33:336:38 | implicit-deref config | Origin of readStep is missing a PostUpdateNode. | -| UnsafeTLS.go:353:40:353:45 | suites | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-347/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-347/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index d5809621a06e..000000000000 --- a/go/ql/test/query-tests/Security/CWE-347/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -reverseRead -| go-jose.v3.go:19:17:19:17 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| go-jose.v3.go:25:16:25:16 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| golang-jwt-v5.go:22:17:22:17 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| golang-jwt-v5.go:28:16:28:16 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 9068ee79a7d5..000000000000 --- a/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -reverseRead -| cves.go:33:14:33:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | -| cves.go:41:14:41:16 | implicit-deref req | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index fda76dcac5af..000000000000 --- a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,26 +0,0 @@ -reverseRead -| OpenUrlRedirect.go:10:23:10:23 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| OpenUrlRedirectGood.go:12:16:12:16 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:13:13:13:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:22:13:22:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:33:13:33:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:48:13:48:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:56:13:56:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:68:13:68:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:77:13:77:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:85:13:85:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:93:13:93:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:102:13:102:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:115:6:115:6 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:117:24:117:24 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:126:13:126:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:138:13:138:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:150:13:150:13 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:163:11:163:11 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:176:6:176:6 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:177:35:177:35 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:220:3:220:3 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:226:23:226:23 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:227:23:227:23 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:228:23:228:23 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| stdlib.go:232:23:232:33 | call to Cookies | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected b/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected index 09c6cb5157f1..ac9eebb490cf 100644 --- a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected +++ b/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected @@ -32,7 +32,16 @@ edges | stdlib.go:93:13:93:32 | call to Get | stdlib.go:94:3:94:8 | target | provenance | | | stdlib.go:94:3:94:8 | target | stdlib.go:94:3:94:25 | ... += ... | provenance | Config | | stdlib.go:94:3:94:25 | ... += ... | stdlib.go:96:23:96:28 | target | provenance | Sink:MaD:1 | +| stdlib.go:115:6:115:6 | implicit-deref r [postupdate] [URL] | stdlib.go:115:6:115:6 | r [postupdate] [pointer, URL] | provenance | | +| stdlib.go:115:6:115:6 | r [postupdate] [pointer, URL] | stdlib.go:116:4:116:4 | r [pointer, URL] | provenance | | +| stdlib.go:115:6:115:10 | implicit-deref selection of URL | stdlib.go:115:6:115:10 | selection of URL [postupdate] | provenance | Config | +| stdlib.go:115:6:115:10 | selection of URL | stdlib.go:115:6:115:10 | implicit-deref selection of URL | provenance | Src:MaD:4 Config | +| stdlib.go:115:6:115:10 | selection of URL [postupdate] | stdlib.go:115:6:115:6 | implicit-deref r [postupdate] [URL] | provenance | | +| stdlib.go:115:6:115:10 | selection of URL [postupdate] | stdlib.go:115:6:115:10 | implicit-deref selection of URL | provenance | Config | +| stdlib.go:116:4:116:4 | implicit-deref r [URL] | stdlib.go:116:4:116:8 | selection of URL | provenance | | | stdlib.go:116:4:116:4 | implicit-deref r [postupdate] [URL] | stdlib.go:116:4:116:4 | r [postupdate] [pointer, URL] | provenance | | +| stdlib.go:116:4:116:4 | r [pointer, URL] | stdlib.go:116:4:116:4 | implicit-deref r [URL] | provenance | | +| stdlib.go:116:4:116:4 | r [pointer, URL] | stdlib.go:117:24:117:24 | r [pointer, URL] | provenance | | | stdlib.go:116:4:116:4 | r [postupdate] [pointer, URL] | stdlib.go:117:24:117:24 | r [pointer, URL] | provenance | | | stdlib.go:116:4:116:8 | implicit-deref selection of URL | stdlib.go:116:4:116:8 | selection of URL [postupdate] | provenance | Config | | stdlib.go:116:4:116:8 | selection of URL | stdlib.go:116:4:116:8 | implicit-deref selection of URL | provenance | Src:MaD:4 Config | @@ -48,6 +57,14 @@ edges | stdlib.go:163:11:163:15 | selection of URL | stdlib.go:163:10:163:15 | star expression | provenance | Src:MaD:4 Config | | stdlib.go:163:11:163:15 | selection of URL [postupdate] | stdlib.go:163:10:163:15 | star expression | provenance | Config | | stdlib.go:166:24:166:26 | url | stdlib.go:166:24:166:35 | call to String | provenance | Config Sink:MaD:1 | +| stdlib.go:176:6:176:6 | implicit-deref r [postupdate] [URL] | stdlib.go:176:6:176:6 | r [postupdate] [pointer, URL] | provenance | | +| stdlib.go:176:6:176:6 | r [postupdate] [pointer, URL] | stdlib.go:177:35:177:35 | r [pointer, URL] | provenance | | +| stdlib.go:176:6:176:10 | implicit-deref selection of URL | stdlib.go:176:6:176:10 | selection of URL [postupdate] | provenance | Config | +| stdlib.go:176:6:176:10 | selection of URL | stdlib.go:176:6:176:10 | implicit-deref selection of URL | provenance | Src:MaD:4 Config | +| stdlib.go:176:6:176:10 | selection of URL [postupdate] | stdlib.go:176:6:176:6 | implicit-deref r [postupdate] [URL] | provenance | | +| stdlib.go:176:6:176:10 | selection of URL [postupdate] | stdlib.go:176:6:176:10 | implicit-deref selection of URL | provenance | Config | +| stdlib.go:177:35:177:35 | implicit-deref r [URL] | stdlib.go:177:35:177:39 | selection of URL | provenance | | +| stdlib.go:177:35:177:35 | r [pointer, URL] | stdlib.go:177:35:177:35 | implicit-deref r [URL] | provenance | | | stdlib.go:177:35:177:39 | selection of URL | stdlib.go:177:35:177:52 | call to RequestURI | provenance | Src:MaD:4 Config | | stdlib.go:177:35:177:52 | call to RequestURI | stdlib.go:177:24:177:52 | ...+... | provenance | Config Sink:MaD:1 | | stdlib.go:186:13:186:33 | call to FormValue | stdlib.go:188:23:188:28 | target | provenance | Src:MaD:3 Sink:MaD:1 | @@ -120,7 +137,14 @@ nodes | stdlib.go:94:3:94:8 | target | semmle.label | target | | stdlib.go:94:3:94:25 | ... += ... | semmle.label | ... += ... | | stdlib.go:96:23:96:28 | target | semmle.label | target | +| stdlib.go:115:6:115:6 | implicit-deref r [postupdate] [URL] | semmle.label | implicit-deref r [postupdate] [URL] | +| stdlib.go:115:6:115:6 | r [postupdate] [pointer, URL] | semmle.label | r [postupdate] [pointer, URL] | +| stdlib.go:115:6:115:10 | implicit-deref selection of URL | semmle.label | implicit-deref selection of URL | +| stdlib.go:115:6:115:10 | selection of URL | semmle.label | selection of URL | +| stdlib.go:115:6:115:10 | selection of URL [postupdate] | semmle.label | selection of URL [postupdate] | +| stdlib.go:116:4:116:4 | implicit-deref r [URL] | semmle.label | implicit-deref r [URL] | | stdlib.go:116:4:116:4 | implicit-deref r [postupdate] [URL] | semmle.label | implicit-deref r [postupdate] [URL] | +| stdlib.go:116:4:116:4 | r [pointer, URL] | semmle.label | r [pointer, URL] | | stdlib.go:116:4:116:4 | r [postupdate] [pointer, URL] | semmle.label | r [postupdate] [pointer, URL] | | stdlib.go:116:4:116:8 | implicit-deref selection of URL | semmle.label | implicit-deref selection of URL | | stdlib.go:116:4:116:8 | selection of URL | semmle.label | selection of URL | @@ -137,7 +161,14 @@ nodes | stdlib.go:163:11:163:15 | selection of URL [postupdate] | semmle.label | selection of URL [postupdate] | | stdlib.go:166:24:166:26 | url | semmle.label | url | | stdlib.go:166:24:166:35 | call to String | semmle.label | call to String | +| stdlib.go:176:6:176:6 | implicit-deref r [postupdate] [URL] | semmle.label | implicit-deref r [postupdate] [URL] | +| stdlib.go:176:6:176:6 | r [postupdate] [pointer, URL] | semmle.label | r [postupdate] [pointer, URL] | +| stdlib.go:176:6:176:10 | implicit-deref selection of URL | semmle.label | implicit-deref selection of URL | +| stdlib.go:176:6:176:10 | selection of URL | semmle.label | selection of URL | +| stdlib.go:176:6:176:10 | selection of URL [postupdate] | semmle.label | selection of URL [postupdate] | | stdlib.go:177:24:177:52 | ...+... | semmle.label | ...+... | +| stdlib.go:177:35:177:35 | implicit-deref r [URL] | semmle.label | implicit-deref r [URL] | +| stdlib.go:177:35:177:35 | r [pointer, URL] | semmle.label | r [pointer, URL] | | stdlib.go:177:35:177:39 | selection of URL | semmle.label | selection of URL | | stdlib.go:177:35:177:52 | call to RequestURI | semmle.label | call to RequestURI | | stdlib.go:186:13:186:33 | call to FormValue | semmle.label | call to FormValue | diff --git a/go/ql/test/query-tests/Security/CWE-640/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-640/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index e2b722b16382..000000000000 --- a/go/ql/test/query-tests/Security/CWE-640/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -reverseRead -| EmailBad.go:9:10:9:10 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-643/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-643/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 7df0be09a4b8..000000000000 --- a/go/ql/test/query-tests/Security/CWE-643/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,13 +0,0 @@ -reverseRead -| XPathInjection.go:13:14:13:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:35:14:35:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:46:14:46:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:57:14:57:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:72:14:72:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:83:14:83:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:92:14:92:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:93:14:93:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:106:14:106:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:115:14:115:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:116:14:116:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| tst.go:139:14:139:14 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-770/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-770/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index bea886c155e3..000000000000 --- a/go/ql/test/query-tests/Security/CWE-770/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,6 +0,0 @@ -reverseRead -| UncontrolledAllocationSizeBad.go:11:12:11:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| UncontrolledAllocationSizeGood.go:11:12:11:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| UncontrolledAllocationSizeGood.go:32:12:32:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| UncontrolledAllocationSizeGood.go:52:12:52:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| UncontrolledAllocationSizeGood.go:73:12:73:12 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | diff --git a/go/ql/test/query-tests/Security/CWE-918/CONSISTENCY/DataFlowConsistency.expected b/go/ql/test/query-tests/Security/CWE-918/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index 53fc71eeb543..000000000000 --- a/go/ql/test/query-tests/Security/CWE-918/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -reverseRead -| websocket.go:110:31:110:31 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| websocket.go:120:32:120:32 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| websocket.go:129:54:129:54 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | -| websocket.go:139:55:139:55 | implicit-deref r | Origin of readStep is missing a PostUpdateNode. | From 6d585f9463071eb81b91c8b2da3d53e57cfda4ba Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 1 Dec 2026 11:18:31 +0000 Subject: [PATCH 4/5] Go: Remove post-update nodes for read-only dereferences Stop creating post-update nodes merely because a value is dereferenced. The read-chain propagation added in the preceding commit retains the nodes needed for writes and calls, including the explicit double-dereference write covered by the first commit's regression test. This prevents a callee's local pointer reassignment from spuriously flowing back to its caller through a read-only dereference. Remove the SPURIOUS expectations and update the affected node and path snapshots separately from the propagation change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../2026-11-25-post-update-nodes.md | 2 +- .../go/dataflow/internal/DataFlowNodes.qll | 5 +-- .../example-tests/snippets/typeinfo.expected | 1 - .../go/dataflow/PostUpdateNodes/flows.go | 4 +- .../go/dataflow/PostUpdateNodes/test.expected | 4 -- .../PromotedFields/LocalFlowStep.expected | 6 --- .../go/frameworks/Echo/OpenRedirect.expected | 3 -- .../frameworks/Twirp/RequestForgery.expected | 7 ---- .../OpenUrlRedirect/OpenUrlRedirect.expected | 42 ------------------- 9 files changed, 4 insertions(+), 70 deletions(-) diff --git a/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md b/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md index ab4e515d96fe..1482ae772031 100644 --- a/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md +++ b/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md @@ -1,4 +1,4 @@ --- category: minorAnalysis --- -* Improved `DataFlow::PostUpdateNode` generation so post-update nodes propagate along the full chain of field reads, index reads, pointer dereferences, and channel receives when a nested value may be mutated. +* Improved `DataFlow::PostUpdateNode` generation so post-update nodes propagate along the full chain of field reads, index reads, pointer dereferences, and channel receives when a nested value may be mutated, and are no longer generated on read-only pointer dereferences. diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll index 579b486b5eed..b21739f9f98c 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll @@ -868,10 +868,7 @@ module Public { private predicate insnDirectlyHasPostUpdateNode(IR::Instruction insn) { exists(Expr e | insn = IR::evalExprInstruction(e.stripParens()) | e instanceof AddressExpr or - e = any(AddressExpr ae).getOperand() or - e = any(StarExpr ae).getBase() or - e = any(DerefExpr ae).getOperand() or - e = any(IR::EvalImplicitDerefInstruction eidi).getOperand() + e = any(AddressExpr ae).getOperand() ) or ( diff --git a/go/ql/test/example-tests/snippets/typeinfo.expected b/go/ql/test/example-tests/snippets/typeinfo.expected index c4faf6d092da..2ae585b5a952 100644 --- a/go/ql/test/example-tests/snippets/typeinfo.expected +++ b/go/ql/test/example-tests/snippets/typeinfo.expected @@ -5,4 +5,3 @@ | main.go:18:12:18:14 | SSA param(req) | | main.go:18:12:18:14 | req | | main.go:20:5:20:7 | req | -| main.go:20:5:20:7 | req [postupdate] | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go index 0f35ac578301..bd3db0c82360 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/flows.go @@ -93,8 +93,8 @@ func calleeReadsOnly(p *inner) { func testNoBackflowFromReadOnlyDeref() { clean := &inner{val: "safe"} calleeReadsOnly(clean) - sink(clean) // $ SPURIOUS: hasTaintFlow="clean" - sink(clean.val) // $ SPURIOUS: hasTaintFlow="selection of val" + sink(clean) + sink(clean.val) } func testWriteThroughExplicitDereferences(p **inner) { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected index 234d136472a5..1ae48fb09b08 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected @@ -26,10 +26,6 @@ | test.go:36:5:36:5 | a | test.go:36:5:36:5 | a [postupdate] | | test.go:40:2:40:2 | c | test.go:40:2:40:2 | c [postupdate] | | test.go:40:2:40:2 | implicit-deref c | test.go:40:2:40:2 | implicit-deref c [postupdate] | -| test.go:47:6:47:6 | a | test.go:47:6:47:6 | a [postupdate] | -| test.go:47:6:47:11 | implicit-deref selection of bptr | test.go:47:6:47:11 | implicit-deref selection of bptr [postupdate] | -| test.go:47:6:47:11 | selection of bptr | test.go:47:6:47:11 | selection of bptr [postupdate] | -| test.go:47:6:47:16 | selection of cptr | test.go:47:6:47:16 | selection of cptr [postupdate] | | test.go:50:2:50:2 | a | test.go:50:2:50:2 | a [postupdate] | | test.go:50:2:50:7 | implicit-deref selection of bptr | test.go:50:2:50:7 | implicit-deref selection of bptr [postupdate] | | test.go:50:2:50:7 | selection of bptr | test.go:50:2:50:7 | selection of bptr [postupdate] | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/LocalFlowStep.expected b/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/LocalFlowStep.expected index 028563bab881..768eb58c5715 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/LocalFlowStep.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/LocalFlowStep.expected @@ -6,11 +6,8 @@ | main.go:30:2:32:2 | SSA def(outerp) | main.go:33:7:33:12 | outerp | | main.go:30:12:32:2 | &... | main.go:30:2:32:2 | SSA def(outerp) | | main.go:33:7:33:12 | outerp | main.go:34:7:34:12 | outerp | -| main.go:33:7:33:12 | outerp [postupdate] | main.go:34:7:34:12 | outerp | | main.go:34:7:34:12 | outerp | main.go:35:7:35:12 | outerp | -| main.go:34:7:34:12 | outerp [postupdate] | main.go:35:7:35:12 | outerp | | main.go:35:7:35:12 | outerp | main.go:36:7:36:12 | outerp | -| main.go:35:7:35:12 | outerp [postupdate] | main.go:36:7:36:12 | outerp | | main.go:40:2:40:40 | SSA def(outer) | main.go:41:7:41:11 | outer | | main.go:40:11:40:40 | struct literal | main.go:40:2:40:40 | SSA def(outer) | | main.go:41:7:41:11 | outer | main.go:42:7:42:11 | outer | @@ -19,11 +16,8 @@ | main.go:46:2:46:42 | SSA def(outerp) | main.go:47:7:47:12 | outerp | | main.go:46:12:46:42 | &... | main.go:46:2:46:42 | SSA def(outerp) | | main.go:47:7:47:12 | outerp | main.go:48:7:48:12 | outerp | -| main.go:47:7:47:12 | outerp [postupdate] | main.go:48:7:48:12 | outerp | | main.go:48:7:48:12 | outerp | main.go:49:7:49:12 | outerp | -| main.go:48:7:48:12 | outerp [postupdate] | main.go:49:7:49:12 | outerp | | main.go:49:7:49:12 | outerp | main.go:50:7:50:12 | outerp | -| main.go:49:7:49:12 | outerp [postupdate] | main.go:50:7:50:12 | outerp | | main.go:54:2:54:25 | SSA def(inner) | main.go:55:19:55:23 | inner | | main.go:54:11:54:25 | struct literal | main.go:54:2:54:25 | SSA def(inner) | | main.go:55:2:55:24 | SSA def(middle) | main.go:56:17:56:22 | middle | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Echo/OpenRedirect.expected b/go/ql/test/library-tests/semmle/go/frameworks/Echo/OpenRedirect.expected index 0fa6b12603a4..5ec2cc17baad 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Echo/OpenRedirect.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/Echo/OpenRedirect.expected @@ -5,10 +5,8 @@ edges | test.go:172:11:172:32 | call to Param | test.go:173:20:173:24 | param | provenance | Src:MaD:2 Sink:MaD:1 | | test.go:178:11:178:32 | call to Param | test.go:185:24:185:29 | param2 | provenance | Src:MaD:2 | | test.go:185:24:185:29 | param2 | test.go:185:20:185:29 | ...+... | provenance | Config Sink:MaD:1 | -| test.go:193:9:193:26 | star expression | test.go:193:10:193:26 | selection of URL [postupdate] | provenance | Config | | test.go:193:9:193:26 | star expression | test.go:196:21:196:23 | url | provenance | | | test.go:193:10:193:26 | selection of URL | test.go:193:9:193:26 | star expression | provenance | Src:MaD:3 Config | -| test.go:193:10:193:26 | selection of URL [postupdate] | test.go:193:9:193:26 | star expression | provenance | Config | | test.go:196:21:196:23 | url | test.go:196:21:196:32 | call to String | provenance | Config Sink:MaD:1 | models | 1 | Sink: github.com/labstack/echo; Context; true; Redirect; ; ; Argument[1]; url-redirection; manual | @@ -22,7 +20,6 @@ nodes | test.go:185:24:185:29 | param2 | semmle.label | param2 | | test.go:193:9:193:26 | star expression | semmle.label | star expression | | test.go:193:10:193:26 | selection of URL | semmle.label | selection of URL | -| test.go:193:10:193:26 | selection of URL [postupdate] | semmle.label | selection of URL [postupdate] | | test.go:196:21:196:23 | url | semmle.label | url | | test.go:196:21:196:32 | call to String | semmle.label | call to String | subpaths diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.expected b/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.expected index 922e92e56860..2f57254847eb 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.expected @@ -2,25 +2,19 @@ | server/main.go:30:38:30:48 | selection of Text | rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | server/main.go:30:38:30:48 | selection of Text | The $@ of this request depends on a $@. | server/main.go:30:38:30:48 | selection of Text | URL | rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | user-provided value | | server/main.go:30:38:30:48 | selection of Text | server/main.go:19:56:19:61 | SSA param(params) | server/main.go:30:38:30:48 | selection of Text | The $@ of this request depends on a $@. | server/main.go:30:38:30:48 | selection of Text | URL | server/main.go:19:56:19:61 | SSA param(params) | user-provided value | edges -| client/main.go:16:35:16:78 | &... | server/main.go:19:56:19:61 | SSA param(params) | provenance | | -| client/main.go:16:35:16:78 | &... [postupdate] | client/main.go:16:35:16:78 | &... | provenance | | | rpc/notes/service.twirp.go:538:2:538:33 | extract:0 ... := ... | rpc/notes/service.twirp.go:544:27:544:29 | buf | provenance | | | rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | rpc/notes/service.twirp.go:538:2:538:33 | extract:0 ... := ... | provenance | Src:MaD:1 MaD:3 | | rpc/notes/service.twirp.go:544:27:544:29 | buf | rpc/notes/service.twirp.go:544:32:544:41 | reqContent [postupdate] | provenance | MaD:2 | | rpc/notes/service.twirp.go:544:32:544:41 | reqContent [postupdate] | rpc/notes/service.twirp.go:574:2:577:2 | SSA implicit def(reqContent) | provenance | | | rpc/notes/service.twirp.go:574:2:577:2 | SSA implicit def(reqContent) | rpc/notes/service.twirp.go:576:35:576:44 | reqContent | provenance | | | rpc/notes/service.twirp.go:576:35:576:44 | reqContent | server/main.go:19:56:19:61 | SSA param(params) | provenance | | -| server/main.go:19:56:19:61 | SSA param(params) | server/main.go:19:56:19:61 | SSA param(params) [Return] | provenance | | | server/main.go:19:56:19:61 | SSA param(params) | server/main.go:30:38:30:48 | selection of Text | provenance | | | server/main.go:19:56:19:61 | SSA param(params) | server/main.go:30:38:30:48 | selection of Text | provenance | | -| server/main.go:19:56:19:61 | SSA param(params) [Return] | client/main.go:16:35:16:78 | &... [postupdate] | provenance | | models | 1 | Source: net/http; Request; true; Body; ; ; ; remote; manual | | 2 | Summary: google.golang.org/protobuf/proto; ; false; Unmarshal; ; ; Argument[0]; Argument[1]; taint; manual | | 3 | Summary: io; ; false; ReadAll; ; ; Argument[0]; ReturnValue[0]; taint; manual | nodes -| client/main.go:16:35:16:78 | &... | semmle.label | &... | -| client/main.go:16:35:16:78 | &... [postupdate] | semmle.label | &... [postupdate] | | rpc/notes/service.twirp.go:538:2:538:33 | extract:0 ... := ... | semmle.label | extract:0 ... := ... | | rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | semmle.label | selection of Body | | rpc/notes/service.twirp.go:544:27:544:29 | buf | semmle.label | buf | @@ -29,6 +23,5 @@ nodes | rpc/notes/service.twirp.go:576:35:576:44 | reqContent | semmle.label | reqContent | | server/main.go:19:56:19:61 | SSA param(params) | semmle.label | SSA param(params) | | server/main.go:19:56:19:61 | SSA param(params) | semmle.label | SSA param(params) | -| server/main.go:19:56:19:61 | SSA param(params) [Return] | semmle.label | SSA param(params) [Return] | | server/main.go:30:38:30:48 | selection of Text | semmle.label | selection of Text | subpaths diff --git a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected b/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected index ac9eebb490cf..10bf5207a8e5 100644 --- a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected +++ b/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected @@ -32,16 +32,7 @@ edges | stdlib.go:93:13:93:32 | call to Get | stdlib.go:94:3:94:8 | target | provenance | | | stdlib.go:94:3:94:8 | target | stdlib.go:94:3:94:25 | ... += ... | provenance | Config | | stdlib.go:94:3:94:25 | ... += ... | stdlib.go:96:23:96:28 | target | provenance | Sink:MaD:1 | -| stdlib.go:115:6:115:6 | implicit-deref r [postupdate] [URL] | stdlib.go:115:6:115:6 | r [postupdate] [pointer, URL] | provenance | | -| stdlib.go:115:6:115:6 | r [postupdate] [pointer, URL] | stdlib.go:116:4:116:4 | r [pointer, URL] | provenance | | -| stdlib.go:115:6:115:10 | implicit-deref selection of URL | stdlib.go:115:6:115:10 | selection of URL [postupdate] | provenance | Config | -| stdlib.go:115:6:115:10 | selection of URL | stdlib.go:115:6:115:10 | implicit-deref selection of URL | provenance | Src:MaD:4 Config | -| stdlib.go:115:6:115:10 | selection of URL [postupdate] | stdlib.go:115:6:115:6 | implicit-deref r [postupdate] [URL] | provenance | | -| stdlib.go:115:6:115:10 | selection of URL [postupdate] | stdlib.go:115:6:115:10 | implicit-deref selection of URL | provenance | Config | -| stdlib.go:116:4:116:4 | implicit-deref r [URL] | stdlib.go:116:4:116:8 | selection of URL | provenance | | | stdlib.go:116:4:116:4 | implicit-deref r [postupdate] [URL] | stdlib.go:116:4:116:4 | r [postupdate] [pointer, URL] | provenance | | -| stdlib.go:116:4:116:4 | r [pointer, URL] | stdlib.go:116:4:116:4 | implicit-deref r [URL] | provenance | | -| stdlib.go:116:4:116:4 | r [pointer, URL] | stdlib.go:117:24:117:24 | r [pointer, URL] | provenance | | | stdlib.go:116:4:116:4 | r [postupdate] [pointer, URL] | stdlib.go:117:24:117:24 | r [pointer, URL] | provenance | | | stdlib.go:116:4:116:8 | implicit-deref selection of URL | stdlib.go:116:4:116:8 | selection of URL [postupdate] | provenance | Config | | stdlib.go:116:4:116:8 | selection of URL | stdlib.go:116:4:116:8 | implicit-deref selection of URL | provenance | Src:MaD:4 Config | @@ -52,31 +43,18 @@ edges | stdlib.go:117:24:117:28 | selection of URL | stdlib.go:117:24:117:37 | call to String | provenance | Src:MaD:4 Config Sink:MaD:1 | | stdlib.go:150:13:150:18 | selection of Form | stdlib.go:150:13:150:32 | call to Get | provenance | Src:MaD:2 Config | | stdlib.go:150:13:150:32 | call to Get | stdlib.go:156:23:156:28 | target | provenance | Sink:MaD:1 | -| stdlib.go:163:10:163:15 | star expression | stdlib.go:163:11:163:15 | selection of URL [postupdate] | provenance | Config | | stdlib.go:163:10:163:15 | star expression | stdlib.go:166:24:166:26 | url | provenance | | | stdlib.go:163:11:163:15 | selection of URL | stdlib.go:163:10:163:15 | star expression | provenance | Src:MaD:4 Config | -| stdlib.go:163:11:163:15 | selection of URL [postupdate] | stdlib.go:163:10:163:15 | star expression | provenance | Config | | stdlib.go:166:24:166:26 | url | stdlib.go:166:24:166:35 | call to String | provenance | Config Sink:MaD:1 | -| stdlib.go:176:6:176:6 | implicit-deref r [postupdate] [URL] | stdlib.go:176:6:176:6 | r [postupdate] [pointer, URL] | provenance | | -| stdlib.go:176:6:176:6 | r [postupdate] [pointer, URL] | stdlib.go:177:35:177:35 | r [pointer, URL] | provenance | | -| stdlib.go:176:6:176:10 | implicit-deref selection of URL | stdlib.go:176:6:176:10 | selection of URL [postupdate] | provenance | Config | -| stdlib.go:176:6:176:10 | selection of URL | stdlib.go:176:6:176:10 | implicit-deref selection of URL | provenance | Src:MaD:4 Config | -| stdlib.go:176:6:176:10 | selection of URL [postupdate] | stdlib.go:176:6:176:6 | implicit-deref r [postupdate] [URL] | provenance | | -| stdlib.go:176:6:176:10 | selection of URL [postupdate] | stdlib.go:176:6:176:10 | implicit-deref selection of URL | provenance | Config | -| stdlib.go:177:35:177:35 | implicit-deref r [URL] | stdlib.go:177:35:177:39 | selection of URL | provenance | | -| stdlib.go:177:35:177:35 | r [pointer, URL] | stdlib.go:177:35:177:35 | implicit-deref r [URL] | provenance | | | stdlib.go:177:35:177:39 | selection of URL | stdlib.go:177:35:177:52 | call to RequestURI | provenance | Src:MaD:4 Config | | stdlib.go:177:35:177:52 | call to RequestURI | stdlib.go:177:24:177:52 | ...+... | provenance | Config Sink:MaD:1 | | stdlib.go:186:13:186:33 | call to FormValue | stdlib.go:188:23:188:28 | target | provenance | Src:MaD:3 Sink:MaD:1 | | stdlib.go:194:3:194:57 | extract:0 ... := ... | stdlib.go:196:23:196:28 | target | provenance | | | stdlib.go:194:36:194:56 | call to FormValue | stdlib.go:194:3:194:57 | extract:0 ... := ... | provenance | Src:MaD:3 Config | -| stdlib.go:196:23:196:28 | implicit-deref target | stdlib.go:196:23:196:28 | target [postupdate] | provenance | Config | | stdlib.go:196:23:196:28 | implicit-deref target | stdlib.go:196:23:196:33 | selection of Path | provenance | Config Sink:MaD:1 | | stdlib.go:196:23:196:28 | target | stdlib.go:196:23:196:28 | implicit-deref target | provenance | Config | | stdlib.go:196:23:196:28 | target | stdlib.go:196:23:196:33 | selection of Path | provenance | Config Sink:MaD:1 | | stdlib.go:196:23:196:28 | target | stdlib.go:198:23:198:28 | target | provenance | | -| stdlib.go:196:23:196:28 | target [postupdate] | stdlib.go:196:23:196:28 | implicit-deref target | provenance | Config | -| stdlib.go:196:23:196:28 | target [postupdate] | stdlib.go:198:23:198:28 | target | provenance | | | stdlib.go:198:23:198:28 | target | stdlib.go:198:23:198:42 | call to EscapedPath | provenance | Config Sink:MaD:1 | | stdlib.go:210:3:210:3 | implicit-deref u [postupdate] | stdlib.go:210:3:210:3 | u [postupdate] | provenance | Config | | stdlib.go:210:3:210:3 | implicit-deref u [postupdate] | stdlib.go:210:3:210:3 | u [postupdate] [pointer] | provenance | | @@ -84,14 +62,11 @@ edges | stdlib.go:210:3:210:3 | u [postupdate] [pointer] | stdlib.go:212:23:212:23 | u [pointer] | provenance | | | stdlib.go:210:12:210:30 | call to FormValue | stdlib.go:210:3:210:3 | implicit-deref u [postupdate] | provenance | Src:MaD:3 Config | | stdlib.go:210:12:210:30 | call to FormValue | stdlib.go:210:3:210:3 | u [postupdate] | provenance | Src:MaD:3 Config | -| stdlib.go:212:23:212:23 | implicit-deref u | stdlib.go:212:23:212:23 | u [postupdate] | provenance | Config | | stdlib.go:212:23:212:23 | implicit-deref u | stdlib.go:212:23:212:28 | selection of Path | provenance | Config Sink:MaD:1 | | stdlib.go:212:23:212:23 | u | stdlib.go:212:23:212:23 | implicit-deref u | provenance | Config | | stdlib.go:212:23:212:23 | u | stdlib.go:212:23:212:28 | selection of Path | provenance | Config Sink:MaD:1 | | stdlib.go:212:23:212:23 | u | stdlib.go:214:23:214:23 | u | provenance | | | stdlib.go:212:23:212:23 | u [pointer] | stdlib.go:212:23:212:23 | implicit-deref u | provenance | | -| stdlib.go:212:23:212:23 | u [postupdate] | stdlib.go:212:23:212:23 | implicit-deref u | provenance | Config | -| stdlib.go:212:23:212:23 | u [postupdate] | stdlib.go:214:23:214:23 | u | provenance | | | stdlib.go:214:23:214:23 | u | stdlib.go:214:23:214:32 | call to String | provenance | Config Sink:MaD:1 | | stdlib.go:257:3:257:3 | implicit-deref u [postupdate] | stdlib.go:257:3:257:3 | u [postupdate] | provenance | Config | | stdlib.go:257:3:257:3 | implicit-deref u [postupdate] | stdlib.go:257:3:257:3 | u [postupdate] [pointer] | provenance | | @@ -137,14 +112,7 @@ nodes | stdlib.go:94:3:94:8 | target | semmle.label | target | | stdlib.go:94:3:94:25 | ... += ... | semmle.label | ... += ... | | stdlib.go:96:23:96:28 | target | semmle.label | target | -| stdlib.go:115:6:115:6 | implicit-deref r [postupdate] [URL] | semmle.label | implicit-deref r [postupdate] [URL] | -| stdlib.go:115:6:115:6 | r [postupdate] [pointer, URL] | semmle.label | r [postupdate] [pointer, URL] | -| stdlib.go:115:6:115:10 | implicit-deref selection of URL | semmle.label | implicit-deref selection of URL | -| stdlib.go:115:6:115:10 | selection of URL | semmle.label | selection of URL | -| stdlib.go:115:6:115:10 | selection of URL [postupdate] | semmle.label | selection of URL [postupdate] | -| stdlib.go:116:4:116:4 | implicit-deref r [URL] | semmle.label | implicit-deref r [URL] | | stdlib.go:116:4:116:4 | implicit-deref r [postupdate] [URL] | semmle.label | implicit-deref r [postupdate] [URL] | -| stdlib.go:116:4:116:4 | r [pointer, URL] | semmle.label | r [pointer, URL] | | stdlib.go:116:4:116:4 | r [postupdate] [pointer, URL] | semmle.label | r [postupdate] [pointer, URL] | | stdlib.go:116:4:116:8 | implicit-deref selection of URL | semmle.label | implicit-deref selection of URL | | stdlib.go:116:4:116:8 | selection of URL | semmle.label | selection of URL | @@ -158,17 +126,9 @@ nodes | stdlib.go:156:23:156:28 | target | semmle.label | target | | stdlib.go:163:10:163:15 | star expression | semmle.label | star expression | | stdlib.go:163:11:163:15 | selection of URL | semmle.label | selection of URL | -| stdlib.go:163:11:163:15 | selection of URL [postupdate] | semmle.label | selection of URL [postupdate] | | stdlib.go:166:24:166:26 | url | semmle.label | url | | stdlib.go:166:24:166:35 | call to String | semmle.label | call to String | -| stdlib.go:176:6:176:6 | implicit-deref r [postupdate] [URL] | semmle.label | implicit-deref r [postupdate] [URL] | -| stdlib.go:176:6:176:6 | r [postupdate] [pointer, URL] | semmle.label | r [postupdate] [pointer, URL] | -| stdlib.go:176:6:176:10 | implicit-deref selection of URL | semmle.label | implicit-deref selection of URL | -| stdlib.go:176:6:176:10 | selection of URL | semmle.label | selection of URL | -| stdlib.go:176:6:176:10 | selection of URL [postupdate] | semmle.label | selection of URL [postupdate] | | stdlib.go:177:24:177:52 | ...+... | semmle.label | ...+... | -| stdlib.go:177:35:177:35 | implicit-deref r [URL] | semmle.label | implicit-deref r [URL] | -| stdlib.go:177:35:177:35 | r [pointer, URL] | semmle.label | r [pointer, URL] | | stdlib.go:177:35:177:39 | selection of URL | semmle.label | selection of URL | | stdlib.go:177:35:177:52 | call to RequestURI | semmle.label | call to RequestURI | | stdlib.go:186:13:186:33 | call to FormValue | semmle.label | call to FormValue | @@ -177,7 +137,6 @@ nodes | stdlib.go:194:36:194:56 | call to FormValue | semmle.label | call to FormValue | | stdlib.go:196:23:196:28 | implicit-deref target | semmle.label | implicit-deref target | | stdlib.go:196:23:196:28 | target | semmle.label | target | -| stdlib.go:196:23:196:28 | target [postupdate] | semmle.label | target [postupdate] | | stdlib.go:196:23:196:33 | selection of Path | semmle.label | selection of Path | | stdlib.go:198:23:198:28 | target | semmle.label | target | | stdlib.go:198:23:198:42 | call to EscapedPath | semmle.label | call to EscapedPath | @@ -188,7 +147,6 @@ nodes | stdlib.go:212:23:212:23 | implicit-deref u | semmle.label | implicit-deref u | | stdlib.go:212:23:212:23 | u | semmle.label | u | | stdlib.go:212:23:212:23 | u [pointer] | semmle.label | u [pointer] | -| stdlib.go:212:23:212:23 | u [postupdate] | semmle.label | u [postupdate] | | stdlib.go:212:23:212:28 | selection of Path | semmle.label | selection of Path | | stdlib.go:214:23:214:23 | u | semmle.label | u | | stdlib.go:214:23:214:32 | call to String | semmle.label | call to String | From c44bd7a145da1c4d1eab5233ef564b2453ef6249 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 3 Dec 2026 15:36:34 +0000 Subject: [PATCH 5/5] Rewrite the change note --- go/ql/lib/change-notes/2026-11-25-post-update-nodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md b/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md index 1482ae772031..1675cf5cc419 100644 --- a/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md +++ b/go/ql/lib/change-notes/2026-11-25-post-update-nodes.md @@ -1,4 +1,4 @@ --- category: minorAnalysis --- -* Improved `DataFlow::PostUpdateNode` generation so post-update nodes propagate along the full chain of field reads, index reads, pointer dereferences, and channel receives when a nested value may be mutated, and are no longer generated on read-only pointer dereferences. +* Data flow now tracks mutations of nested values accessed through struct fields, slice or map elements, pointers, and channels (for example, passing `&x.f` to a mutating function or calling a mutating method on `x.f.g`), and no longer propagates flow back to a caller's pointer argument when a function only reads through it. This may result in additional alerts and fewer false positives.