Skip to content

Commit 822d452

Browse files
committed
JS: Drive-by change in LogInjection
1 parent ad12f38 commit 822d452

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

javascript/ql/src/semmle/javascript/security/dataflow/LogInjection.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,11 @@ module LogInjection {
6767
class HtmlSanitizer extends Sanitizer {
6868
HtmlSanitizer() { this instanceof HtmlSanitizerCall }
6969
}
70+
71+
/**
72+
* A call to `JSON.stringify` or similar, seen as sanitizing log output.
73+
*/
74+
class JsonStringifySanitizer extends Sanitizer {
75+
JsonStringifySanitizer() { this = any(JsonStringifyCall c).getOutput() }
76+
}
7077
}

0 commit comments

Comments
 (0)