Commit Graph

37 Commits

Author SHA1 Message Date
Owen Mansel-Chan
b6053e3f91 Merge pull request #19076 from owen-mc/go/update-depstubber-files
Go: update files generated by depstubber
2025-04-09 11:44:20 +01:00
Owen Mansel-Chan
11ff0a08f3 Add log injection and cleartext logging tests for %T 2025-03-20 15:08:02 +00:00
Owen Mansel-Chan
646d28feeb Make cleartext logging tests more realistic 2025-03-20 15:08:00 +00:00
Owen Mansel-Chan
94c812cbe6 Convert cleartext logging tests to inline expectations 2025-03-20 15:07:59 +00:00
Owen Mansel-Chan
40768332d8 Remove empty imports from stubs 2025-03-20 12:32:12 +00:00
Owen Mansel-Chan
81e85010f9 List subpackages in vendor/modules.txt
These were all generated by running depstubber.
2025-03-20 12:30:57 +00:00
Dave Bartolomeo
1323b3f067 Revert "Merge pull request #18235 from owen-mc/go/varargs-out-param"
This reverts commit 4f8645b4dd, reversing
changes made to 22aaf74184.
2025-01-07 14:59:31 -05:00
Dave Bartolomeo
3dcf49cea0 Revert "Merge pull request #18275 from owen-mc/go/mad/variadic-params-sources"
This reverts commit 7ab06fca2f, reversing
changes made to 0c5e260ae6.
2025-01-07 14:55:06 -05:00
Michael Nebel
aaf0cd5dee Merge pull request #17968 from michaelnebel/java/movetestutils
Move test utilities to the query pack.
2024-12-16 13:41:30 +01:00
Michael Nebel
96fe1449f8 Go: Update all test util paths to point to the new location. 2024-12-12 13:54:21 +01:00
Owen Mansel-Chan
3f7c37e1ed Treat container flow as taint flow in global taint flow 2024-12-12 11:41:32 +00:00
Owen Mansel-Chan
7e5e634bc7 Update .expected files (no new results) 2024-12-06 15:41:28 +00:00
Owen Mansel-Chan
ffeb86c1f5 Update .expected files 2024-07-30 12:54:42 +01:00
Owen Mansel-Chan
94f290411f Use post-process provenance pretty-printing in qlref tests 2024-07-30 11:35:09 +01:00
Owen Mansel-Chan
1aa63c3f2e Accept model numbering changes 2024-07-25 14:55:50 +01:00
Owen Mansel-Chan
cb0589dfb7 Tests: accept model numbering changes 2024-07-18 11:35:52 +01:00
Owen Mansel-Chan
d109b1e20d Accept model numbering changes in tests 2024-07-17 12:37:23 +01:00
Owen Mansel-Chan
f67026f2ad Accept model numbering changes in tests 2024-07-17 11:02:28 +01:00
Owen Mansel-Chan
fc6b17ad64 Test: accept model numbers changing 2024-07-16 21:36:12 +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
Anders Schack-Mulligen
8db9187698 Go: Accept qltest .expected file changes (interesting). 2024-05-22 15:38:01 +02:00
Anders Schack-Mulligen
3b8af1e52a Go: Add empty provenance column to expected files. 2024-02-09 11:32:07 +01:00
Tony Torralba
5e8c63c3aa Use arg position instead of arg as class field to reduce number of instances 2024-01-10 14:12:29 +01:00
Tony Torralba
78c0cdfa2c Apply suggestions from code review
co-authored-by: Owen Mansel-Chan <owen-mc@github.com>
2024-01-10 13:33:41 +01:00
Tony Torralba
3534f692dc Fix test expectations
Barrier-in addition removes an overlapping path
2024-01-10 13:33:41 +01:00
Owen Mansel-Chan
a7382e06c2 Make ClearTextLogging use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:48:59 +01:00
Chris Smowton
d648b34037 Accept test changes
These are caused by nodes being hidden by https://github.com/github/codeql/pull/12783
2023-04-12 15:05:04 +01:00
Chris Smowton
3c48609635 Accept test changes 2023-04-12 14:19:05 +01:00
Chris Smowton
a796ddb95b Accept paths-only test changes 2023-04-12 14:19:01 +01:00
Owen Mansel-Chan
50414cc748 Make DataFlowType a singleton 2022-12-14 14:40:15 +00:00
Owen Mansel-Chan
71aeeee7c8 Accept trivial change to test output
In the `subpaths` section, the last node is now printed without its type
if it is the sink of the path.

This comes from the commit "Dataflow: Bugfix: include subpaths ending at
a sink. " in https://github.com/github/codeql/pull/7526
2022-11-17 14:27:06 +00:00
Chris Smowton
3573e211cc Correct test expectations 2022-10-29 11:40:58 +01:00
Chris Smowton
5c66d87ed6 gofmt 2022-10-29 11:40:57 +01:00
Chris Smowton
0c6c135967 Go: exclude protobuf read steps from cleartext-logging query
This query already treats structs differently to usual: it includes field -> whole struct taint steps, but explicitly excludes struct -> field steps. This means that a logging framework sinking an entire struct with a tainted field yields an alert, but we don't get FPs caused by writing field `x` but then reading field `y`.

However, protobuf messages have a special treatment, with taint usually associated with the whole struct and getter methods propagating that taint out. Suppressing these getter method steps specifically for the cleartext-logging query mirrors its treatment of structs in general and avoids this sort of field-mismatch FP.

On the downside we will miss same-field propagation like `m.field = password; Log(m.GetField())` if we don't have source code for the implementation of `m`. However this is hopefully unusual since the typical use of protobufs is to serialize and deserialize, rather than using the struct as a general-purpose datastructure.
2022-10-29 11:40:57 +01:00
erik-krogh
c241185c21 avoid more instances of "this location" and "here" in alert-messages 2022-09-20 22:51:35 +02:00
erik-krogh
2602a38d94 update expected test output 2022-09-20 22:51:35 +02:00
Chuan-kai Lin
aa514fff32 codeql-go merge prep: move into go/ directory 2022-05-20 10:07:19 -07:00