Commit Graph

487 Commits

Author SHA1 Message Date
Geoffrey White
da412178ce C++: Use set literals (more). 2021-10-20 14:18:27 +01:00
Geoffrey White
3f3c79f48f Merge pull request #6884 from geoffw0/setliterals
Replace or chains with set literals.
2021-10-18 16:46:55 +01:00
Geoffrey White
f38dade578 C++: Disable the two null termination queries enabled by 6794. 2021-10-15 17:39:12 +01:00
Geoffrey White
f08d2ee759 Merge branch 'main' into setliterals 2021-10-14 14:39:39 +01:00
Mathias Vorreiter Pedersen
a2371370ff Merge pull request #6865 from MathiasVP/fix-if-none
C++/C#/JS/Python: Replace 'if p() then q() else none()' with a conjunction
2021-10-13 19:47:55 +01:00
Geoffrey White
2e61ae244a C++: Set literals. 2021-10-13 16:12:36 +01:00
Mathias Vorreiter Pedersen
6ece3c2b46 Merge pull request #6870 from jbj/cp-fixes
C++: Fix potential Cartesian products
2021-10-13 14:15:33 +01:00
Jonas Jensen
955344e175 C++: Inline a predicate that contains CPs
The `overflows` predicate had quite severe Cartesian products. We didn't
see them in practice because magic saved us, but we can't rely on magic
in the future, so it seems better to inline this predicate.

Tuple counts and speed look good both before and after.
2021-10-13 14:11:47 +02:00
Mathias Vorreiter Pedersen
ba981c525b C++: Replace 'if p() then q() else none()' with a conjunction. 2021-10-13 12:11:42 +01:00
Geoffrey White
51188aa93f C++: Give the two queries medium precision (for now). 2021-10-01 17:04:22 +01:00
Geoffrey White
11d7a0b712 C++: Exclude results where the address of the variable is taken. 2021-10-01 14:39:02 +01:00
Anders Fugmann
6d4b7c828c C++: Remove superfluous 'and any()' 2021-08-24 09:37:39 +02:00
Anders Fugmann
9324d8f348 C++: Fix case where implicit downcasts were not detected when using reference 2021-08-23 14:44:49 +02:00
Geoffrey White
ae35ae10e6 C++: Fix readlink FPs. 2021-07-28 17:45:18 +01:00
Geoffrey White
c2ef58d29d C++: Support 'readlinkat'. 2021-07-28 16:15:28 +01:00
Mathias Vorreiter Pedersen
e536cecefe C++: Fix FP caused by a variable missing type information. 2021-07-21 11:04:23 +02:00
Geoffrey White
dcc7a6360f C++: Simplify a bit and remove two noopts that don't seem to make a difference. 2021-06-29 19:05:13 +01:00
Geoffrey White
5bf7e453e6 C++: Tidy up WrongTypeFormatArguments.ql somewhat. 2021-06-29 16:45:47 +01:00
Geoffrey White
6e49891ed9 C++: Accept Microsoft/non-Microsoft format specifiers on the opposite platform. 2021-06-29 16:45:46 +01:00
Calum Grant
771e686946 Update security-severity scores 2021-06-15 13:25:17 +01:00
Calum Grant
a594afb828 Add security-severity metadata 2021-06-10 20:11:08 +01:00
Mathias Vorreiter Pedersen
78cc8f01d6 C++: Shorter description. 2021-05-25 14:11:03 +02:00
Mathias Vorreiter Pedersen
5382ef7761 C++: Split the overview section of qhelp into a couple of paragraphs. 2021-05-25 13:18:15 +02:00
Mathias Vorreiter Pedersen
f842d09a16 Apply suggestions from code review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2021-05-25 13:16:04 +02:00
Mathias Vorreiter Pedersen
e857ac1149 C++: Add more tests and remove redundant conjunct. 2021-05-25 09:17:42 +02:00
Mathias Vorreiter Pedersen
5300dd2fa8 C++: Merge the experimental query 'cpp/access-memory-location-after-end-buffer-strncat' into 'cpp/unsafe-strncat'. 2021-05-21 10:33:56 +02:00
Mathias Vorreiter Pedersen
d5793418f9 C++: Remove parent CWE tags. 2021-05-04 14:39:23 +02:00
Mathias Vorreiter Pedersen
2912c2e7f5 C++: Add more CWE tags to queries in the code scanning suite. 2021-05-03 16:58:47 +02:00
Chris Smowton
455b840712 Fix all dead qhelp links
For those documents with no obvious new home I've pointed the links to the Internet Archive.
2021-04-23 15:20:21 +01:00
Mathias Vorreiter Pedersen
93e55e2631 C++: Fix FP in cpp/return-stack-allocated-memory. 2021-04-20 13:58:12 +02:00
Mathias Vorreiter Pedersen
a5f4d43d61 C++: Fix false positive by adding another allow-list pattern in AssignWhereCompareMeant. 2021-04-06 11:01:38 +02:00
Marcono1234
5a8ffa5a85 Use .inc.qhelp extension for included help files 2021-03-04 22:04:48 +01:00
Geoffrey White
13d9d5dc45 C++: Use [,] more in general. 2020-12-03 18:50:43 +00:00
Mathias Vorreiter Pedersen
648acc3bfc C++: Prevent IR re-evaluation by importing GVN. 2020-11-24 17:04:54 +01:00
Mathias Vorreiter Pedersen
2e6a3cd33b Merge branch 'main' into unsafe-use-of-this-query 2020-11-19 13:03:29 +01:00
Mathias Vorreiter Pedersen
072adaa279 C++: Require that no override of the called pure virtual function exists in any base class. This removes the false positive in the testcase. Based on the results on LGTM we have agreed to set the @precision to very-high. 2020-11-19 12:10:57 +01:00
Mathias Vorreiter Pedersen
4a7f9100e4 C++: Respond to review comments. 2020-11-16 15:30:42 +01:00
Mathias Vorreiter Pedersen
020af1c88c C++: Add qhelp. 2020-11-16 11:21:18 +01:00
Mathias Vorreiter Pedersen
0a6a22562b C++: Respond to more review comments.
- Remove post-dominance requirement. It was really just hiding good
  results.
