Skip to content

Commit 4191b07

Browse files
authored
Merge branch 'github:main' into amammad-ruby-bombs
2 parents 37af588 + 3a9c34c commit 4191b07

File tree

3,634 files changed

+159251
-126143
lines changed

Some content is hidden

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

3,634 files changed

+159251
-126143
lines changed

.bazelrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
build --repo_env=CC=clang --repo_env=CXX=clang++ --cxxopt="-std=c++20"
1+
common --enable_platform_specific_config
2+
3+
build --repo_env=CC=clang --repo_env=CXX=clang++
4+
5+
build:linux --cxxopt=-std=c++20
6+
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
7+
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
28

39
try-import %workspace%/local.bazelrc

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.1.2
1+
6.3.1
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Check implicit this warnings"
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- "**qlpack.yml"
8+
branches:
9+
- main
10+
- "rc/*"
11+
12+
jobs:
13+
check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Check that implicit this warnings is enabled for all packs
18+
shell: bash
19+
run: |
20+
EXIT_CODE=0
21+
packs="$(find . -iname 'qlpack.yml')"
22+
for pack_file in ${packs}; do
23+
option="$(yq '.warnOnImplicitThis' ${pack_file})"
24+
if [ "${option}" != "true" ]; then
25+
echo "::error file=${pack_file}::warnOnImplicitThis property must be set to 'true' for pack ${pack_file}"
26+
EXIT_CODE=1
27+
fi
28+
done
29+
exit "${EXIT_CODE}"

.github/workflows/go-tests-other-os.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ on:
77
- .github/workflows/go-tests-other-os.yml
88
- .github/actions/**
99
- codeql-workspace.yml
10+
env:
11+
GO_VERSION: '~1.21.0'
1012
jobs:
1113
test-mac:
1214
name: Test MacOS
1315
runs-on: macos-latest
1416
steps:
15-
- name: Set up Go 1.20
17+
- name: Set up Go ${{ env.GO_VERSION }}
1618
uses: actions/setup-go@v4
1719
with:
18-
go-version: '1.20'
20+
go-version: ${{ env.GO_VERSION }}
1921
id: go
2022

2123
- name: Check out code
@@ -47,10 +49,10 @@ jobs:
4749
name: Test Windows
4850
runs-on: windows-latest-xl
4951
steps:
50-
- name: Set up Go 1.20
52+
- name: Set up Go ${{ env.GO_VERSION }}
5153
uses: actions/setup-go@v4
5254
with:
53-
go-version: '1.20'
55+
go-version: ${{ env.GO_VERSION }}
5456
id: go
5557

5658
- name: Check out code

.github/workflows/go-tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ on:
1515
- .github/workflows/go-tests.yml
1616
- .github/actions/**
1717
- codeql-workspace.yml
18+
env:
19+
GO_VERSION: '~1.21.0'
1820
jobs:
1921
test-linux:
2022
name: Test Linux (Ubuntu)
2123
runs-on: ubuntu-latest-xl
2224
steps:
23-
- name: Set up Go 1.20
25+
- name: Set up Go ${{ env.GO_VERSION }}
2426
uses: actions/setup-go@v4
2527
with:
26-
go-version: '1.20'
28+
go-version: ${{ env.GO_VERSION }}
2729
id: go
2830

2931
- name: Check out code

.github/workflows/ruby-qltest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
pull_request:
1515
paths:
1616
- "ruby/**"
17+
- "shared/**"
1718
- .github/workflows/ruby-qltest.yml
1819
- .github/actions/fetch-codeql/action.yml
1920
- codeql-workspace.yml

.pre-commit-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ repos:
55
rev: v3.2.0
66
hooks:
77
- id: trailing-whitespace
8-
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)
8+
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)|.*\.patch
99
- id: end-of-file-fixer
10-
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)
10+
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)|.*\.patch
1111

1212
- repo: https://github.com/pre-commit/mirrors-clang-format
1313
rev: v13.0.1
@@ -21,6 +21,11 @@ repos:
2121
- id: autopep8
2222
files: ^misc/codegen/.*\.py
2323

24+
- repo: https://github.com/warchant/pre-commit-buildifier
25+
rev: 0.0.2
26+
hooks:
27+
- id: buildifier
28+
2429
- repo: local
2530
hooks:
2631
- id: codeql-format

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ If you have an idea for a query that you would like to share with other CodeQL u
1414

1515
1. **Directory structure**
1616

17-
There are six language-specific query directories in this repository:
17+
There are eight language-specific query directories in this repository:
1818

1919
* C/C++: `cpp/ql/src`
2020
* C#: `csharp/ql/src`
21-
* Java: `java/ql/src`
21+
* Go: `go/ql/src`
22+
* Java/Kotlin: `java/ql/src`
2223
* JavaScript: `javascript/ql/src`
2324
* Python: `python/ql/src`
2425
* Ruby: `ruby/ql/src`
26+
* Swift: `swift/ql/src`
2527

2628
Each language-specific directory contains further subdirectories that group queries based on their `@tags` or purpose.
2729
- Experimental queries and libraries are stored in the `experimental` subdirectory within each language-specific directory in the [CodeQL repository](https://github.com/github/codeql). For example, experimental Java queries and libraries are stored in `java/ql/src/experimental` and any corresponding tests in `java/ql/test/experimental`.

codeql-workspace.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ provide:
44
- "*/ql/test/qlpack.yml"
55
- "*/ql/examples/qlpack.yml"
66
- "*/ql/consistency-queries/qlpack.yml"
7+
- "*/ql/automodel/src/qlpack.yml"
8+
- "*/ql/automodel/test/qlpack.yml"
79
- "shared/*/qlpack.yml"
810
- "cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml"
911
- "go/ql/config/legacy-support/qlpack.yml"

