mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Crypto: Code Cleanup (+1 squashed commits)
Squashed commits: [417734cc3c] Crypto: Fixing typo (+1 squashed commits) Squashed commits: [1ac3d5c7d4] Crypto: Fixing typo caused by AI auto complete.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
private import cpp as Language
|
||||
import semmle.code.cpp.dataflow.new.TaintTracking
|
||||
import codeql.quantum.experimental.Model
|
||||
private import experimental.quantum.OpenSSL.GericSourceCandidateLiteral
|
||||
private import OpenSSL.GenericSourceCandidateLiteral
|
||||
|
||||
module CryptoInput implements InputSig<Language::Location> {
|
||||
class DataFlowNode = DataFlow::Node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import cpp
|
||||
import experimental.quantum.OpenSSL.GericSourceCandidateLiteral
|
||||
import experimental.quantum.OpenSSL.GenericSourceCandidateLiteral
|
||||
|
||||
predicate resolveAlgorithmFromExpr(Expr e, string normalizedName, string algType) {
|
||||
resolveAlgorithmFromCall(e, normalizedName, algType)
|
||||
|
||||
@@ -27,12 +27,12 @@ private predicate isOpenSSLStringLiteralGenericSourceCandidate(StringLiteral s)
|
||||
exists(f.getOutputArgument(true)) and s = f.(Call).getAnArgument()
|
||||
) and
|
||||
// Ignore all format string calls where there is no known out param (resulting string)
|
||||
// i.e., ignore printf, since it will just ouput a string and not produce a new string
|
||||
// i.e., ignore printf, since it will just output a string and not produce a new string
|
||||
not exists(FormattingFunctionCall f |
|
||||
// Note: using two ways of determining if there is an out param, since I'm not sure
|
||||
// which way is canonical
|
||||
not exists(f.getOutputArgument(false)) and
|
||||
not f.getTarget().(FormattingFunction).hasTaintFlow(_, _) and
|
||||
not f.getTarget().hasTaintFlow(_, _) and
|
||||
f.(Call).getAnArgument() = s
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user