mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
15 lines
347 B
Plaintext
15 lines
347 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()
|