mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Give reason why crypto algorithm is insecure
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import default
|
||||
import semmle.code.java.security.Encryption
|
||||
|
||||
from StringLiteral s
|
||||
where s.getValue().regexpMatch(getInsecureAlgorithmRegex())
|
||||
select s
|
||||
from StringLiteral s, string reason
|
||||
where
|
||||
s.getValue().regexpMatch(getInsecureAlgorithmRegex()) and
|
||||
if exists(getInsecureAlgorithmReason(s.getValue()))
|
||||
then reason = getInsecureAlgorithmReason(s.getValue())
|
||||
else reason = "<no reason>"
|
||||
select s, reason
|
||||
|
||||
Reference in New Issue
Block a user