Last active
February 17, 2021 13:27
-
-
Save artem-smotrakov/2206ef252a8c9a74a71e452c513394a9 to your computer and use it in GitHub Desktop.
CodeQL config for detecting JEXL injections, see https://github.com/github/codeql/pull/4965/files for details
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JexlInjectionConfig extends TaintTracking::Configuration { | |
JexlInjectionConfig() { this = "JexlInjectionConfig" } | |
override predicate isSource(DataFlow::Node source) { | |
source instanceof RemoteFlowSource | |
} | |
override predicate isSink(DataFlow::Node sink) { sink instanceof JexlEvaluationSink } | |
override predicate isAdditionalTaintStep(DataFlow::Node fromNode, DataFlow::Node toNode) { | |
any(TaintPropagatingJexlMethodCall c).taintFlow(fromNode, toNode) or | |
returnsDataFromBean(fromNode, toNode) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment