add comment about why colors/safe is not safe

Co-authored-by: Esben Sparre Andreasen <esbena@github.com>
This commit is contained in:
Erik Krogh Kristensen
2021-06-23 10:39:56 +02:00
committed by GitHub
parent fa02651542
commit 700dfcc3a7

View File

@@ -221,7 +221,8 @@ class AnsiColorsStep extends TaintTracking::SharedTaintStep {
class ColorsStep extends TaintTracking::SharedTaintStep {
override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) {
exists(API::CallNode call |
call = API::moduleImport(["colors", "colors/safe"]).getAMember*().getACall()
call = API::moduleImport(["colors", "colors/safe" /* this variant avoids modifying the prototype methods */ ]).getAMember*().getACall()
|
pred = call.getArgument(0) and
succ = call