Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artem-smotrakov/42ebb6118ba911821d5946862f753dde to your computer and use it in GitHub Desktop.
Save artem-smotrakov/42ebb6118ba911821d5946862f753dde to your computer and use it in GitHub Desktop.
CodeQL query for detecting possible timing attacks in Java applications
from DataFlow::PathNode source, DataFlow::PathNode sink, NonConstantTimeCryptoComparisonConfig conf
where conf.hasFlowPath(source, sink)
select sink.getNode(), source, sink, "Possible timing attack against $@ validation.", source,
source.getNode().(CryptoOperationSource).getCall().getResultType()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment