Commit Graph

378 Commits

Author SHA1 Message Date
Anders Fugmann
ba98c0c1cb Merge remote-tracking branch 'upstream/main' into relax_memberMayBeVarSize 2021-09-28 11:15:11 +02:00
Anders Fugmann
cbdabe35de C++: Update test results to reflect changes 2021-09-24 12:29:28 +02:00
Robert Marsh
c2b356ab08 C++: add subpaths to DefaultTaintTracking 2021-09-23 21:00:45 -07:00
Robert Marsh
d62f76afa6 Merge pull request #6133 from MathiasVP/promote-sql-pqxx
C++: Promote `cpp/sql-injection-via-pqxx` out of experimental
2021-09-21 10:13:57 -07:00
Mathias Vorreiter Pedersen
33ef634ea8 Merge pull request #6679 from andersfugmann/relax_memberMayBeVarSize
Improve precision on OverflowStatic query.
2021-09-15 17:24:10 +01:00
Geoffrey White
c4714b55a3 Merge pull request #6588 from ihsinme/ihsinme-patch-069
CPP: Add query for CWE-675: Duplicate Operations on Resource
2021-09-15 15:10:03 +01:00
Jonas Jensen
65f4ec403f Merge pull request #6593 from geoffw0/samate-move
C++: Add test cases with SAMATE Juliet code snippets to the codeql test suite.
2021-09-15 14:18:08 +02:00
Geoffrey White
9ad51fbc02 C++: Fix the correct test this time. 2021-09-15 11:03:09 +01:00
Geoffrey White
8fd848701e C++: Fix test failure. 2021-09-14 16:38:11 +01:00
Mathias Vorreiter Pedersen
44dca68463 Merge branch 'main' into promote-sql-pqxx 2021-09-14 15:29:37 +01:00
Geoffrey White
902fa7d44a C++: Subsection header. 2021-09-13 14:10:17 +01:00
Geoffrey White
acd1acd869 C++: Give it a section header. 2021-09-13 14:08:18 +01:00
Geoffrey White
befd1a7ccc C++: Rename security tests readme. 2021-09-13 14:06:22 +01:00
Anders Fugmann
3172d5727a C++: Relax constraints on Buffer::memberMayBeVarSize 2021-09-13 11:15:33 +02:00
Anders Schack-Mulligen
f30dad7705 Dataflow: Update test expected outputs. 2021-09-07 13:02:20 +02:00
Mathias Vorreiter Pedersen
b7206c1218 Merge pull request #6581 from geoffw0/uncontrolledarith2
CPP: Improvements for cpp/uncontrolled-arithmetic
2021-09-07 09:48:59 +01:00
Andrew Eisenberg
6a47fcaf1f Packaging: Normalize all qlpack.yml files for all languages
This commit ensures consistency among all of our qlpacks. Here are the
changes:

1. Ensure only modern references are used (codeql-{lang} is converted to
   codeql/{lang}-all or codeql/{lang}-queries where appropriate).
2. Use consistent version numbers. All languages are at 0.0.2 except
   javascript, which is 0.0.3.
3. Convert all `libraryPathDependencies` to `dependencies` with version
   constraints
4. Dependencies from query packs to other packs are always `"*"` since
   these dependencies are always from source and we should get the
   latest.
5. Dependencies from codeql/{lang}-lib to codeql/{lang}-upgrades must
   be strict since there is a tight connection between the libary
   and its relevant upgrades.
