Commit Graph

921 Commits

Author SHA1 Message Date
Owen Mansel-Chan
3417605b6d Tests: update provenance numbering 2024-07-11 06:42:58 +01:00
Owen Mansel-Chan
01afa360d7 Tests: accept model numbering changes 2024-07-10 16:48:05 +01:00
Owen Mansel-Chan
eec2aa82a6 Add failing tests for ClearSanitizer 2024-07-08 16:05:04 +01:00
Owen Mansel-Chan
801edda9b2 Accept MaD edge provenance label changes/additions 2024-07-01 16:13:41 +01:00
Owen Mansel-Chan
a30b34c4bd Used "fixed-version:" prefix in a test 2024-06-26 05:01:09 +01:00
Edward Minnix III
8997f2cdf2 Merge pull request #16697 from egregius313/egregius313/go/dataflow/threat-modeling
Go: Introduce Threat Modeling
2024-06-18 12:25:33 -04:00
Chris Smowton
38ee085782 Adjust test expectation 2024-06-17 16:46:49 +01:00
Chris Smowton
822f6eebfb Add support for flow through content of global variables 2024-06-17 16:42:23 +01:00
Ed Minnix
b4ecc81145 Fix provenance numbers in tests 2024-06-17 11:33:19 -04:00
Ed Minnix
fa2c50616b Remove getSourceType definitions 2024-06-17 10:57:11 -04:00
Ed Minnix
b6adff6377 Fix jsoniter test 2024-06-17 10:51:13 -04:00
Ed Minnix
53dd269f9f Go: Threat model tests 2024-06-17 10:51:11 -04:00
Owen Mansel-Chan
2ae7fa4897 Tests: accept expected changes 2024-06-11 16:20:06 +01:00
Owen Mansel-Chan
6fd2ab7cef Tests: Accept model renumbering in edge provenance 2024-06-11 16:18:18 +01:00
Anders Schack-Mulligen
9b1e4d7895 Go: Fix test failure. 2024-06-07 13:16:20 +02:00
Anders Schack-Mulligen
a26c01d7c7 Go: Add support for pretty-printed provenace in tests. Convert one test. 2024-06-07 11:47:45 +02:00
Owen Mansel-Chan
44a56c420f Merge pull request #16558 from owen-mc/go/sync-external-flow
Go: sync ExternalFlow.qll
2024-06-05 11:31:34 +01:00
Owen Mansel-Chan
60970ff015 Merge pull request #16571 from owen-mc/go/remove-step-duplication-in-config
Go: remove flow step duplication in configs
2024-06-04 12:57:26 +01:00
Owen Mansel-Chan
5c5949ba5e Add tests for neutral models 2024-06-04 11:46:01 +01:00
Owen Mansel-Chan
c964fc2dca Update expected results (only empty predicate names added) 2024-06-04 11:46:00 +01:00
Owen Mansel-Chan
18fa454d33 Replace Argument[-1] with Argument[receiver] 2024-06-04 11:45:59 +01:00
Owen Mansel-Chan
0870946e05 Add model validation to more tests 2024-06-04 11:45:58 +01:00
Chuan-kai Lin
8d5bb21643 Merge pull request #16642 from github/post-release-prep/codeql-cli-2.17.4
Post-release preparation for codeql-cli-2.17.4
2024-05-31 09:08:03 -07:00
Owen Mansel-Chan
ffc25add70 Accept test changes 2024-05-30 21:01:06 +01:00
Owen Mansel-Chan
7ff1eabfc3 Add tests (mostly failing) for writes to global variables
This was based on the equivalent for java:
https://github.com/github/codeql/pull/16500
2024-05-29 16:07:16 +01:00
Owen Mansel-Chan
b2deea4606 Avoid duplicate additional flow steps in configs
`localTaintStep` includes a lot of steps which are already part of value
flow. Instead use `defaultAdditionalTaintStep`, which is just the extra
steps that are added for taint tracking.
2024-05-23 11:13:35 +01:00
Owen Mansel-Chan
7e5891b443 Remove unnecessary additional flow step
TaintTracking already adds taint steps for field reads
2024-05-23 11:08:29 +01:00
Anders Schack-Mulligen
f931c8d836 Go: Accept qltest .expected file changes. 2024-05-22 15:39:47 +02:00
Anders Schack-Mulligen
8db9187698 Go: Accept qltest .expected file changes (interesting). 2024-05-22 15:38:01 +02:00
Rasmus Wriedt Larsen
2451a6d3f6 Accept .expected changes 2024-05-21 14:47:42 +02:00
Erik Krogh Kristensen
bfc95c6f13 Merge pull request #16510 from erik-krogh/go-command
Go: Update the QHelp for `go/command-injection`.
2024-05-17 17:45:10 +02:00
erik-krogh
384649b336 changes based on review, and improve the new command-injection test 2024-05-17 08:38:54 +02:00
erik-krogh
2848ccf0e2 fix frontend errors that Go complained about 2024-05-16 20:06:26 +02:00
erik-krogh
08c0d8ec60 autoformat go files 2024-05-16 19:59:40 +02:00
erik-krogh
ea2b73bda2 add a sanitizer that checks that the string does not start with "--" 2024-05-16 09:25:19 +02:00
erik-krogh
b9a7f6a8f7 add regexp check as a sanitizer for command-injection 2024-05-16 08:55:03 +02:00
erik-krogh
761f9cac97 make a new go/command-injection qhelp 2024-05-16 08:54:55 +02:00
Owen Mansel-Chan
21ff705b73 Fix bug with read/store steps and named types 2024-05-16 00:35:45 +01:00
Owen Mansel-Chan
1af3374322 Add tests for data flow through ranged for loops
Including the case where the type of the domain is a named type rather
than an array type or map type or whatever.
2024-05-16 00:32:30 +01:00
Owen Mansel-Chan
827d15aaa0 Test changes due to model renumbering 2024-05-14 14:40:57 +01:00
Owen Mansel-Chan
ab5e1f8a69 Fix models for min and max and improve tests
Although the documentation makes them look variadic (and generic), they
are actually special-cased in the compiler. Like all built-in functions
they don't have a signature type, but the type of `min(a, b, c)` is
`func(int, int, int) int` and not `func(int, ...int) int`.

Go doesn't allow open-ended ranges for argument indices in
models-as-data specifications (though Ruby and Python do), so I've used
`1..1000`.
2024-05-14 14:40:56 +01:00
Owen Mansel-Chan
f7e6bf7ef5 Two tests have different paths but same results 2024-05-10 23:41:00 +01:00
Owen Mansel-Chan
f8e17fe8cc Accept expected test changes 2024-05-10 23:40:59 +01:00
Owen Mansel-Chan
76946184de Accept MaD renumbering for edge provenance 2024-05-10 23:40:58 +01:00
Owen Mansel-Chan
d5aa08dbf3 Local flow steps for flow summaries for built-in functions 2024-05-10 23:40:57 +01:00
Owen Mansel-Chan
86e2b845f3 Add tests for copy (taint passes, value fails) 2024-05-10 23:40:56 +01:00
Owen Mansel-Chan
eab1569342 Update ExternalValueFlow to use value flow 2024-05-10 23:40:56 +01:00
Owen Mansel-Chan
c816412795 Create copy of ExternalTaintFlow called ExternalValueFlow 2024-05-10 23:40:55 +01:00
Owen Mansel-Chan
84b7319688 Rename test folder ExternalFlow to ExternalTaintFlow 2024-05-10 23:40:54 +01:00
Owen Mansel-Chan
674e65e134 Fix test expectations 2024-05-09 16:26:30 +01:00