Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea4bc9c

Browse files
committed
JS: Comment about manually applying taint steps
1 parent 406b080 commit ea4bc9c

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

javascript/ql/lib/semmle/javascript/security/dataflow/SecondOrderCommandInjectionQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ module SecondOrderCommandInjectionConfig implements DataFlow::StateConfigSig {
4343
) {
4444
TaintedObject::step(src, trg, inlbl, outlbl)
4545
or
46+
// We're not using a taint-tracking config because taint steps would then apply to all flow states.
47+
// So we use a plain data flow config and manually add the default taint steps.
4648
inlbl.isTaint() and
4749
TaintTracking::defaultTaintStep(src, trg) and
4850
inlbl = outlbl

javascript/ql/lib/semmle/javascript/security/dataflow/TemplateObjectInjectionQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ module TemplateObjectInjectionConfig implements DataFlow::StateConfigSig {
3939
) {
4040
TaintedObject::step(src, trg, inlbl, outlbl)
4141
or
42+
// We're not using a taint-tracking config because taint steps would then apply to all flow states.
43+
// So we use a plain data flow config and manually add the default taint steps.
4244
inlbl.isTaint() and
4345
TaintTracking::defaultTaintStep(src, trg) and
4446
inlbl = outlbl

0 commit comments

Comments
 (0)