Give reason why crypto algorithm is insecure

This commit is contained in:
Owen Mansel-Chan
2024-11-29 11:18:36 +00:00
parent bcb7901758
commit e6409e159f
8 changed files with 63 additions and 31 deletions

View File

@@ -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()