Skip to content

Commit 78dc650

Browse files
authored
Merge branch 'main' into amammad-ruby-bombs
2 parents 2097a00 + b1329fd commit 78dc650

File tree

12,863 files changed

+1161621
-634006
lines changed

Some content is hidden

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

12,863 files changed

+1161621
-634006
lines changed

.bazelrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
common --enable_platform_specific_config
2+
common --enable_bzlmod
3+
# because we use --override_module with `%workspace%`, the lock file is not stable
4+
common --lockfile_mode=off
5+
6+
# when building from this repository in isolation, the internal repository will not be found at ..
7+
# where `MODULE.bazel` looks for it. The following will get us past the module loading phase, so
8+
# that we can build things that do not rely on that
9+
common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
210

311
build --repo_env=CC=clang --repo_env=CXX=clang++
412

513
build:linux --cxxopt=-std=c++20
614
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
715
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
816

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+
924
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

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.3.1
1+
7.1.0

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DisableFormat: true

.gitattributes

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ go/extractor/opencsv/CSVReader.java -text
6767
# for those testing dbscheme files.
6868
*/ql/lib/upgrades/initial/*.dbscheme -text
6969

70-
# Generated test files - these are synced from the standard JavaScript libraries using
71-
# `javascript/ql/experimental/adaptivethreatmodeling/test/update_endpoint_test_files.py`.
72-
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.js linguist-generated=true -merge
73-
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.ts linguist-generated=true -merge
70+
# Auto-generated modeling for Python
71+
python/ql/lib/semmle/python/frameworks/data/internal/subclass-capture/*.yml linguist-generated=true
72+
73+
# auto-generated bazel lock file
74+
ruby/extractor/cargo-bazel-lock.json linguist-generated=true
75+
ruby/extractor/cargo-bazel-lock.json -merge
76+
77+
# auto-generated files for the C# build
78+
csharp/paket.lock linguist-generated=true
79+
# needs eol=crlf, as `paket` touches this file and saves it als crlf
80+
csharp/.paket/Paket.Restore.targets linguist-generated=true eol=crlf

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,26 @@ updates:
1717
ignore:
1818
- dependency-name: '*'
1919
update-types: ['version-update:semver-patch', 'version-update:semver-minor']
20+
21+
- package-ecosystem: "gomod"
22+
directory: "go/extractor"
23+
schedule:
24+
interval: "daily"
25+
allow:
26+
- dependency-name: "golang.org/x/mod"
27+
- dependency-name: "golang.org/x/tools"
28+
groups:
29+
extractor-dependencies:
30+
patterns:
31+
- "golang.org/x/*"
32+
reviewers:
33+
- "github/codeql-go"
34+
35+
- package-ecosystem: "gomod"
36+
directory: "go/ql/test"
37+
schedule:
38+
interval: "monthly"
39+
ignore:
40+
- dependency-name: "*"
41+
reviewers:
42+
- "github/codeql-go"

.github/labeler.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Java:
1515
- change-notes/**/*java.*
1616

1717
JS:
18-
- any: [ 'javascript/**/*', '!javascript/ql/experimental/adaptivethreatmodeling/**/*' ]
18+
- any: [ 'javascript/**/*' ]
1919
- change-notes/**/*javascript*
2020

2121
Kotlin:
2222
- java/kotlin-extractor/**/*
23-
- java/ql/test/kotlin/**/*
23+
- java/ql/test-kotlin*/**/*
2424

2525
Python:
2626
- python/**/*
@@ -46,6 +46,3 @@ documentation:
4646
# Since these are all shared files that need to be synced, just pick _one_ copy of each.
4747
"DataFlow Library":
4848
- "shared/dataflow/**/*"
49-
50-
"ATM":
51-
- javascript/ql/experimental/adaptivethreatmodeling/**/*

.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+
)
Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Check change note
22

3+
permissions:
4+
pull-requests: read
5+
36
on:
47
pull_request_target:
58
types: [labeled, unlabeled, opened, synchronize, reopened, ready_for_review]
@@ -9,26 +12,42 @@ on:
912
- "*/ql/lib/**/*.ql"
1013
- "*/ql/lib/**/*.qll"
1114
- "*/ql/lib/**/*.yml"
15+
- "shared/**/*.ql"
16+
- "shared/**/*.qll"
1217
- "!**/experimental/**"
1318
- "!ql/**"
1419
- ".github/workflows/check-change-note.yml"
1520

1621
jobs:
1722
check-change-note:
23+
env:
24+
REPO: ${{ github.repository }}
25+
PULL_REQUEST_NUMBER: ${{ github.event.number }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1827
runs-on: ubuntu-latest
1928
steps:
29+
2030
- name: Fail if no change note found. To fix, either add one, or add the `no-change-note-required` label.
2131
if: |
2232
github.event.pull_request.draft == false &&
2333
!contains(github.event.pull_request.labels.*.name, 'no-change-note-required')
24-
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2634
run: |
27-
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq 'any(.[].filename ; test("/change-notes/.*[.]md$"))' |
28-
grep true -c
35+
change_note_files=$(gh api "repos/$REPO/pulls/$PULL_REQUEST_NUMBER/files" --paginate --jq '.[].filename | select(test("/change-notes/.*[.]md$"))')
36+
37+
if [ -z "$change_note_files" ]; then
38+
echo "No change note found. Either add one, or add the 'no-change-note-required' label."
39+
exit 1
40+
fi
41+
42+
echo "Change notes found:"
43+
echo "$change_note_files"
44+
2945
- name: Fail if the change note filename doesn't match the expected format. The file name must be of the form 'YYYY-MM-DD.md', 'YYYY-MM-DD-{title}.md', where '{title}' is arbitrary text, or released/x.y.z.md for released change-notes
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3246
run: |
33-
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))] | all(test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$") or test("/change-notes/released/[0-9]*[.][0-9]*[.][0-9]*[.]md$"))' |
34-
grep true -c
47+
bad_change_note_file_names=$(gh api "repos/$REPO/pulls/$PULL_REQUEST_NUMBER/files" --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))][] | select((test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$") or test("/change-notes/released/[0-9]*[.][0-9]*[.][0-9]*[.]md$")) | not)')
48+
49+
if [ -n "$bad_change_note_file_names" ]; then
50+
echo "The following change note file names are invalid:"
51+
echo "$bad_change_note_file_names"
52+
exit 1
53+
fi

.github/workflows/check-implicit-this.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- main
1010
- "rc/*"
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
check:
1417
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)