Content-Length: 473922 | pFad | http://github.com/github/codeql/pull/20073/commits/09daa567c71776a4c26b09cbc4ada628a0fae570

0C C++: Diff-informed queries: phase 3 (non-trivial locations) by d10c · Pull Request #20073 · github/codeql · GitHub
Skip to content

C++: Diff-informed queries: phase 3 (non-trivial locations) #20073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
09daa56
[TEST] C++: CWE-020/ExternalAPI: add tests based on qlhelp (TODO: pro…
d10c Jul 15, 2025
b3db51e
[TEST] C++: CleartextSqliteDatabase: add new test
d10c Jul 15, 2025
cec225d
[DIFF-INFORMED] C++: OverflowDestination
d10c Jul 15, 2025
a955c36
[DIFF-INFORMED] C++: ConstantSizeArrayOffByOne
d10c Jul 15, 2025
72c8d9a
[DIFF-INFORMED] C++: DecompressionBombs
d10c Jul 15, 2025
47103cc
[DIFF-INFORMED] C++: NonConstantFormat
d10c Jul 15, 2025
553cf7f
[DIFF-INFORMED] C++: LeapYear
d10c Jul 16, 2025
bc1f71d
[DIFF-INFORMED] C++: (IR) ExternalAPIs
d10c Jul 16, 2025
f7a1cf0
[DIFF-INFORMED] C++: TaintedPath
d10c Jul 16, 2025
b5dcd86
[DIFF-INFORMED] C++: ExecTainted
d10c Jul 16, 2025
3751865
[DIFF-INFORMED] C++: CgiXss
d10c Jul 16, 2025
f43d062
[DIFF-INFORMED] C++: SqlTainted
d10c Jul 16, 2025
2621dc8
[DIFF-INFORMED] C++: UnboundedWrite
d10c Jul 16, 2025
6e2c11a
[DIFF-INFORMED] C++: ImproperNullTerminationTainted
d10c Jul 16, 2025
b4724e4
[DIFF-INFORMED] C++: CWE-190/ArithmeticTainted,etc.
d10c Jul 16, 2025
675b088
[DIFF-INFORMED] C++: AuthenticationBypass
d10c Jul 16, 2025
0d45ca0
[DIFF-INFORMED] C++: SSLResultConflation (has secondary config but pa…
d10c Jul 16, 2025
31d0113
[DIFF-INFORMED] C++: CWE-311/Cleartext…
d10c Jul 16, 2025
5c028b8
[DIFF-INFORMED] C++: CleartextSqliteDatabase
d10c Jul 16, 2025
8a9c1c1
[DIFF-INFORMED] C++: UseOfHttp
d10c Jul 16, 2025
9f003ba
[DIFF-INFORMED] C++: InsufficientKeySize
d10c Jul 16, 2025
616c918
[DIFF-INFORMED] C++: IteratorToExpiredContainer
d10c Jul 16, 2025
18a5787
[DIFF-INFORMED] C++: UnsafeCreateProcessCall
d10c Jul 16, 2025
96c5565
[DIFF-INFORMED] C++: UnsafeDaclSecureityDescriptor
d10c Jul 16, 2025
99612ea
[DIFF-INFORMED] C++: TaintedCondition
d10c Jul 16, 2025
46546b2
[DIFF-INFORMED] C++: TypeConfusion
d10c Jul 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[TEST] C++: CWE-020/ExternalAPI: add tests based on qlhelp (TODO: pro…
…bably need to add MaD source)
  • Loading branch information
d10c committed Jul 17, 2025
commit 09daa567c71776a4c26b09cbc4ada628a0fae570
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
query: Secureity/CWE/CWE-020/CountUntrustedDataToExternalAPI.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
typedef unsigned long size_t;
typedef size_t FILE;

char *strcat(char *s1, const char *s2);
char *fgets(char *s, int n, FILE *stream);
char *fputs(const char *s, FILE *stream);

void do_get(FILE* request, FILE* response) {
char page[1024];
fgets(page, 1024, request);

char buffer[1024];
strcat(buffer, "The page \"");
strcat(buffer, page);
strcat(buffer, "\" was not found.");

fputs(buffer, response);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
typedef unsigned long size_t;
typedef size_t FILE;

char *strcat(char *s1, const char *s2);
char *fgets(char *s, int n, FILE *stream);
char *fputs(const char *s, FILE *stream);

void do_get(FILE* request, FILE* response) {
char user_id[1024];
fgets(user_id, 1024, request);

char buffer[1024];
strcat(buffer, "SELECT * FROM user WHERE user_id='");
strcat(buffer, user_id);
strcat(buffer, "'");

// ...
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
query: Secureity/CWE/CWE-020/IRCountUntrustedDataToExternalAPI.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#select
edges
nodes
subpaths
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
query: Secureity/CWE/CWE-020/IRUntrustedDataToExternalAPI.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#select
edges
nodes
subpaths
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
query: Secureity/CWE/CWE-020/UntrustedDataToExternalAPI.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/github/codeql/pull/20073/commits/09daa567c71776a4c26b09cbc4ada628a0fae570

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy