change useless cat query to only flag instances that can be re-written to

This commit is contained in:
Erik Krogh Kristensen
2020-02-19 14:31:03 +01:00
parent 344060e139
commit bdab9ee12b
6 changed files with 377 additions and 89 deletions

View File

@@ -14,7 +14,8 @@
import javascript
import semmle.javascript.security.UselessUseOfCat
from UselessCat cat
select cat.getCommand(), "Useless use of `cat` in $@.", cat, "command execution"
select cat, "Useless use of `cat`. Can be replaced with: " + createReadFileCall(cat)