Skip to content

Commit 0628e49

Browse files
author
Dilan
committed
Merge tag 'codeql-cli/latest'
Compatible with the latest released version of the CodeQL CLI
2 parents d76e438 + 975881c commit 0628e49

File tree

1,288 files changed

+64401
-44309
lines changed

Some content is hidden

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

1,288 files changed

+64401
-44309
lines changed

Cargo.lock

Lines changed: 15 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MODULE.bazel

Lines changed: 4 additions & 14 deletions
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")
@@ -96,7 +87,6 @@ use_repo(
9687
"vendor__globset-0.4.15",
9788
"vendor__itertools-0.14.0",
9889
"vendor__lazy_static-1.5.0",
99-
"vendor__log-0.4.22",
10090
"vendor__mustache-0.9.0",
10191
"vendor__num-traits-0.2.19",
10292
"vendor__num_cpus-1.16.0",
@@ -123,10 +113,10 @@ use_repo(
123113
"vendor__serde-1.0.217",
124114
"vendor__serde_json-1.0.135",
125115
"vendor__serde_with-3.12.0",
126-
"vendor__stderrlog-0.6.0",
127116
"vendor__syn-2.0.96",
128117
"vendor__toml-0.8.19",
129118
"vendor__tracing-0.1.41",
119+
"vendor__tracing-flame-0.2.0",
130120
"vendor__tracing-subscriber-0.3.19",
131121
"vendor__tree-sitter-0.24.6",
132122
"vendor__tree-sitter-embedded-template-0.23.2",
@@ -252,7 +242,7 @@ use_repo(
252242
)
253243

254244
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
255-
go_sdk.download(version = "1.23.1")
245+
go_sdk.download(version = "1.24.0")
256246

257247
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
258248
go_deps.from_file(go_mod = "//go/extractor:go.mod")

actions/ql/lib/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.4.3
2+
3+
### New Features
4+
5+
* 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).
6+
17
## 0.4.2
28

39
### Bug Fixes
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## 0.4.3
2+
3+
### New Features
4+
5+
* 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).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 0.4.2
2+
lastReleaseVersion: 0.4.3

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

Lines changed: 3 additions & 1 deletion
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) {

actions/ql/lib/codeql/actions/config/Config.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ predicate vulnerableActionsDataModel(
126126
*/
127127
predicate immutableActionsDataModel(string action) { Extensions::immutableActionsDataModel(action) }
128128

129+
/**
130+
* MaD models for trusted actions owners
131+
* Fields:
132+
* - owner: owner name
133+
*/
134+
predicate trustedActionsOwnerDataModel(string owner) {
135+
Extensions::trustedActionsOwnerDataModel(owner)
136+
}
137+
129138
/**
130139
* MaD models for untrusted git commands
131140
* Fields:

actions/ql/lib/codeql/actions/config/ConfigExtensions.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ extensible predicate vulnerableActionsDataModel(
6363
*/
6464
extensible predicate immutableActionsDataModel(string action);
6565

66+
/**
67+
* Holds for trusted Actions owners.
68+
*/
69+
extensible predicate trustedActionsOwnerDataModel(string owner);
70+
6671
/**
6772
* Holds for git commands that may introduce untrusted data when called on an attacker controlled branch.
6873
*/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extensions:
2+
- addsTo:
3+
pack: codeql/actions-all
4+
extensible: trustedActionsOwnerDataModel
5+
data:
6+
- ["actions"]
7+
- ["github"]
8+
- ["advanced-security"]

actions/ql/lib/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/actions-all
2-
version: 0.4.2
2+
version: 0.4.3
33
library: true
44
warnOnImplicitThis: true
55
dependencies:

0 commit comments

Comments
 (0)