Skip to content

Commit 3af408e

Browse files
authored
Merge branch 'main' into mbg/go/old-version-format-is-ok-again
2 parents 0d9a0dd + 7e569b4 commit 3af408e

File tree

2,678 files changed

+148035
-93191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,678 files changed

+148035
-93191
lines changed

.bazelrc

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ common --enable_platform_specific_config
22
# because we use --override_module with `%workspace%`, the lock file is not stable
33
common --lockfile_mode=off
44

5+
# Build release binaries by default, can be overwritten to in local.bazelrc and set to `fastbuild` or `dbg`
6+
build --compilation_mode opt
7+
58
# when building from this repository in isolation, the internal repository will not be found at ..
69
# where `MODULE.bazel` looks for it. The following will get us past the module loading phase, so
710
# that we can build things that do not rely on that

.devcontainer/swift/Dockerfile

-9
This file was deleted.

.devcontainer/swift/devcontainer.json

-25
This file was deleted.

.devcontainer/swift/root.sh

-34
This file was deleted.

.devcontainer/swift/update-codeql.sh

-20
This file was deleted.

.devcontainer/swift/user.sh

-15
This file was deleted.

.github/pull_request_template.md

-14
This file was deleted.

.github/workflows/swift.yml

-6
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ jobs:
4848
steps:
4949
- uses: actions/checkout@v4
5050
- uses: ./swift/actions/build-and-test
51-
build-and-test-linux:
52-
if: github.repository_owner == 'github'
53-
runs-on: ubuntu-22.04
54-
steps:
55-
- uses: actions/checkout@v4
56-
- uses: ./swift/actions/build-and-test
5751
qltests-macos:
5852
if: ${{ github.repository_owner == 'github' && github.event_name == 'pull_request' }}
5953
needs: build-and-test-macos

Cargo.lock

+53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MODULE.bazel

