mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Merge pull request #18161 from owen-mc/java/weak-crypto-algo-more-informative
Java: Make `java/weak-cryptographic-algorithm` give a reason why the algo is insecure
This commit is contained in:
@@ -18,10 +18,11 @@ import InsecureCryptoFlow::PathGraph
|
||||
|
||||
from
|
||||
InsecureCryptoFlow::PathNode source, InsecureCryptoFlow::PathNode sink, CryptoAlgoSpec spec,
|
||||
BrokenAlgoLiteral algo
|
||||
BrokenAlgoLiteral algo, string reason
|
||||
where
|
||||
sink.getNode().asExpr() = spec.getAlgoSpec() and
|
||||
source.getNode().asExpr() = algo and
|
||||
reason = getInsecureAlgorithmReason(algo.getValue()) and
|
||||
InsecureCryptoFlow::flowPath(source, sink)
|
||||
select spec, source, sink, "Cryptographic algorithm $@ is weak and should not be used.", algo,
|
||||
select spec, source, sink, "Cryptographic algorithm $@ is insecure. " + reason, algo,
|
||||
algo.getValue()
|
||||
|
||||
Reference in New Issue
Block a user