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:
REDMOND\brodes
2025-05-22 10:39:27 -04:00
parent a5b57d3694
commit 570fdeb254
3 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

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

View File

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