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
constfs=require('fs')functionreadFileHelper(p){fs.readFile(p)// <- detected}functionreadFileHelper2(p){fs.readFile(p)// <- not detected}constreads=[readFileHelper2]constv=process.argv[2];readFileHelper(v)// workconstres=reads.map(d=>d(v));// not workingfor(letdofreads){d(v);// not working}reads[0](v);// not working[readFileHelper2].map(d=>d(v));// not working
It is a known limitation currently that we can not resolve function calls to their target when the function can been passed through an array. Flow through arrays work in many other cases. Since this is specifically about functions flowing through array I took the liberty of renaming the issue so it's easier for us to track the underlying issue.
While we can't immediately resolve this issue, it is definitely something we will keep an eye on.
Taint analysis seems to not work for arrays:
It found
readFileHelper
but notreadFileHelper2
.There is related issue #5177
Pinging gently @erik-krogh
The text was updated successfully, but these errors were encountered: