Commit Graph

921 Commits

Author SHA1 Message Date
Owen Mansel-Chan
b8ea8400d1 Add type param decls to PrintAST tests 2024-10-17 15:37:31 +01:00
Kevin Stubbings
1287f1befc Address feedback 2024-10-15 14:01:14 -07:00
Kevin Stubbings
d195273bf4 Add mux.Vars() and url.Path sanitizers 2024-10-14 19:49:29 -07:00
Edward Minnix III
ade5686e52 Merge pull request #17335 from egregius313/egregius313/go/dataflow/models/stdin
Go: Implement `stdin` models
2024-10-14 10:38:27 -04:00
Edward Minnix III
0abc0d1a67 Fix: ActiveThreatModelSource 2024-10-09 11:35:07 -04:00
Chris Smowton
58fd1a2241 Merge pull request #17357 from smowton/smowton/feature/go-indistinguishable-types
Go: extract and expose struct tags, interface method IDs
2024-10-09 11:06:02 +01:00
Chris Smowton
ab99509a11 Rework interface for querying private interface method ids 2024-10-08 19:23:22 +01:00
Chris Smowton
e1963a5fcd autoformat 2024-10-08 19:23:12 +01:00
Chris Smowton
7a7ff4a91e Apply review comments 2024-10-08 19:23:11 +01:00
Chris Smowton
5d14070cd4 Fix test file 2024-10-08 19:23:10 +01:00
Chris Smowton
22ed2f9ae3 Autoformat CodeQL 2024-10-08 19:23:09 +01:00
Chris Smowton
dcbb66d366 Go: extract and expose struct tags, interface method IDs
This enables us to distinguish all database types in QL. Previously structs with the same field names and types but differing tags, and interface types with matching method names and at least one non-exported method but declared in differing packages, were impossible or only sometimes possible to distinguish in QL. With this change these types can be distinguished, as well as permitting queries to examine struct field tags, e.g. to read JSON field name associations.
2024-10-08 19:23:06 +01:00
Tom Hvitved
16feaf15e2 Go: Update expected test output 2024-10-07 09:23:39 +02:00
Ed Minnix
26b49dd0df Fix test expectation 2024-10-01 15:56:40 -04:00
Ed Minnix
e18389718c Implement stdin models
Unfortunately due to how variable and varargs work, these are better
done in QL
2024-10-01 15:56:31 -04:00
Owen Mansel-Chan
fdff209938 Merge pull request #17505 from owen-mc/go/inheritance-tests
Go: Add tests for model inheritance and fix bug in promoted methods
2024-09-26 16:42:25 +01:00
Rasmus Wriedt Larsen
381ea93ec3 Merge pull request #17424 from RasmusWL/active-threat-model-source
Go/Java/C#: Rename `ThreatModelFlowSource` to `ActiveThreatModelSource`
2024-09-26 13:08:17 +02:00
Owen Mansel-Chan
ea4f9cad3c Mark some test results as SPURIOUS 2024-09-24 22:04:50 +01:00
Chris Smowton
d673d24ca6 Revise notation to more closely resemble real Go 2024-09-24 17:22:26 +01:00
Chris Smowton
11755482e4 Update test expectation (now signature types pretty-print indicating if they are variadic) 2024-09-24 17:18:10 +01:00
Owen Mansel-Chan
73209638e3 Improve comments in test library 2024-09-24 16:41:10 +01:00
Owen Mansel-Chan
b0caabac86 Also update QL tests 2024-09-24 16:25:55 +01:00
Owen Mansel-Chan
6e428d5083 Fix bug where some methods were inappropriately promoted 2024-09-24 16:25:53 +01:00
Owen Mansel-Chan
0255edf524 Remove tests for sources and sinks
This is redundant given that we test for paths, and for a path
we need the source, step and sink methods to be modeled.
2024-09-24 16:25:49 +01:00
Owen Mansel-Chan
afa4b6dd4a Make paths test an inline expectations test 2024-09-24 16:23:33 +01:00
Owen Mansel-Chan
5490f3a957 Add tests for interface embedding interface 2024-09-24 16:23:31 +01:00
Owen Mansel-Chan
279800ea62 Use shorter naming scheme for types 2024-09-24 16:23:26 +01:00
Tom Hvitved
300fdc344d Go: Update expected test output 2024-09-24 14:21:42 +02:00
Owen Mansel-Chan
6a67bd52a9 Add tests for MaD inheritance 2024-09-24 13:21:05 +01:00
Rasmus Wriedt Larsen
63c3a71d95 Merge branch 'main' into active-threat-model-source 2024-09-23 11:18:14 +02:00
Owen Mansel-Chan
ded52ccb8e Fix test expectations including double space 2024-09-19 11:01:38 +01:00
Chris Smowton
0d0c94375d Adjust test expectations 2024-09-17 17:27:04 +01:00
Chris Smowton
2d5cbfd4c9 Elaborate comments 2024-09-17 17:18:48 +01:00
Chris Smowton
41726924e0 Update expectations 2024-09-17 17:02:47 +01:00
Chris Smowton
a803d3fb26 Add comments explaining tests 2024-09-17 17:02:46 +01:00
Chris Smowton
09015df8a4 Format 2024-09-17 17:02:45 +01:00
Chris Smowton
992b3c74fc Add data-flow tests for aliasing 2024-09-17 17:02:43 +01:00
Dave Bartolomeo
d6a7c87696 Update test expectations after merge 2024-09-15 13:42:46 +00:00
Dave Bartolomeo
485fc04029 Initial merge from main 2024-09-15 08:55:31 -04:00
Rasmus Wriedt Larsen
8c10155eb7 mass rename to ActiveThreatModelSource 2024-09-12 10:16:55 +02:00
Owen Mansel-Chan
13f8488148 Undo spurious test changes
The go libraries on my local computer seem to have
slightly different go libraries for some reason.
2024-09-10 23:50:33 +01:00
Owen Mansel-Chan
84c41744c1 Include type parameter's index in its label 2024-09-10 16:52:44 +01:00
Owen Mansel-Chan
9aafcbc1e3 Add test for multiple anonymous type parameters 2024-09-10 16:40:53 +01:00
Michael B. Gale
d1b311f11f Merge pull request #17358 from github/mbg/go/1.23-transparent-aliases
Go: Support 1.23 (Transparent aliases)
2024-09-06 10:46:41 +01:00
Michael B. Gale
6ef5063ff0 Go: Format Aliases.ql 2024-09-05 21:12:44 +01:00
Michael B. Gale
195f37267e Go: Accept new test results 2024-09-05 21:12:44 +01:00
Michael B. Gale
8380d71b01 Go: Add test for AliasType extraction 2024-09-05 21:12:43 +01:00
Michael B. Gale
c8e732468a Go: Update frontend error messages for Go 1.23 2024-09-05 21:12:40 +01:00
Chris Smowton
fe9d879e37 Prettify tests 2024-09-04 22:33:21 +01:00
Chris Smowton
4c5344d62a Accept test suggestions
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2024-09-04 22:30:17 +01:00