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
Nora Dimitrijević
29d7c0e21b
C++: Exclude commas in if-conditions.
2022-09-29 16:29:57 +02:00
Nora Dimitrijević
64903336f7
C++: Exclude all parenthesized CommaExprs.
2022-09-29 15:49:29 +02:00
Nora Dimitrijević
909b36a078
C++: Fix implicit-this FP, uncovered non-funptr FP
2022-09-29 13:14:36 +02:00
Nora Dimitrijević
19a9c5d7d3
C++: Identified another real-life FP
2022-09-28 21:19:45 +02:00
Nora Dimitrijević
96c73bcb19
C++: Fix FP: bad Location for FieldAccess exprs
2022-09-28 20:37:22 +02:00
Nora Dimitrijević
6d5df14547
C++: Remove arguable FPs re: sizeof/decltype
2022-09-28 20:01:14 +02:00
Nora Dimitrijević
592bc18a97
C++: Reduce FPs by excluding all commas in loop heads
...
This leads to a 50% reduction of alerts in MRVA 1000.
2022-09-28 19:38:41 +02:00
Nora Dimitrijević
823b0109f0
C++: Mark FPs that are hard to solve w/o source code
2022-09-28 16:20:13 +02:00
Nora Dimitrijević
0128b1702e
C++: Fix "LHS-end = RHS-begin" FP
2022-09-28 15:36:01 +02:00
Nora Dimitrijević
e7c1fadd94
C++: Fix member-call- and C-cast-related FPs
2022-09-28 15:02:22 +02:00
Nora Dimitrijević
cacf78838c
C++: Tests (w/ FPs) from MRVA top 1000 run
2022-09-27 18:48:32 +02:00
Nora Dimitrijević
dca13f5c89
C++: Initial cpp/comma-before-misleading-indentation
...
MRVA top 1000 run at: https://github.com/github/semmle-code/actions/runs/3106828111
2022-09-22 17:44:18 +02:00
Nora Dimitrijević
f1efc76e8c
C++: Initial commit of cpp/comma-before-missing-indentation
2022-09-22 17:06:04 +02:00
Andrew Eisenberg
99e8cb78b0
Merge pull request #10496 from aeisenberg/aeisenberg/merge-rc3.7-into-main
...
Aeisenberg/merge rc3.7 into main
2022-09-21 08:09:47 -07:00
Andrew Eisenberg
58e4861b45
Merge branch 'main' into rc/3.7
2022-09-20 12:43:20 -07:00
Geoffrey White
9ddb485405
Merge branch 'main' into cleartext-perf
2022-09-20 17:56:18 +01:00
Mathias Vorreiter Pedersen
3e6576bfaf
C++: Add example of missing result.
2022-09-18 12:18:04 +01:00
Mathias Vorreiter Pedersen
d1cf688abf
C++: Fix test function naming.
2022-09-18 12:17:46 +01:00
Mathias Vorreiter Pedersen
4482669d7e
C++: Add a new 'InvalidPointerDeref' query to experimental.
2022-09-15 17:47:15 +01:00
Mathias Vorreiter Pedersen
b8a5aa5d85
C++: Fix a couple of range analysis issues:
...
1. The new query is expecting pointer arithmetic operations to generate
range-analysis bounds, but this wasn't true on main.
2. The bounds generated by `boundFlowCond` was incorrectly inferred as
non-strict when comparing a pointers (unlike when comparing values of
integral types). This gave FPs in the new query.
This also fixes a couple of missing results in existing queries that
use the new range-analysis library.
2022-09-15 17:46:52 +01:00
Geoffrey White
6011ae9ecc
Merge branch 'main' into cleartext-perf
2022-09-09 11:40:47 +01:00
Robert Marsh
0feeafd0ac
Merge pull request #10339 from MathiasVP/dont-use-get-unique-id-in-range-analysis
...
C++: Don't use `getUniqueId` in range analysis
2022-09-08 11:13:43 -04:00
Jeroen Ketema
1140d27bda
C++: Add tests for newly supported builtin operations
2022-09-08 10:06:57 +02:00
Mathias Vorreiter Pedersen
7062263885
C++: Accept test changes.
2022-09-07 21:11:52 +01:00
Mathias Vorreiter Pedersen
86259ced97
Merge branch 'main' into rdmarsh2/cpp/product-flow
2022-09-07 16:38:42 +01:00
Robert Marsh
55a10d99b4
Merge pull request #10305 from MathiasVP/ql-workaround-for-missing-decl-entries
...
C++: Synthesize `DeclarationEntry`s for IR construction
2022-09-07 11:34:28 -04:00
Mathias Vorreiter Pedersen
011d15aca3
C++: Accept test changes.
2022-09-07 14:56:08 +01:00
Mathias Vorreiter Pedersen
5ce47d97b2
Merge branch 'main' into rdmarsh2/cpp/product-flow
2022-09-07 11:14:42 +01:00
Mathias Vorreiter Pedersen
d6b8f25312
C++: Add more tests.
2022-09-06 15:22:10 +01:00
Mathias Vorreiter Pedersen
885bf427bd
C++: Accept test changes.
2022-09-05 23:26:03 +01:00
Mathias Vorreiter Pedersen
fc85ef76ed
C++: Introduce 'PseudoDeclarationEntry's to handle missing 'DeclarationEntry's during IR construction.
2022-09-05 22:17:14 +01:00
Mathias Vorreiter Pedersen
2da46ad691
C++: Add two testcases demonstrating malformed IR from missing declaration entries from decl stmts.
2022-09-05 17:49:20 +01:00
Geoffrey White
946456acc2
C++: Apply the sanitizer improvement from cpp/cleartext-storage-buffer in cpp/cleartext-storage-file and cpp/cleartext-transmission.
2022-09-05 14:44:33 +01:00
Robert Marsh
ca2694ae1d
C++: exclude end pointers in iterator-style loops
2022-09-01 17:42:19 -04:00
Nora Dimitrijević
ce1e4ad422
Merge branch 'main' into missing-check-scanf-squashed
2022-08-30 11:34:00 +02:00
erik-krogh
cc7a9ef97a
rename more acronyms
2022-08-25 20:52:27 +02:00
Nora Dimitrijević
02772ed20c
Revert changes to .gitignore and .clang-format
...
because they are potentially too global, belong in a separate PR.
2022-08-25 16:37:39 +02:00
Nora Dimitrijević
ad56274a73
C++: Small improvements to query qldoc and message
2022-08-25 15:22:41 +02:00
Nora Dimitrijević
5c894ae40b
Merge branch 'main' into missing-check-scanf-squashed
2022-08-24 21:14:57 +02:00
Nora Dimitrijević
170d12bf5a
Write MissingCheckScanf.qhelp
2022-08-24 19:58:19 +02:00
erik-krogh
1c0f2251e2
Merge branch 'main' into msgConsis
2022-08-24 14:38:57 +02:00
Nora Dimitrijević
ca162a4365
C++: complete initial implementation of cpp/missing-check-scanf
...
There are still some remaining FPs (haven't fully tested them)
that should be ironed out in a follow-up to increase the precision, e.g.:
* if scanf(&i) != 1 return
if maybe() && scanf(&i) != 1 return
use(i) // should be OK on both counts
* The minimum guard constant for the *_s variants may not be right.
* int i[2]
scanf(i, i+1) // second i is flagged as a use of the first
* Maybe loosen the "unguarded or badly guarded use() = bad" policy to
"unguarded but already-initialized = good" and "badly guarded = bad",
since a lot of FPs in MRVA fall into the "unguarded but already-
initialized" bucket.
2022-08-24 11:25:06 +02:00
Nora Dimitrijević
69911d4f36
.clang-format: do not autoformat test.cpp
2022-08-24 11:25:05 +02:00
erik-krogh
a50234adb0
apply suggestion from review
2022-08-23 15:41:37 +02:00
erik-krogh
1a7d3ee831
update expected output after changing queries
2022-08-23 12:35:32 +02:00
erik-krogh
7e0bd5bde4
update expected output of tests
2022-08-22 21:41:47 +02:00
erik-krogh
e89e0eb7fb
make some acronyms camelCase
2022-08-22 21:22:35 +02:00
erik-krogh
ce9f69a639
rename all occurrences of XML to Xml
2022-08-22 14:08:31 +02:00