Skip to content

Commit

Permalink
Fix elementWrite to include flow summaries
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-mc committed May 8, 2024
1 parent c6a5681 commit 694c896
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ predicate referenceStep(DataFlow::Node pred, DataFlow::Node succ) {
*/
predicate elementWriteStep(DataFlow::Node pred, DataFlow::Node succ) {
any(DataFlow::Write w).writesElement(succ.(DataFlow::PostUpdateNode).getPreUpdateNode(), _, pred)
or
FlowSummaryImpl::Private::Steps::summaryStoreStep(pred.(DataFlowPrivate::FlowSummaryNode)
.getSummaryNode(), any(DataFlow::Content c | c instanceof DataFlow::ArrayContent),
succ.(DataFlowPrivate::FlowSummaryNode).getSummaryNode())
}

/** Holds if taint flows from `pred` to `succ` via a field read. */
Expand Down

0 comments on commit 694c896

Please sign in to comment.