+6-11
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ local_path_override(
1414

1515
# see https://registry.bazel.build/ for a list of available packages
1616

17-
bazel_dep(name = "platforms", version = "0.0.10")
17+
bazel_dep(name = "platforms", version = "0.0.11")
1818
bazel_dep(name = "rules_go", version = "0.50.1")
1919
bazel_dep(name = "rules_pkg", version = "1.0.1")
2020
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
@@ -28,7 +28,7 @@ bazel_dep(name = "rules_kotlin", version = "2.0.0-codeql.1")
2828
bazel_dep(name = "gazelle", version = "0.40.0")
2929
bazel_dep(name = "rules_dotnet", version = "0.17.4")
3030
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
31-
bazel_dep(name = "rules_rust", version = "0.52.2")
31+
bazel_dep(name = "rules_rust", version = "0.57.1")
3232
bazel_dep(name = "zstd", version = "1.5.5.bcr.1")
3333

3434
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
@@ -53,15 +53,6 @@ use_repo(rust, "rust_toolchains")
5353

5454
register_toolchains("@rust_toolchains//:all")
5555

56-
rust_host_tools = use_extension("@rules_rust//rust:extensions.bzl", "rust_host_tools")
57-
58-
# Don't download a second toolchain as host toolchain, make sure this is the same version as above
59-
# The host toolchain is used for vendoring dependencies.
60-
rust_host_tools.host_tools(
61-
edition = RUST_EDITION,
62-
version = RUST_VERSION,
63-
)
64-
6556
# deps for python extractor
6657
# keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh`
6758
py_deps = use_extension("//misc/bazel/3rdparty:py_deps_extension.bzl", "p")
@@ -125,6 +116,7 @@ use_repo(
125116
"vendor__serde_with-3.12.0",
126117
"vendor__stderrlog-0.6.0",
127118
"vendor__syn-2.0.96",
119+
"vendor__toml-0.8.19",
128120
"vendor__tracing-0.1.41",
129121
"vendor__tracing-subscriber-0.3.19",
130122
"vendor__tree-sitter-0.24.6",
@@ -217,6 +209,7 @@ use_repo(
217209
"kotlin-compiler-2.0.0-RC1",
218210
"kotlin-compiler-2.0.20-Beta2",
219211
"kotlin-compiler-2.1.0-Beta1",
212+
"kotlin-compiler-2.1.20-Beta1",
220213
"kotlin-compiler-embeddable-1.5.0",
221214
"kotlin-compiler-embeddable-1.5.10",
222215
"kotlin-compiler-embeddable-1.5.20",
@@ -231,6 +224,7 @@ use_repo(
231224
"kotlin-compiler-embeddable-2.0.0-RC1",
232225
"kotlin-compiler-embeddable-2.0.20-Beta2",
233226
"kotlin-compiler-embeddable-2.1.0-Beta1",
227+
"kotlin-compiler-embeddable-2.1.20-Beta1",
234228
"kotlin-stdlib-1.5.0",
235229
"kotlin-stdlib-1.5.10",
236230
"kotlin-stdlib-1.5.20",
@@ -245,6 +239,7 @@ use_repo(
245239
"kotlin-stdlib-2.0.0-RC1",
246240
"kotlin-stdlib-2.0.20-Beta2",
247241
"kotlin-stdlib-2.1.0-Beta1",
242+
"kotlin-stdlib-2.1.20-Beta1",
248243
)
249244

250245
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")

actions/extractor/tools/autobuild-impl.ps1

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ if (($null -ne $env:LGTM_INDEX_INCLUDE) -or ($null -ne $env:LGTM_INDEX_EXCLUDE)
22
Write-Output 'Path filters set. Passing them through to the JavaScript extractor.'
33
} else {
44
Write-Output 'No path filters set. Using the default filters.'
5+
# Note: We're adding the `reusable_workflows` subdirectories to proactively
6+
# record workflows that were called cross-repo, check them out locally,
7+
# and enable an interprocedural analysis across the workflow files.
8+
# These workflows follow the convention `.github/reusable_workflows/<nwo>/*.ya?ml`
59
$DefaultPathFilters = @(
610
'exclude:**/*',
7-
'include:.github/workflows/**/*.yml',
8-
'include:.github/workflows/**/*.yaml',
11+
'include:.github/workflows/*.yml',
12+
'include:.github/workflows/*.yaml',
13+
'include:.github/reusable_workflows/**/*.yml',
14+
'include:.github/reusable_workflows/**/*.yaml',
915
'include:**/action.yml',
1016
'include:**/action.yaml'
1117
)

actions/extractor/tools/autobuild.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
set -eu
44

5+
# Note: We're adding the `reusable_workflows` subdirectories to proactively
6+
# record workflows that were called cross-repo, check them out locally,
7+
# and enable an interprocedural analysis across the workflow files.
8+
# These workflows follow the convention `.github/reusable_workflows/<nwo>/*.ya?ml`
59
DEFAULT_PATH_FILTERS=$(cat << END
610
exclude:**/*
7-
include:.github/workflows/**/*.yml
8-
include:.github/workflows/**/*.yaml
11+
include:.github/workflows/*.yml
12+
include:.github/workflows/*.yaml
13+
include:.github/reusable_workflows/**/*.yml
14+
include:.github/reusable_workflows/**/*.yaml
915
include:**/action.yml
1016
include:**/action.yaml
1117
END

actions/ql/lib/CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 0.4.2
2+
3+
### Bug Fixes
4+
5+
* Fixed data for vulnerable versions of `actions/download-artifact` and `rlespinasse/github-slug-action` (following GHSA-cxww-7g56-2vh6 and GHSA-6q4m-7476-932w).
6+
* Improved `untrustedGhCommandDataModel` regex for `gh pr view` and Bash taint analysis in GitHub Actions.
7+
8+
## 0.4.1
9+
10+
No user-facing changes.
11+
112
## 0.4.0
213

314
### New Features
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: feature
3+
---
4+
* The "Unpinned tag for a non-immutable Action in workflow" query (`actions/unpinned-tag`) now supports expanding the trusted action owner list using data extensions (`extensible: trustedActionsOwnerDataModel`). If you trust an Action publisher, you can include the owner name/organization in a model pack to add it to the allow list for this query. This addition will prevent security alerts when using unpinned tags for Actions published by that owner. For more information on creating a model pack, see [Creating a CodeQL Model Pack](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/creating-and-working-with-codeql-packs#creating-a-codeql-model-pack).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.4.1
2+
3+
No user-facing changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## 0.4.2
2+
3+
### Bug Fixes
4+
5+
* Fixed data for vulnerable versions of `actions/download-artifact` and `rlespinasse/github-slug-action` (following GHSA-cxww-7g56-2vh6 and GHSA-6q4m-7476-932w).
6+
* Improved `untrustedGhCommandDataModel` regex for `gh pr view` and Bash taint analysis in GitHub Actions.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 0.4.0
2+
lastReleaseVersion: 0.4.2

actions/ql/lib/codeql/actions/Bash.qll

+16-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ class BashShellScript extends ShellScript {
8181
"qstr:" + k + ":" + i + ":" + j + ":" + quotedStr.length() + ":" +
8282
quotedStr.regexpReplaceAll("[^a-zA-Z0-9]", "")
8383
)
84-
)
84+
) and
85+
// Only do this for strings that might otherwise disrupt subsequent parsing
86+
quotedStr.regexpMatch("[\"'].*[$\n\r'\"" + Bash::separator() + "].*[\"']")
8587
}
8688

8789
private predicate rankedQuotedStringReplacements(int i, string old, string new) {
@@ -695,6 +697,19 @@ module Bash {
695697
not varMatchesRegexTest(script, var2, alphaNumericRegex())
696698
)
697699
or
700+
exists(string var2, string value2, string var3, string value3 |
701+
// VAR2=$(cmd)
702+
// VAR3=$VAR2
703+
// echo "FIELD=${VAR3:-default}" >> $GITHUB_ENV (field, file_write_value)
704+
containsCmdSubstitution(value2, cmd) and
705+
script.getAnAssignment(var2, value2) and
706+
containsParameterExpansion(value3, var2, _, _) and
707+
script.getAnAssignment(var3, value3) and
708+
containsParameterExpansion(expr, var3, _, _) and
709+
not varMatchesRegexTest(script, var2, alphaNumericRegex()) and
710+
not varMatchesRegexTest(script, var3, alphaNumericRegex())
711+
)
712+
or
698713
// var reaches the file write directly
699714
// echo "FIELD=$(cmd)" >> $GITHUB_ENV (field, file_write_value)
700715
containsCmdSubstitution(expr, cmd)

0 commit comments

Comments
 (0)