Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save artem-smotrakov/cab3d5bbe1c47bc61c4248ab652c44b6 to your computer and use it in GitHub Desktop.

Select an option

Save artem-smotrakov/cab3d5bbe1c47bc61c4248ab652c44b6 to your computer and use it in GitHub Desktop.
CodeQL config for detecting Jakarta EL injections, see https://github.com/github/codeql/pull/5471 for details
class JakartaExpressionInjectionConfig extends TaintTracking::Configuration {
JakartaExpressionInjectionConfig() { this = "JakartaExpressionInjectionConfig" }
override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
override predicate isSink(DataFlow::Node sink) { sink instanceof ExpressionEvaluationSink }
override predicate isAdditionalTaintStep(DataFlow::Node fromNode, DataFlow::Node toNode) {
any(TaintPropagatingCall c).taintFlow(fromNode, toNode) or
hasGetterFlow(fromNode, toNode)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment