Commit Graph

1867 Commits

Author SHA1 Message Date
erik-krogh
9aeebc6f39 update the QHelp to add a "--" example 2024-05-16 19:49:22 +02:00
Owen Mansel-Chan
2dd42f7aa5 Merge pull request #16509 from owen-mc/go/fix-missing-underlying-types
Go: make two barriers recognise named types whose underlying types are integer types
2024-05-16 12:41:42 +01:00
Owen Mansel-Chan
8cc118f781 Add change note 2024-05-16 11:16:54 +01:00
Owen Mansel-Chan
b008f98782 Fix missing getUnderlyingType() calls
In both cases we also care about named types whose underlying type is
an integer type.
2024-05-16 11:10:15 +01:00
Owen Mansel-Chan
410543f26b Add change note 2024-05-16 10:10:22 +01:00
Owen Mansel-Chan
e71cf0ff1d Use value flow instead of taint flow 2024-05-16 10:10:18 +01:00
Owen Mansel-Chan
5dbb91f508 Merge pull request #16504 from owen-mc/go/allow-array-reads-from-named-types
Go: allow read and store steps from named types
2024-05-16 09:47:54 +01: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
erik-krogh
e2a4c2aa1b move the code samples for the Go command-injection queries to an examples/ folder 2024-05-16 08:54:54 +02:00
Owen Mansel-Chan
6ffa821aa3 Add change note 2024-05-16 00:41:28 +01: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
Michael B. Gale
586e90043a Merge pull request #16462 from github/mbg/go/add-resolve-env-tests
Go: Add tests for `resolve build-environment`
2024-05-15 09:59:52 +01:00
Michael B. Gale
28c8611f93 Go: Add build-environment.expected for linux-only tests 2024-05-15 09:34:28 +01:00
Michael B. Gale
b44ad2d39f Go: Add missing diagnostics.expected file 2024-05-15 09:33:44 +01:00
Michael B. Gale
7e10f212cd Go: Move resolve build-environment test into subdirectory 2024-05-15 08:54:24 +01:00
Michael B. Gale
7cf61ffb18 Go: Add integration test for resolve build-environment 2024-05-15 08:51:54 +01:00
Michael B. Gale
eb2e587637 Go: Add build-environment.expected files 2024-05-15 08:41:31 +01:00
Dave Bartolomeo
b49a61705c Merge pull request #16491 from github/post-release-prep/codeql-cli-2.17.3
Post-release preparation for codeql-cli-2.17.3
2024-05-14 19:33:20 -04:00
github-actions[bot]
32e8b5c667 Post-release preparation for codeql-cli-2.17.3 2024-05-14 21:14:08 +00:00
Owen Mansel-Chan
145873f562 Merge pull request #16413 from owen-mc/go/fix-builtin-models
Go: fix models for built-in functions
2024-05-14 21:03:05 +01:00
github-actions[bot]
100166fa53 Release preparation for version 2.17.3 2024-05-14 19:23:18 +00: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
Chuan-kai Lin
9456eaf5d3 Merge pull request #16420 from github/cklin/go-entities-reorder
Go: Use entities in reorder directives
2024-05-13 10:26:04 -07:00
Erik Krogh Kristensen
0d814e0e20 Merge pull request #16220 from erik-krogh/domainAnc
Go: Add an example specific to domain names in missing-regexp-anchor
2024-05-11 07:52:13 +02: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
e1c85e3581 Fix elementWrite to include flow summaries 2024-05-10 23:40:58 +01:00
Owen Mansel-Chan
8cc9838628 Add change note 2024-05-10 23:40:57 +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
f95ccd242f Remove old-style models of built-in functions 2024-05-10 23:40:54 +01:00
Owen Mansel-Chan
fcdac0aeb0 Add models for min and max built-in functions 2024-05-10 23:40:53 +01:00
Owen Mansel-Chan
1322ce35d6 Add model for built-in function copy 2024-05-10 23:40:53 +01:00
Owen Mansel-Chan
e857eedd4a Fix model for append - it is variadic 2024-05-10 23:40:52 +01:00
Erik Krogh Kristensen
462e564c19 apply suggestion from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2024-05-10 18:59:55 +02:00
Owen Mansel-Chan
674e65e134 Fix test expectations 2024-05-09 16:26:30 +01:00
Owen Mansel-Chan
526204dc43 Merge pull request #16458 from owen-mc/go/fix-mad-for-builtin-functions
Go: fix `hasQualifiedName` and models-as-data for built-in functions
2024-05-09 15:06:07 +01:00
Sarita Iyer
aab5da0435 Merge pull request #16320 from github/subatoi/deprecate-codeql-for-vs-code
[8th May 2024] Add deprecation notices to CodeQL for VS Code documentation
2024-05-08 17:00:42 -04:00
erik-krogh
811c175556 add example for domain names with sub-domains to missing-regexp-anchor 2024-05-08 20:50:43 +02:00
Owen Mansel-Chan
4f10cb5fa0 Local flow tests: do not list summary models
This is so that when we don't change the test results every time we add
a summary model for a built-in function.
2024-05-08 16:13:37 +01:00
Owen Mansel-Chan
57ff30c5f3 Update tests: built-in models now work 2024-05-08 16:07:02 +01:00
Owen Mansel-Chan
1ccea884ff Add change note 2024-05-08 15:37:25 +01:00