6 Commits

Author SHA1 Message Date
Michael Hohn
92a678414d Use asIndirecArgument 2025-03-03 11:54:46 -08:00
Michael Hohn
00bd07be2b add flow with module boilerplate 2025-03-03 11:21:04 -08:00
Michael Hohn
ea0311f339 fix add-user.c 2025-03-03 11:11:52 -08:00
Michael Hohn
ade70e9b32 fixes for db 2025-03-03 10:22:40 -08:00
Michael Hohn
03c38d3c89 remove db 2025-03-03 10:15:25 -08:00
Michael Hohn
c532be53d4 first session 2025-03-02 21:28:48 -08:00
264 changed files with 75 additions and 56960 deletions

View File

@@ -15,7 +15,7 @@ module SqliFlowConfig implements DataFlow::ConfigSig {
// count = read(STDIN_FILENO, buf, BUFSIZE);
exists(FunctionCall read |
read.getTarget().getName() = "read" and
read.getArgument(1) = source.(DataFlow::PostUpdateNode).getPreUpdateNode().asExpr()
read.getArgument(1) = source.(DataFlow::PostUpdateNode).getPreUpdateNode().asIndirectArgument()
)
}
@@ -31,7 +31,7 @@ module SqliFlowConfig implements DataFlow::ConfigSig {
// #endif
exists(FunctionCall printf |
printf.getTarget().getName().matches("%snprintf%") and
printf.getArgument(0) = out.(DataFlow::PostUpdateNode).getPreUpdateNode().asExpr() and
printf.getArgument(0) = out.(DataFlow::PostUpdateNode).getPreUpdateNode().asIndirectArgument() and
// very specific: shifted index for macro.
printf.getArgument(6) = into.asExpr()
)

BIN
cpp-sqli-3fe610d-1.zip (Stored with Git LFS)

Binary file not shown.

View File

@@ -1 +0,0 @@
{"languages":{"cpp":{"displayName":"C/C++","files":["add-user.c"],"linesOfCode":78,"name":"cpp"}}}

View File

@@ -1,11 +0,0 @@
---
sourceLocationPrefix: /Users/hohn/local/codeql-dataflow-sql-injection
baselineLinesOfCode: 78
unicodeNewlines: false
columnKind: utf8
primaryLanguage: cpp
creationMetadata:
sha: c1b3c8d901eacddbb7949a8ca3b8acc11ffbda86
cliVersion: 2.20.0
creationTime: 2025-02-18T01:07:10.558137Z
finalised: true

View File

@@ -1 +0,0 @@
20190805:20220702:20240828:20241116

Some files were not shown because too many files have changed in this diff Show More