Geoffrey White
73cc211779
C++: Fix qhelp error.
2024-05-02 17:36:35 +01:00
Geoffrey White
08e08a2b3a
C++: Qhelp punctuation.
2024-05-02 17:32:24 +01:00
Geoffrey White
669fc925e0
C++: Fix qhelp formatting.
2024-05-02 17:24:20 +01:00
Geoffrey White
8a04840f93
C++: Improve qhelp for IncorrectNotOperatorUsage.ql, including mention of an alternative fix.
2024-05-02 17:17:55 +01:00
Geoffrey White
f4e4e238ba
C++: Add test cases for IncorrectNotOperatorUsage.ql.
2024-05-02 17:17:55 +01:00
Jeroen Ketema
adfb3c3d50
C++: Simplify cpp/boost/tls-settings-misconfiguration
2024-03-22 11:22:11 +01:00
Jeroen Ketema
a770bddff0
C++: Add precision to cpp/boost/tls-settings-misconfiguration and cpp/boost/use-of-deprecated-hardcoded-security-protocol
...
Also clean up the names of the queries while here.
2024-03-22 10:48:18 +01:00
Mathias Vorreiter Pedersen
1330c885c8
C++: Use 'asIndirectExpr' in the sink of 'ExistsAnyFlowConfig.
2024-03-20 18:04:59 +00:00
Mathias Vorreiter Pedersen
4a55b6fbdf
C++: Make 'cpp/uninitialized-local' a path-problem query.
2024-03-18 15:02:33 +00:00
Mathias Vorreiter Pedersen
61597f5ac7
C++: This commit does two things:
...
1. It fixes a logic error in the cannotContainString predicate.
2. It reverts the changes to the `isSource` predicate that required the external
function to be within the source root.
The change to `isSource` was meant to fix the a performance problem that occurred
because of the logic error in the cannotContainString predicate. However, now that
the logic error is fixed this is no longer necessary 🎉
2024-03-13 22:40:06 +00:00
Mathias Vorreiter Pedersen
51f5740707
C++: Exclude functions that aren't declared inside the source root. This fixes performance on ImageMagick.
2024-03-12 14:20:16 +00:00
Mathias Vorreiter Pedersen
6a563c161e
C++: Simplify the definition of 'isNonConst'. On ImageMagick I get the same exact sources before and after.
2024-03-12 14:20:09 +00:00
Mathias Vorreiter Pedersen
179a7d500e
C++: Handle 'wchar_t' types that may be defined as unsigned short in C. This brings back SAMATE results.
2024-03-12 14:19:48 +00:00
Mathias Vorreiter Pedersen
9854ed4b89
C++: Delete comment.
2024-03-11 18:54:53 +00:00
Mathias Vorreiter Pedersen
2345907a52
C++: Reintroduce the 'cannotContainString' optimization that was removed in #15516 .
2024-03-11 18:49:03 +00:00
Mathias Vorreiter Pedersen
f97b6e2848
C++: Stop conflating pointers and indirections in the query.
2024-03-11 18:48:19 +00:00
Mathias Vorreiter Pedersen
32e532ff3c
C++: Some cleanup to avoid conflating the case of a function returning something as a return value, and a function updating one of its arguments.
2024-03-11 18:42:42 +00:00
Benjamin Rodes
8d35db0fe6
Making argv filter positional.
2024-02-21 12:25:35 -05:00
Benjamin Rodes
639642fb67
Formatting.
2024-02-16 11:19:02 -05:00
Benjamin Rodes
0410ed734b
Adding exclusion for main's argv (I believe this and other changes were accidentally removed in prior merge with other non-const branches)
2024-02-16 11:18:06 -05:00
Benjamin Rodes
9f3dd6300f
Fixing query to use path graph.
2024-02-16 11:11:48 -05:00
Benjamin Rodes
aa7c677e13
Merge branch '51-2cppnon-constant-format-alter-not-const-source' into cpp-non-constant-format-as-path-query
...
# Conflicts:
# cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql
2024-02-16 10:49:05 -05:00
Benjamin Rodes
93f2e856af
Formatting update.
2024-02-16 10:28:14 -05:00
Benjamin Rodes
4a9b2d5027
Comment change.
2024-02-16 10:18:07 -05:00
Benjamin Rodes
5b0a3dcdbe
Accidental removal of an and.
2024-02-16 10:15:21 -05:00
Benjamin Rodes
95ebbb1bbd
Ql alterations for cleanup as part of merge suggestions.
2024-02-16 10:13:50 -05:00
Ben Rodes
1fb7f089ca
Update cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2024-02-16 10:06:34 -05:00
Benjamin Rodes
d6b0746b30
The non-constant format query is now a path query. Minor changes to the output alert to be more precise on what is being alerted. Minor changes to the query itself to avoid redundancies with argv.
2024-02-15 12:14:52 -05:00
Benjamin Rodes
caf2ee27fa
Adding false negative tests for future work.
2024-02-15 09:43:26 -05:00
Benjamin Rodes
5c508553f3
Efficiency improvement (force a better join order)
2024-02-13 09:42:08 -08:00
Benjamin Rodes
091416131b
Removing 'const' specifier filtering after discussions with the team. We will test if this causes undesirable cases in DCA and then choose which approach is best.
2024-02-12 09:38:00 -05:00
Benjamin Rodes
d4bc2ceb37
Minor efficiency improvements and comments.
2024-02-08 10:11:50 -05:00
Benjamin Rodes
f12a1ecdf2
Simplifying the query.
2024-02-07 14:15:16 -05:00
Benjamin Rodes
9fc2405681
Updating non-const source logic and associated tests and expected files.
2024-02-07 13:54:56 -05:00
Benjamin Rodes
80bf38d8cc
Initial working draft of non-const source refactor.
2024-02-06 14:20:01 -05:00
Ben Rodes
e47df5c7bc
Update NonConstantFormat.ql
...
Removed dead comment
2024-02-05 09:39:05 -05:00
Benjamin Rodes
e8587d060d
Removing comments and formatting.
2024-02-02 16:23:14 -05:00
Benjamin Rodes
9577c35d85
Incremental update to NonConstantFormat.ql
2024-02-02 16:06:59 -05:00
Benjamin Rodes
f58f77de82
PR change suggestions.
2024-01-30 09:22:22 -05:00
Benjamin Rodes
13cf555cee
False positive fix for cpp/uninitialized-local
2024-01-29 13:21:05 -05:00
Mathias Vorreiter Pedersen
a8020f4f78
C++: Add barrier to prevent duplication.
2023-12-05 09:14:23 +00:00
Mathias Vorreiter Pedersen
d9d36ff213
C++: Fix Code Scanning errors.
2023-12-04 16:53:03 +00:00
Mathias Vorreiter Pedersen
03b77dbf2a
C++: Make 'node.asExpr()' behave as 'node.asDefinition()' in void contexts.
2023-12-04 16:38:13 +00:00
Mathias Vorreiter Pedersen
976adc3c7c
C++: Fixup queries to keep the old results.
2023-11-21 17:50:08 +00:00
Mathias Vorreiter Pedersen
bae7e10e46
C++: Also add MSVC-related 'alloca'-like functions.
2023-11-15 12:07:17 +00:00
Mathias Vorreiter Pedersen
6730f57d5c
C++: Also flag up 'alloca' and friends.
2023-11-15 11:51:57 +00:00
Mathias Vorreiter Pedersen
022c9eb3cd
C++: Add a barrier feature to 'MustFlow'.
2023-11-07 09:23:42 +00:00
Mathias Vorreiter Pedersen
1dc08941f8
C++: Use 'MustFlow' in 'cpp/uninitialized-local'.
2023-11-07 09:23:41 +00:00
Mathias Vorreiter Pedersen
20c3984872
C++: Add the 'security' tag and add a 'security-severity' rating to 'cpp/redundant-null-check-simple'.
2023-10-16 09:54:36 +01:00
Mathias Vorreiter Pedersen
05080924de
C++: Don't use converted expressions in 'LeapYear.qll'.
2023-09-12 19:48:52 +01:00