Skip to content

Commit 7bc16a3

Browse files
author
Dilan
committed
Merge tag 'codeql-cli/latest'
Compatible with the latest released version of the CodeQL CLI
2 parents 471d467 + dc20b0d commit 7bc16a3

File tree

1,059 files changed

+27601
-18107
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,059 files changed

+27601
-18107
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.1.2
1+
7.2.1

.devcontainer/swift/root.sh

100644100755
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,26 @@ set -xe
33
BAZELISK_VERSION=v1.12.0
44
BAZELISK_DOWNLOAD_SHA=6b0bcb2ea15bca16fffabe6fda75803440375354c085480fe361d2cbf32501db
55

6+
# install git lfs apt source
7+
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
8+
9+
# install gh apt source
10+
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
11+
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
12+
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
13+
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
14+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
15+
616
apt-get update
717
export DEBIAN_FRONTEND=noninteractive
818
apt-get -y install --no-install-recommends \
919
zlib1g-dev \
1020
uuid-dev \
1121
python3-distutils \
1222
python3-pip \
13-
bash-completion
23+
bash-completion \
24+
git-lfs \
25+
gh
1426

1527
# Install Bazel
1628
curl -fSsL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-linux-amd64

.devcontainer/swift/user.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
set -xe
22

3+
git lfs install
4+
35
# add the workspace to the codeql search path
46
mkdir -p /home/vscode/.config/codeql
57
echo "--search-path /workspaces/codeql" > /home/vscode/.config/codeql/config

.github/workflows/compile-queries.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
key: all-queries
3030
- name: check formatting
3131
run: find shared */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
32+
- name: Omit DatabaseQualityDiagnostics.ql from compile checking # Remove me once CodeQL 2.18.0 is released!
33+
run: mv java/ql/src/Telemetry/DatabaseQualityDiagnostics.ql{,.hidden}
3234
- name: compile queries - check-only
3335
# run with --check-only if running in a PR (github.sha != main)
3436
if : ${{ github.event_name == 'pull_request' }}
@@ -39,3 +41,6 @@ jobs:
3941
if : ${{ github.event_name != 'pull_request' }}
4042
shell: bash
4143
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500
44+
- name: Restore DatabaseQualityDiagnostics.ql after compile checking # Remove me once CodeQL 2.18.0 is released
45+
run: mv java/ql/src/Telemetry/DatabaseQualityDiagnostics.ql{.hidden,}
46+

.github/workflows/ruby-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- .github/workflows/ruby-build.yml
88
- .github/actions/fetch-codeql/action.yml
99
- codeql-workspace.yml
10+
- "shared/tree-sitter-extractor/**"
1011
branches:
1112
- main
1213
- "rc/*"
@@ -16,6 +17,7 @@ on:
1617
- .github/workflows/ruby-build.yml
1718
- .github/actions/fetch-codeql/action.yml
1819
- codeql-workspace.yml
20+
- "shared/tree-sitter-extractor/**"
1921
branches:
2022
- main
2123
- "rc/*"

MODULE.bazel

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,45 @@ local_path_override(
1313

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

16-
bazel_dep(name = "platforms", version = "0.0.9")
17-
bazel_dep(name = "rules_go", version = "0.47.0")
16+
bazel_dep(name = "platforms", version = "0.0.10")
17+
bazel_dep(name = "rules_go", version = "0.48.0")
1818
bazel_dep(name = "rules_pkg", version = "0.10.1")
19-
bazel_dep(name = "rules_nodejs", version = "6.0.3")
20-
bazel_dep(name = "rules_python", version = "0.31.0")
21-
bazel_dep(name = "bazel_skylib", version = "1.5.0")
19+
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
20+
bazel_dep(name = "rules_python", version = "0.32.2")
21+
bazel_dep(name = "bazel_skylib", version = "1.6.1")
2222
bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "absl")
2323
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
2424
bazel_dep(name = "fmt", version = "10.0.0")
2525
bazel_dep(name = "rules_kotlin", version = "1.9.4-codeql.1")
26-
bazel_dep(name = "gazelle", version = "0.36.0")
26+
bazel_dep(name = "gazelle", version = "0.37.0")
2727
bazel_dep(name = "rules_dotnet", version = "0.15.1")
2828
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
29+
bazel_dep(name = "rules_rust", version = "0.46.0")
2930

3031
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
3132

