Jeroen Ketema
05ecd2e015
Merge pull request #11958 from jketema/argv-if-tests
...
C++: Add some additional uncontrolled format string tests
2023-01-23 14:05:07 +01:00
Jeroen Ketema
cfc0dabad9
C++: Add some additional uncontrolled format string tests
...
These duplicate the `i9` and `i91` tests slightly earlier in the same file, but
use an explicit `if` instead of the ternary operator.
2023-01-23 11:50:45 +01:00
Geoffrey White
13ae15b867
C++: Add tests for more edge cases.
2023-01-13 18:38:29 +00:00
Geoffrey White
bb451f3911
C++: Fix result duplication.
2023-01-06 11:05:47 +00:00
Geoffrey White
823c767aac
C++: Undo changes to SizeCheck.ql, SizeCheck2.ql.
2023-01-05 12:34:12 +00:00
Geoffrey White
2023abdc60
C++: Update the queries.
2023-01-05 11:33:58 +00:00
Geoffrey White
a9aa67177b
C++: Add test cases for HeuristicAllocationExpr in queries.
2023-01-05 11:30:21 +00:00
Geoffrey White
10ca2dac19
C++: Remove unnecessary 'semmle' directory.
2023-01-05 11:30:15 +00:00
Arthur Baars
98c5b81456
Merge pull request #11723 from aibaars/alert-suppression
...
CodeQL alert suppression
2022-12-21 10:59:57 +01:00
Mathias Vorreiter Pedersen
cbe330eb7b
Merge pull request #11693 from jketema/argv-param-flowsource
...
C++: Define the `argv` flow source in terms the input parameter
2022-12-20 09:30:19 +00:00
Arthur Baars
0f313231bc
AlertSuppression: add more tests
2022-12-19 16:43:11 +01:00
Arthur Baars
c176606be5
AlertSuppression: allow //lgtm comments to scope over the next line
2022-12-19 16:10:26 +01:00
Jeroen Ketema
7549915773
C++: Accept test changes
2022-12-19 12:52:35 +01:00
Arthur Baars
ad80822a52
C/C++: use shared AlertSuppression.qll
2022-12-19 12:25:46 +01:00
Jeroen Ketema
2705aebbbc
C++: Restrict CWE-119 semmle tests to have a single main function
2022-12-19 12:13:37 +01:00
Jeroen Ketema
4fb43d56b3
C++: Exclude deallocation functions as scanf result accesses
2022-12-15 09:39:16 +01:00
erik-krogh
698e05f85a
Swift/C++: Use instanceof in more places
2022-12-12 16:58:13 +01:00
Jeroen Ketema
beb66d027e
C++: Use FlowSource in cpp/path-injection
2022-12-10 20:27:56 +01:00
Jeroen Ketema
ce92ba640a
C++: Accept test changes
2022-12-09 23:38:03 +01:00
Jeroen Ketema
b216c79992
C++: Accept test changes
2022-12-08 15:22:41 +01:00
Jeroen Ketema
5637d573c1
C++: Add test case that is no longer detected after latest changes
2022-12-06 08:31:22 +01:00
Jeroen Ketema
6dbc59d5b5
C++: Simplify isSink based on reviewer comments
2022-12-05 23:23:08 +01:00
Jeroen Ketema
d3cccca7f1
C++: Filter duplicate (source, sink)-pairs
2022-11-29 11:17:39 +01:00
Jeroen Ketema
378206ae7d
C++: Stop taint from flowing to arithmetic types
...
These are not likely to give the user much control over what can be accessed.
2022-11-29 11:15:28 +01:00
Jeroen Ketema
718663415b
C++: Stop flow from going through another source
...
Without this we get confusing results:
```
char *userAndFile = argv[2];
char *fileName = argv[1];
fopen(fileName, "wb+"); // Both argv[1] and argv[2] marked as source without
// this change.
```
While here add some more test cases.
2022-11-29 10:52:57 +01:00
Jeroen Ketema
63334764d7
C++: Rewrite cpp/path-injection to not use DefaultTaintTracking
2022-11-29 10:52:57 +01:00
Jeroen Ketema
4607f5990e
C++: Add more tests that exercise the default taint barrier implementation
2022-11-25 10:19:45 +01:00
Mathias Vorreiter Pedersen
ef6b85fa77
C++: Accept test changes.
2022-11-18 16:43:30 +00:00
Geoffrey White
d72ea52f68
C++: More accurate test tags.
2022-11-07 16:32:46 +00:00
Geoffrey White
55a7adff20
C++: Make the message clearer.
2022-11-07 16:32:45 +00:00
Geoffrey White
b911556896
C++: Add a test showing the motivation.
2022-11-07 16:17:32 +00:00
Tom Hvitved
a533c95640
C++: Update expected test output
2022-11-03 15:52:30 +01:00
Mathias Vorreiter Pedersen
1ca7c5b97d
Merge pull request #11091 from JarLob/assign
...
Fix AV Rule 76
2022-11-03 13:06:10 +00:00
JarLob
3317223e19
Fix AV Rule 76
2022-11-02 22:50:25 +01:00
Dave Bartolomeo
9d5e5e3ee7
${workspace} all the things
2022-11-01 13:29:05 -04:00
Jeroen Ketema
b43cbf7f95
Update cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/test.cpp
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-10-31 17:03:29 +01:00
Jeroen Ketema
abe9258943
C++: Add strcpy test for cpp/non-constant-format
2022-10-31 15:29:17 +01:00
Jeroen Ketema
83afc2a0ad
C++: Add strcpy prototype to test
2022-10-31 15:25:35 +01:00
Geoffrey White
73f977c98c
Merge pull request #10510 from geoffw0/staticfn
...
C++: Fix FPs for cpp/unused-static-function in files that were not extracted completely
2022-10-18 14:53:49 +01:00
Nora Dimitrijević
949d3e13fe
Merge branch 'main' into cpp/comma-before-misleading-indentation
2022-10-12 13:25:22 +02:00
Nora Dimitrijević
93c01371c3
C++: no parens in select message
...
Debatable; see comment thread in PR.
2022-10-12 13:01:37 +02:00
Geoffrey White
fd571538fb
Merge pull request #10706 from geoffw0/vaheuristic
...
C++: Tune cpp/unterminated-variadic-call
2022-10-10 13:39:40 +01:00
erik-krogh
66c9705502
fix some more style-guide violations in the alert-messages
2022-10-07 11:19:46 +02:00
Geoffrey White
3f78a244b9
C++: Make the tests use more repetitions.
2022-10-06 09:14:24 +01:00
Geoffrey White
9a365d83cf
C++: Tighten up the heuristic in cpp/unterminated-variadic-call.
2022-10-06 09:14:16 +01:00
Nora Dimitrijević
28606c561d
C++: Simplify normalizeExpr
...
This has a comparable but different set of FPs as the previous version.
But arguably it's an improvement.
2022-09-30 14:35:54 +02:00
Nora Dimitrijević
c37c6a004e
Merge branch 'main' into cpp/comma-before-misleading-indentation
2022-09-30 00:28:33 +02:00
Nora Dimitrijević
6eac4f52d9
C++: Accept Test Output
...
Some tricky FPs are preserved in there.
2022-09-30 00:13:23 +02:00
Nora Dimitrijević
891bc342be
C++: Fix another implicit/explicit this FP
2022-09-29 18:42:23 +02:00
Nora Dimitrijević
28bd591107
C++: Fix explicit this-> FP.
2022-09-29 17:04:11 +02:00