Commit Graph

827 Commits

Author SHA1 Message Date
Owen Mansel-Chan
3c4b5202e3 Fix type aliases for instantiated generic types 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
8477053c90 Test calling generic functions from other files 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
7f1f428b41 Remove invalid code in test
"type declarations inside generic functions are not currently supported"
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
ba147e8661 Test calls through variables
The tests which involve a flow through a receiver with a non-trivial access path
currently don't give the right result. This should be
fixed in a follow-up issue.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
5257c4ab45 Add control flow test 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
7a7ca619b3 Add data flow tests for generic structs, methods and functions 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
25b91d8155 Update tests 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
1da5399652 Fix obvious test failures 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4d9937d1c6 Add tests 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
62489e1afd Fix viableCallable for function variables 2022-04-21 11:32:08 +01:00
Owen Mansel-Chan
69c9099a24 Look for callees through function variables 2022-04-21 11:32:07 +01:00
Owen Mansel-Chan
373017ab9d Add tests for callees through function variables 2022-04-21 11:32:07 +01:00
Owen Mansel-Chan
f9f21e9891 Integer conversion should ignore type assertions 2022-04-12 10:58:07 +01:00
Owen Mansel-Chan
880afea959 Pretty-print empty interface without double space 2022-04-08 06:09:56 +01:00
Chris Smowton
e8084233b8 Treat path.Clean and filepath.Clean alike re: tainted path sanitization 2022-03-08 16:42:59 +00:00
Chris Smowton
106ee5b8a2 Merge pull request #696 from asgerf/asgerf/dot-separated-access-paths
Go: Switch to dot-separated access paths in summary specs
2022-02-22 15:34:27 +00:00
Owen Mansel-Chan
980c27423a Merge pull request #681 from owen-mc/new-query/wrapped-error-always-nil
Add query "Wrapped error always nil"
2022-02-22 12:42:16 +00:00
Owen Mansel-Chan
0cd5e520aa Update expected alert message 2022-02-22 11:14:19 +00:00
Asger Feldthaus
cb38df5980 Go: rewrite access paths to dot-style 2022-02-21 14:56:54 +01:00
Asger Feldthaus
620bdf22c2 Go: add new sink to completetest.ql as well 2022-02-11 09:44:27 +01:00
Asger Feldthaus
66545dbe41 Go: fix parsing of n1..n2 in parseConstantOrRange 2022-02-11 08:35:18 +01:00
Asger Feldthaus
a26bfb0926 Go: add test with Argument[0..2] spec 2022-02-11 08:34:31 +01:00
Owen Mansel-Chan
9b61ed9578 Add query "Wrapped error always nil" 2022-02-10 13:25:19 +00:00
Chris Smowton
de2ed83b55 Note that filepath.Clean("/" + e) is a sanitizer against path traversal attacks. 2022-01-28 19:32:58 +00:00
Andrew Eisenberg
9e0580da32 Add new groups for examples packs
Will make it easier to avoid publishing them.
2022-01-26 14:47:46 -08:00
Chris Smowton
8111fbb69b Delete m 2022-01-20 10:57:11 +00:00
Owen Mansel-Chan
85319b2dbf Add tests for tainted path sanitizers and sanitizer guards 2022-01-19 09:49:15 +00:00
Chris Smowton
749698759a Note that the %q format directive escapes newlines, and therefore prevents log injection 2022-01-05 16:04:20 +00:00
Chris Smowton
5760841812 Merge pull request #647 from smowton/smowton/admin/not-all-you-fmt-is-log
Declassify fmt.Fprintf as a log sink
2022-01-05 14:09:55 +00:00
Erik Krogh Kristensen
afe7ee17a0 run the use-set-literals patch 2021-12-20 17:55:19 +01:00
Chris Smowton
92d3da5e56 Declassify fmt.Fprintf as a log sink
In future we could try harder to find out whether you're Fprintf'ing to stdout, a file named xyz.log etc, but for now this causes Fprintf'ing to an HTTP writer to be mistaken for log-injection rather than just XSS.
2021-12-17 17:07:58 +00:00
Owen Mansel-Chan
ec3dd1e1c0 Revert "Update tests for no flow through receivers when no function body"
This reverts commit 06f889fce6.
2021-12-16 19:35:54 +00:00
Chris Smowton
ede57b6527 Merge pull request #637 from smowton/smowton/fix/log-injection-sanitizers
Fix sanitization by strings.Replace[All] in go/unsafe-quoting and go/log-injection
2021-12-16 12:28:40 +00:00
Chris Smowton
9de1532735 Add log-injection test using strings.ReplaceAll 2021-12-15 15:35:14 +00:00
Chris Smowton
c2b42ce091 Fix sanitization by strings.Replace[All] in go/unsafe-quoting and go/log-injection 2021-12-14 12:37:18 +00:00
Owen Mansel-Chan
6a2a8298dd Add missing tests for DatabaseSql function models 2021-12-13 14:18:46 -05:00
Chris Smowton
9309abf8cd Merge pull request #574 from sauyon/dataflow-update
Update dataflow libraries and add support for CSV summary flow
2021-12-13 11:28:28 +00:00
Andrew Eisenberg
3cc48fea6a Merge pull request #622 from github/post-release/v2.7.3
Post release/v2.7.3
2021-12-10 10:00:11 -08:00
Owen Mansel-Chan
06f889fce6 Update tests for no flow through receivers when no function body
This branch originally included a commit to enable flow through receivers
when there is no function body. This was dropped, to be pursued later.
2021-12-08 16:03:18 -05:00
Owen Mansel-Chan
88e7c44a6d Update expected test results with extra nodes 2021-12-08 15:28:28 -05:00
Owen Mansel-Chan
16fdb9aa11 Do not test ReturnValue as input for sink
The documentation in ExternalFlow.qll does not specify
that "ReturnValue" can be used as the input column.
2021-12-08 11:20:34 -05:00
Chris Smowton
3cf1459c4f Revert getACallee type change 2021-12-08 11:20:33 -05:00
Owen Mansel-Chan
5ec0b09160 Diasble clearing content and add test for it 2021-12-08 11:20:32 -05:00
Owen Mansel-Chan
e940a53cc6 Test models of flow through fields 2021-12-08 11:20:32 -05:00
Owen Mansel-Chan
d717734820 Do not allow "Argument" on its own 2021-12-08 11:20:30 -05:00
Owen Mansel-Chan
12058a2621 Fix containerStoreStep and containerReadStep 2021-12-08 11:20:29 -05:00
Owen Mansel-Chan
ab8096b717 Add tests for more content types (Element, MapKey, MapValue) 2021-12-08 11:20:28 -05:00
Owen Mansel-Chan
f375553933 Add variadic functions test for function models 2021-12-08 11:20:27 -05:00
Owen Mansel-Chan
b75def62fe Add variadic functions test for external flow 2021-12-08 11:20:27 -05:00
Owen Mansel-Chan
d9848fe515 Add more tests for variadic functions 2021-12-08 11:20:27 -05:00