- Fix test annotations. Turns out Clang and GCC's 'undefined behavior'
  warning didn't align with the C++ standard.
2020-11-13 15:44:33 +01:00
Mathias Vorreiter Pedersen
b249777bfb C++: Respond to review comments. 2020-11-13 10:44:06 +01:00
Mathias Vorreiter Pedersen
896dee5fb7 C++: Fix dataflow pruning by evaluating successor before flowsToSink/flowsFromSource. 2020-11-12 15:47:48 +01:00
Mathias Vorreiter Pedersen
4c27c3757c C++: Respond to more review comments. 2020-11-12 10:27:03 +01:00
Mathias Vorreiter Pedersen
44e38ab6d2 Merge branch 'unsafe-use-of-this-query' of github.com:MathiasVP/ql into unsafe-use-of-this-query 2020-11-11 18:30:20 +01:00
Mathias Vorreiter Pedersen
e1ef41bd38 C++: Respond to review comments. 2020-11-11 18:29:51 +01:00
Mathias Vorreiter Pedersen
de0ca0aa74 Update cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.cpp
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2020-11-11 18:12:49 +01:00
Mathias Vorreiter Pedersen
4bcf1f498b C++: Add new query for unsafe use of this. 2020-11-10 17:23:55 +01:00
Anders Schack-Mulligen
89ef6ea4eb C++/C#/Java/JavaScript/Python: Autoformat set literals. 2020-11-10 13:32:27 +01:00
Geoffrey White
12233e5874 Merge pull request #4533 from MathiasVP/mathiasvp/fix-broken-qhelp
C++: Fix broken qhelp links
2020-10-26 14:40:52 +00:00
Mathias Vorreiter Pedersen
9db66a1b94 Delete the msdn reference in NestedLoopSameVar
It was a Visual Basic reference anyway, and it doesn't seem to provide more information than the link we have already.
2020-10-26 15:27:24 +01:00
Mathias Vorreiter Pedersen
02bcb6d971 Apply suggestions from code review
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2020-10-26 11:39:54 +01:00