Skip to content

Commit 700dfcc

Browse files
erik-kroghesbena
andauthored
add comment about why colors/safe is not safe
Co-authored-by: Esben Sparre Andreasen <[email protected]>
1 parent fa02651 commit 700dfcc

File tree

1 file changed

+2
-1
lines changed
  • javascript/ql/src/semmle/javascript/frameworks

1 file changed

+2
-1
lines changed

javascript/ql/src/semmle/javascript/frameworks/Logging.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ class AnsiColorsStep extends TaintTracking::SharedTaintStep {
221221
class ColorsStep extends TaintTracking::SharedTaintStep {
222222
override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) {
223223
exists(API::CallNode call |
224-
call = API::moduleImport(["colors", "colors/safe"]).getAMember*().getACall()
224+
225+
call = API::moduleImport(["colors", "colors/safe" /* this variant avoids modifying the prototype methods */ ]).getAMember*().getACall()
225226
|
226227
pred = call.getArgument(0) and
227228
succ = call

0 commit comments

Comments
 (0)