Skip to content

Commit ab23d0a

Browse files
Merge branch 'main' into python-promote-header-injection
2 parents efda63d + 7b89c6c commit ab23d0a

File tree

814 files changed

+15463
-12597
lines changed

Some content is hidden

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

814 files changed

+15463
-12597
lines changed

.bazelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,11 @@ build:linux --cxxopt=-std=c++20
1414
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
1515
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
1616

17+
# this requires developer mode, but is required to have pack installer functioning
18+
startup --windows_enable_symlinks
19+
common --enable_runfiles
20+
21+
common --registry=file:///%workspace%/misc/bazel/registry
22+
common --registry=https://bcr.bazel.build
23+
1724
try-import %workspace%/local.bazelrc

.bazelrc.internal

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# this file should contain bazel settings required to build things from `semmle-code`
2+
3+
common --registry=file:///%workspace%/ql/misc/bazel/registry
4+
common --registry=https://bcr.bazel.build

.github/workflows/buildifier.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check bazel formatting
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "**.bazel"
7+
- "**.bzl"
8+
branches:
9+
- main
10+
- "rc/*"
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
check:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Check bazel formatting
22+
uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
23+
with:
24+
extra_args: >
25+
buildifier --all-files 2>&1 ||
26+
(
27+
echo -e "In order to format all bazel files, please run:\n bazel run //misc/bazel:buildifier"; exit 1
28+
)

.lfsconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[lfs]
2+
# codeql is publicly forked by many users, and we don't want any LFS file polluting their working
3+
# copies. We therefore exclude everything by default.
4+
# For files required by bazel builds, use rules in `misc/bazel/lfs.bzl` to download them on demand.
5+
fetchinclude = /nothing

.pre-commit-config.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,22 @@ repos:
2020
- id: autopep8
2121
files: ^misc/codegen/.*\.py
2222

23-
- repo: https://github.com/warchant/pre-commit-buildifier
24-
rev: 0.0.2
23+
- repo: local
2524
hooks:
2625
- id: buildifier
26+
name: Format bazel files
27+
files: \.(bazel|bzl)
28+
language: system
29+
entry: bazel run //misc/bazel:buildifier
30+
pass_filenames: false
31+
32+
- id: go-gen
33+
name: Check checked in generated files in go
34+
files: ^go/.*
35+
language: system
36+
entry: bazel run //go:gen
37+
pass_filenames: false
2738

28-
- repo: local
29-
hooks:
3039
- id: codeql-format
3140
name: Fix QL file formatting
3241
files: \.qll?$

MODULE.bazel

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ 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.8")
16+
bazel_dep(name = "platforms", version = "0.0.9")
17+
bazel_dep(name = "rules_go", version = "0.47.0")
1718
bazel_dep(name = "rules_pkg", version = "0.10.1")
1819
bazel_dep(name = "rules_nodejs", version = "6.0.3")
1920
bazel_dep(name = "rules_python", version = "0.31.0")
2021
bazel_dep(name = "bazel_skylib", version = "1.5.0")
2122
bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "absl")
2223
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
2324
bazel_dep(name = "fmt", version = "10.0.0")
25+
bazel_dep(name = "gazelle", version = "0.36.0")
26+
27+
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
2428

2529
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
2630
pip.parse(
@@ -50,6 +54,9 @@ node.toolchain(
5054
)
5155
use_repo(node, "nodejs", "nodejs_toolchains")
5256

57+
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
58+
go_sdk.download(version = "1.22.2")
59+
5360
register_toolchains(
5461
"@nodejs_toolchains//:all",
5562
)

config/identical-files.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
"java/ql/lib/semmle/code/java/security/internal/EncryptionKeySizes.qll"
363363
],
364364
"Python model summaries test extension": [
365-
"python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml",
366-
"python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml"
365+
"python/ql/test/library-tests/dataflow/model-summaries/InlineTaintTest.ext.yml",
366+
"python/ql/test/library-tests/dataflow/model-summaries/NormalDataflowTest.ext.yml"
367367
]
368-
}
368+
}

cpp/ql/lib/CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
## 0.13.0
2+
3+
### Breaking Changes
4+
5+
* Deleted the deprecated `GlobalValueNumberingImpl.qll` implementation.
6+
7+
### New Features
8+
9+
* Models-as-Data support has been added for C/C++. This feature allows flow sources, sinks and summaries to be expressed in compact strings as an alternative to modelling each source / sink / summary with explicit QL. See `dataflow/ExternalFlow.qll` for documentation and specification of the model format, and `models/implementations/ZMQ.qll` for a simple example of models. Importing models from `.yml` is not yet supported.
10+
11+
### Minor Analysis Improvements
12+
13+
* Source models have been added for the standard library function `getc` (and variations).
14+
* Source, sink and flow models for the ZeroMQ (ZMQ) networking library have been added.
15+
* Parameters of functions without definitions now have `ParameterNode`s.
16+
* The alias analysis used internally by various libraries has been improved to answer alias questions more conservatively. As a result, some queries may report fewer false positives.
17+
118
## 0.12.11
219

320
No user-facing changes.

cpp/ql/lib/change-notes/2024-04-05-sound-ir.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

cpp/ql/lib/change-notes/2024-04-18-param-nodes.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)