Visitar URL original
JS: Fix `Map` content flow by MathiasVP · Pull Request #22781 · github/codeql · GitHub
Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
JS: Fix map flow.
  • Loading branch information
MathiasVP committed Oct 8, 2026
commit 16d25ffebcd6cf5f2841200a2e0cb7b3b3ce8d70
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ class MapConstructor extends SummarizedCallable::Range {
override predicate propagatesFlow(string input, string output, boolean preservesValue) {
preservesValue = true and
(
input = "Argument[0]." + ["ArrayElement", "SetElement", "IteratorElement"] + ".Member[0]" and
input =
"Argument[0]." + ["ArrayElement", "SetElement", "IteratorElement"] + ".ArrayElement[0]" and
Comment on lines +23 to +24

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm @asgerf this sounds right. What do you say here?

output = "ReturnValue.MapKey"
or
input = "Argument[0]." + ["ArrayElement", "SetElement", "IteratorElement"] + ".Member[1]" and
input =
"Argument[0]." + ["ArrayElement", "SetElement", "IteratorElement"] + ".ArrayElement[1]" and
output = "ReturnValue.MapValue"
or
input = ["Argument[0].WithMapKey", "Argument[0].WithMapValue"] and
Expand Down