33+
crate = use_extension(
34+
"@rules_rust//crate_universe:extension.bzl",
35+
"crate",
36+
)
37+
crate.from_cargo(
38+
name = "py_deps",
39+
cargo_lockfile = "//python/extractor/tsg-python:Cargo.lock",
40+
manifests = [
41+
"//python/extractor/tsg-python:Cargo.toml",
42+
"//python/extractor/tsg-python/tsp:Cargo.toml",
43+
],
44+
)
45+
crate.from_cargo(
46+
name = "ruby_deps",
47+
cargo_lockfile = "//ruby/extractor:Cargo.lock",
48+
manifests = [
49+
"//ruby/extractor:Cargo.toml",
50+
"//ruby/extractor/codeql-extractor-fake-crate:Cargo.toml",
51+
],
52+
)
53+
use_repo(crate, "py_deps", "ruby_deps")
54+
3255
dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
3356
dotnet.toolchain(dotnet_version = "8.0.101")
3457
use_repo(dotnet, "dotnet_toolchains")
@@ -62,6 +85,10 @@ use_repo(
6285
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
6386
node.toolchain(
6487
name = "nodejs",
88+
node_urls = [
89+
"https://nodejs.org/dist/v{version}/{filename}",
90+
"https://mirrors.dotsrc.org/nodejs/release/v{version}/{filename}",
91+
],
6592
node_version = "18.15.0",
6693
)
6794
use_repo(node, "nodejs", "nodejs_toolchains")

config/identical-files.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@
6161
"java/ql/src/utils/modelgenerator/internal/CaptureModels.qll",
6262
"csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll"
6363
],
64-
"Model as Data Generation Java/C# - CaptureModelsPrinting": [
65-
"java/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll",
66-
"csharp/ql/src/utils/modelgenerator/internal/CaptureModelsPrinting.qll"
67-
],
6864
"Sign Java/C#": [
6965
"java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/Sign.qll",
7066
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/Sign.qll"
@@ -185,11 +181,6 @@
185181
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysisImports.qll",
186182
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysisImports.qll"
187183
],
188-
"C++ IR ValueNumberingImports": [
189-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/internal/ValueNumberingImports.qll",
190-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll",
191-
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/internal/ValueNumberingImports.qll"
192-
],
193184
"IR SSA SSAConstruction": [
194185
"cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll",
195186
"cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll"

cpp/ql/lib/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 1.2.0
2+
3+
### New Features
4+
5+
* The syntax for models-as-data rows has been extended to make it easier to select sources, sinks, and summaries that involve templated functions and classes. Additionally, the syntax has also been extended to make it easier to specify models with arbitrary levels of indirection. See `dataflow/ExternalFlow.qll` for the updated documentation and specification for the model format.
6+
* It is now possible to extend the classes `AllocationFunction` and `DeallocationFunction` via data extensions. Extensions of these classes should be added to the `lib/ext/allocation` and `lib/ext/deallocation` directories respectively.
7+
8+
### Minor Analysis Improvements
9+
10+
* The queries "Potential double free" (`cpp/double-free`) and "Potential use after free" (`cpp/use-after-free`) now produce fewer false positives.
11+
* The "Guards" library (`semmle.code.cpp.controlflow.Guards`) now also infers guards from calls to the builtin operation `__builtin_expect`. As a result, some queries may produce fewer false positives.
12+
113
## 1.1.1
214

315
No user-facing changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## 1.2.0
2+
3+
### New Features
4+
5+
* The syntax for models-as-data rows has been extended to make it easier to select sources, sinks, and summaries that involve templated functions and classes. Additionally, the syntax has also been extended to make it easier to specify models with arbitrary levels of indirection. See `dataflow/ExternalFlow.qll` for the updated documentation and specification for the model format.
6+
* It is now possible to extend the classes `AllocationFunction` and `DeallocationFunction` via data extensions. Extensions of these classes should be added to the `lib/ext/allocation` and `lib/ext/deallocation` directories respectively.
7+
8+
### Minor Analysis Improvements
9+
10+
* The queries "Potential double free" (`cpp/double-free`) and "Potential use after free" (`cpp/use-after-free`) now produce fewer false positives.
11+
* The "Guards" library (`semmle.code.cpp.controlflow.Guards`) now also infers guards from calls to the builtin operation `__builtin_expect`. As a result, some queries may produce fewer false positives.

cpp/ql/lib/codeql-pack.release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 1.1.1
2+
lastReleaseVersion: 1.2.0

0 commit comments

Comments
 (0)