mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
18 lines
361 B
Plaintext
18 lines
361 B
Plaintext
import javascript
|
|
|
|
class Assertion extends DataFlow::CallNode {
|
|
Assertion() {
|
|
getCalleeName() = "checkJSON"
|
|
}
|
|
|
|
string getMessage() {
|
|
if not any(JsonParserCall call).getOutput().flowsTo(getArgument(0)) then
|
|
result = "Should be JSON parser"
|
|
else
|
|
result = "OK"
|
|
}
|
|
}
|
|
|
|
from Assertion assertion
|
|
select assertion, assertion.getMessage()
|