2021-09-03 11:53:28 -07:00
Geoffrey White
f2047ee4d0 C++: Actually fix expected files after layout changes. 2021-09-03 09:13:41 +01:00
Geoffrey White
a0b712d44b C++: Add notice about the SAMATE Juliet tests. 2021-09-02 17:34:48 +01:00
Geoffrey White
d73604d1c5 C++: Fix a few glitches and accept line number changes in expected files. 2021-09-02 17:34:47 +01:00
Geoffrey White
f755659f5d C++: More directory structure consistency / cleanup. 2021-09-02 17:34:47 +01:00
Geoffrey White
d1ab2d2e8c C++: Remove some irrelevant macro logic and main functions. 2021-09-02 17:34:46 +01:00
Geoffrey White
fdb4a2acdb C++: Clean up header comments. 2021-09-02 17:34:46 +01:00
Geoffrey White
75d367a6c5 C++: Add ad-hoc SAMATE Juliet test cases (that were previously internal). Directory structures cleaned up in a few places. 2021-09-02 17:34:45 +01:00
ihsinme
1e88470ad8 Add files via upload 2021-09-02 10:22:49 +03:00
Geoffrey White
49807c080b C++: Understand *=. 2021-08-31 18:25:52 +01:00
Geoffrey White
436b18a11f C++: Add test cases. 2021-08-31 18:23:15 +01:00
Geoffrey White
6bbed9d624 C++: Test layout. 2021-08-31 18:09:21 +01:00
Andrew Eisenberg
03d6b15401 Merge branch 'main' into aeisenberg/pack/cpp 2021-08-17 15:28:47 -07:00
Andrew Eisenberg
88ceb42356 Packaging: Migrate cpp experimental/semmle folder to lib
Also, fix up some library path dependencies.
2021-08-17 14:41:41 -07:00
Andrew Eisenberg
2c5dd2dfa3 Packaging: Refactor the cpp libraries
This PR separates the core cpp packs into `codeql/cpp-queries` and
`codeql/cpp-all`.

There are very few lines of code changed. Almost all changes are moving
files around.
2021-08-17 11:22:36 -07:00
Anders Fugmann
666d5917fa C++: Avoid inclusion of standard headers 2021-08-17 15:56:28 +02:00
Anders Fugmann
469f8a638b C++: Add more tests for buffer overruns 2021-08-17 15:21:33 +02:00
Anders Fugmann
35b7808866 C++: Fix wrong comment on what is tested 2021-08-17 15:21:03 +02:00
Mathias Vorreiter Pedersen
8d594dbf08 Update cpp/ql/test/query-tests/Security/CWE/CWE-570/test.cpp
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2021-08-11 16:18:18 +02:00
Mathias Vorreiter Pedersen
0d1884d7a6 C++: Fix FP and accept test changes. 2021-08-11 15:38:57 +02:00
Mathias Vorreiter Pedersen
c2b1da0010 C++: Add FP testcase with an 'new' that has a 'std::nothrow&' parameter, but not a 'noexcept' specifier. This case was previously not reported because of the 'noexcept' specifier, and apparently the 'std::nothrow' case was broken all along. 2021-08-11 15:38:03 +02:00
Geoffrey White
e679eac008 C++: Rename test directories to match the test names, where possible. 2021-08-03 18:43:02 +01:00
Mathias Vorreiter Pedersen
8ce6335383 Merge pull request #6372 from geoffw0/uncontrolledarith 2021-08-03 17:53:39 +02:00
Geoffrey White
54253bc2eb C++: Resurrect underflow detection, but only on unsigned types. 2021-08-03 15:02:39 +01:00
Geoffrey White
7f621bc737 C++: Repair the tests that use subtraction so that the thing they're testing is preserved, and add two new explicit tests of behaviour on subtraction. 2021-07-29 15:36:43 +01:00
Geoffrey White
13823df5a1 C++: Remove underflow detection. 2021-07-29 15:22:18 +01:00
Geoffrey White
9e0411238b C++: Add some more test cases. 2021-07-29 15:15:26 +01:00
Geoffrey White
00f6f668cc C++: Don't report underflowing multiplication. 2021-07-27 14:02:40 +01:00
Geoffrey White
40f0658e8a C++: Exclude unintended results on pointers. 2021-07-27 13:39:20 +01:00
Geoffrey White
503c5c9e33 C++: Add more test cases. 2021-07-27 13:38:00 +01:00
Robert Marsh
fbb3f2e506 Merge pull request #6273 from geoffw0/cleartext-storage-file
C++: Improve the CleartextFileWrite query
2021-07-26 12:46:51 -07:00
Geoffrey White
e9b96adf24 C++: Exclude results formatted with a character other than %s. 2021-07-22 17:40:32 +01:00
Geoffrey White
f8fed263e6 C++: Exclude results that are used as file names. 2021-07-22 17:40:25 +01:00
Geoffrey White
1d582182b0 C++: Exclude 'path'. 2021-07-22 15:49:30 +01:00