config/identical-files.json

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,4 @@
11
{
2-
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift": [
3-
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlow.qll",
4-
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlow.qll",
5-
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlow.qll",
6-
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlow.qll",
7-
"go/ql/lib/semmle/go/dataflow/internal/DataFlow.qll",
8-
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlow.qll",
9-
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlow.qll",
10-
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlow.qll"
11-
],
12-
"DataFlowImpl Java/C++/C#/Go/Python/Ruby/Swift": [
13-
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll",
14-
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll",
15-
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll",
16-
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll",
17-
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl.qll",
18-
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll",
19-
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll",
20-
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll"
21-
],
222
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift Legacy Configuration": [
233
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll",
244
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll",
@@ -42,7 +22,6 @@
4222
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll",
4323
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll",
4424
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll",
45-
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImplForStringsNewReplacer.qll",
4625
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll",
4726
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll",
4827
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll",
@@ -53,26 +32,6 @@
5332
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForPathname.qll",
5433
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll"
5534
],
56-
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift Common": [
57-
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll",
58-
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll",
59-
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll",
60-
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll",
61-
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImplCommon.qll",
62-
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplCommon.qll",
63-
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplCommon.qll",
64-
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImplCommon.qll"
65-
],
66-
"TaintTracking Java/C++/C#/Go/Python/Ruby/Swift": [
67-
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTracking.qll",
68-
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTracking.qll",
69-
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/tainttracking1/TaintTracking.qll",
70-
"go/ql/lib/semmle/go/dataflow/internal/tainttracking1/TaintTracking.qll",
71-
"java/ql/lib/semmle/code/java/dataflow/internal/tainttracking1/TaintTracking.qll",
72-
"python/ql/lib/semmle/python/dataflow/new/internal/tainttracking1/TaintTracking.qll",
73-
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTracking.qll",
74-
"swift/ql/lib/codeql/swift/dataflow/internal/tainttracking1/TaintTracking.qll"
75-
],
7635
"TaintTracking Legacy Configuration Java/C++/C#/Go/Python/Ruby/Swift": [
7736
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
7837
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll",
@@ -96,15 +55,6 @@
9655
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
9756
"swift/ql/lib/codeql/swift/dataflow/internal/tainttracking1/TaintTrackingImpl.qll"
9857
],
99-
"DataFlow Java/C++/C#/Python/Ruby/Swift Consistency checks": [
100-
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll",
101-
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll",
102-
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll",
103-
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll",
104-
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll",
105-
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplConsistency.qll",
106-
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImplConsistency.qll"
107-
],
10858
"DataFlow Java/C#/Go/Ruby/Python/Swift Flow Summaries": [
10959
"java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll",
11060
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll",
@@ -514,15 +464,14 @@
514464
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll",
515465
"swift/ql/lib/codeql/swift/security/internal/SensitiveDataHeuristics.qll"
516466
],
517-
"CFG": [
518-
"csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImplShared.qll",
519-
"ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImplShared.qll",
520-
"swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImplShared.qll"
521-
],
522467
"TypeTracker": [
523468
"python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll",
524469
"ruby/ql/lib/codeql/ruby/typetracking/TypeTracker.qll"
525470
],
471+
"SummaryTypeTracker": [
472+
"python/ql/lib/semmle/python/dataflow/new/internal/SummaryTypeTracker.qll",
473+
"ruby/ql/lib/codeql/ruby/typetracking/internal/SummaryTypeTracker.qll"
474+
],
526475
"AccessPathSyntax": [
527476
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/AccessPathSyntax.qll",
528477
"go/ql/lib/semmle/go/dataflow/internal/AccessPathSyntax.qll",
@@ -598,5 +547,9 @@
598547
"EncryptionKeySizes Python/Java": [
599548
"python/ql/lib/semmle/python/security/internal/EncryptionKeySizes.qll",
600549
"java/ql/lib/semmle/code/java/security/internal/EncryptionKeySizes.qll"
550+
],
551+
"Python model summaries test extension": [
552+
"python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml",
553+
"python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml"
601554
]
602-
}
555+
}

0 commit comments

Comments
 (0)