You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Taint is propagated by:
```
list += [TAINT]
list = list + TAINT
```
but with lists we often use a function to mutate the list:
```
list = []
list.append(TAINT)
list.insert(0, TAINT)
list.extend(TAINT)
```
Previously this didn't taint `list` so we had FALSE NEGATIVES.
Now `list.append(TAINT)` is treated like augmented assignment, so list
will be tainted.
`list += list.append(TAINT)`
Of course this wouldn't work as real code since `append` returns `None`
but it is how you can think about this function which mutates `list`.
The same goes for `set.add()`, `list.extend()`, `list.insert()`,
`dict.update()`, although we aren't actually doing type checking, just
looking at the name of the method.
0 commit comments