mirror of
https://github.com/github/codeql.git
synced 2026-06-11 16:01:09 +02:00
Compare commits
1 Commits
python/cla
...
redsun82/r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
840d166efe |
7
.bazelrc
7
.bazelrc
@@ -11,8 +11,6 @@ build --compilation_mode opt
|
|||||||
common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
|
common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
|
||||||
|
|
||||||
build --repo_env=CC=clang --repo_env=CXX=clang++
|
build --repo_env=CC=clang --repo_env=CXX=clang++
|
||||||
# Disable Android SDK auto-detection (we don't use it, and rules_android has Bazel 9 compatibility issues)
|
|
||||||
build --repo_env=ANDROID_HOME=
|
|
||||||
|
|
||||||
# print test output, like sembuild does.
|
# print test output, like sembuild does.
|
||||||
# Set to `errors` if this is too verbose.
|
# Set to `errors` if this is too verbose.
|
||||||
@@ -32,11 +30,8 @@ common --registry=https://bcr.bazel.build
|
|||||||
|
|
||||||
common --@rules_dotnet//dotnet/settings:strict_deps=false
|
common --@rules_dotnet//dotnet/settings:strict_deps=false
|
||||||
|
|
||||||
# we only configure a nightly toolchain
|
|
||||||
common --@rules_rust//rust/toolchain/channel=nightly
|
|
||||||
|
|
||||||
# Reduce this eventually to empty, once we've fixed all our usages of java, and https://github.com/bazel-contrib/rules_go/issues/4193 is fixed
|
# Reduce this eventually to empty, once we've fixed all our usages of java, and https://github.com/bazel-contrib/rules_go/issues/4193 is fixed
|
||||||
common --incompatible_autoload_externally="+@rules_cc,+@rules_java,+@rules_shell"
|
common --incompatible_autoload_externally="+@rules_java,+@rules_shell"
|
||||||
|
|
||||||
build --java_language_version=17
|
build --java_language_version=17
|
||||||
build --tool_java_language_version=17
|
build --tool_java_language_version=17
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
9.0.0
|
8.1.1
|
||||||
|
|||||||
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -82,6 +82,9 @@
|
|||||||
/csharp/paket.main.bzl linguist-generated=true
|
/csharp/paket.main.bzl linguist-generated=true
|
||||||
/csharp/paket.main_extension.bzl linguist-generated=true
|
/csharp/paket.main_extension.bzl linguist-generated=true
|
||||||
|
|
||||||
|
# ripunzip tool
|
||||||
|
/misc/ripunzip/ripunzip-* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|
||||||
# swift prebuilt resources
|
# swift prebuilt resources
|
||||||
/swift/third_party/resources/*.zip filter=lfs diff=lfs merge=lfs -text
|
/swift/third_party/resources/*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
/swift/third_party/resources/*.tar.zst filter=lfs diff=lfs merge=lfs -text
|
/swift/third_party/resources/*.tar.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|||||||
4
.github/copilot-instructions.md
vendored
Normal file
4
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
When reviewing code:
|
||||||
|
* do not review changes in files with `.expected` extension (they are automatically ensured to be correct).
|
||||||
|
* in `.ql` and `.qll` files, do not try to review the code itself as you don't understand the programming language
|
||||||
|
well enough to make comments in these languages. You can still check for typos or comment improvements.
|
||||||
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
@@ -40,10 +40,3 @@ updates:
|
|||||||
- dependency-name: "*"
|
- dependency-name: "*"
|
||||||
reviewers:
|
reviewers:
|
||||||
- "github/codeql-go"
|
- "github/codeql-go"
|
||||||
|
|
||||||
- package-ecosystem: bazel
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
exclude-paths:
|
|
||||||
- "misc/bazel/registry/**"
|
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
applyTo: "**/*.expected"
|
|
||||||
---
|
|
||||||
Ignore these files. These are generated to be correct by running the tests, and should not be edited manually.
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
applyTo: "**/*.ql,**/*.qll"
|
|
||||||
---
|
|
||||||
When reviewing these QL files, do not make any comment on the code itself. You don't understand the QL programming language well enough yet. You can only make comments about the following aspects:
|
|
||||||
* comments (lines starting with `//` or block comments enclosed in `/* ... */`): you can suggest improvements to the clarity of comments, or point out spelling mistakes
|
|
||||||
* typos in identifiers
|
|
||||||
74
.github/workflows/build-ripunzip.yml
vendored
Normal file
74
.github/workflows/build-ripunzip.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
name: Build runzip
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
ripunzip-version:
|
||||||
|
description: "what reference to checktout from google/runzip"
|
||||||
|
required: false
|
||||||
|
default: v2.0.2
|
||||||
|
openssl-version:
|
||||||
|
description: "what reference to checkout from openssl/openssl for Linux"
|
||||||
|
required: false
|
||||||
|
default: openssl-3.5.0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-22.04, macos-13, windows-2022]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: google/ripunzip
|
||||||
|
ref: ${{ inputs.ripunzip-version }}
|
||||||
|
# we need to avoid ripunzip dynamically linking into libssl
|
||||||
|
# see https://github.com/sfackler/rust-openssl/issues/183
|
||||||
|
- if: runner.os == 'Linux'
|
||||||
|
name: checkout openssl
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: openssl/openssl
|
||||||
|
path: openssl
|
||||||
|
ref: ${{ inputs.openssl-version }}
|
||||||
|
- if: runner.os == 'Linux'
|
||||||
|
name: build and install openssl with fPIC
|
||||||
|
shell: bash
|
||||||
|
working-directory: openssl
|
||||||
|
run: |
|
||||||
|
./config -fPIC --prefix=$HOME/.local --openssldir=$HOME/.local/ssl
|
||||||
|
make -j $(nproc)
|
||||||
|
make install_sw -j $(nproc)
|
||||||
|
- if: runner.os == 'Linux'
|
||||||
|
name: build (linux)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
env OPENSSL_LIB_DIR=$HOME/.local/lib64 OPENSSL_INCLUDE_DIR=$HOME/.local/include OPENSSL_STATIC=yes cargo build --release
|
||||||
|
mv target/release/ripunzip ripunzip-linux
|
||||||
|
- if: runner.os == 'Windows'
|
||||||
|
name: build (windows)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cargo build --release
|
||||||
|
mv target/release/ripunzip ripunzip-windows
|
||||||
|
- name: build (macOS)
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
rustup target install x86_64-apple-darwin
|
||||||
|
rustup target install aarch64-apple-darwin
|
||||||
|
cargo build --target x86_64-apple-darwin --release
|
||||||
|
cargo build --target aarch64-apple-darwin --release
|
||||||
|
lipo -create -output ripunzip-macos \
|
||||||
|
-arch x86_64 target/x86_64-apple-darwin/release/ripunzip \
|
||||||
|
-arch arm64 target/aarch64-apple-darwin/release/ripunzip
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ripunzip-${{ runner.os }}
|
||||||
|
path: ripunzip-*
|
||||||
|
- name: Check built binary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
./ripunzip-* --version
|
||||||
2
.github/workflows/buildifier.yml
vendored
2
.github/workflows/buildifier.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Check bazel formatting
|
- name: Check bazel formatting
|
||||||
uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
|
uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/check-implicit-this.yml
vendored
2
.github/workflows/check-implicit-this.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Check that implicit this warnings is enabled for all packs
|
- name: Check that implicit this warnings is enabled for all packs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
sync:
|
sync:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Check overlay annotations
|
- name: Check overlay annotations
|
||||||
run: python config/add-overlay-annotations.py --check java
|
run: python config/add-overlay-annotations.py --check java
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/check-qldoc.yml
vendored
2
.github/workflows/check-qldoc.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/check-query-ids.yml
vendored
2
.github/workflows/check-query-ids.yml
vendored
@@ -19,6 +19,6 @@ jobs:
|
|||||||
name: Check query IDs
|
name: Check query IDs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Check for duplicate query IDs
|
- name: Check for duplicate query IDs
|
||||||
run: python3 misc/scripts/check-query-ids.py
|
run: python3 misc/scripts/check-query-ids.py
|
||||||
|
|||||||
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
@@ -34,10 +34,10 @@ jobs:
|
|||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 10.0.100
|
dotnet-version: 9.0.100
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|||||||
46
.github/workflows/compile-queries.yml
vendored
Normal file
46
.github/workflows/compile-queries.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: "Compile all queries using the latest stable CodeQL CLI"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: # makes sure the cache gets populated - running on the branches people tend to merge into.
|
||||||
|
- main
|
||||||
|
- "rc/*"
|
||||||
|
- "codeql-cli-*"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**.ql'
|
||||||
|
- '**.qll'
|
||||||
|
- '**/qlpack.yml'
|
||||||
|
- '**.dbscheme'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
compile-queries:
|
||||||
|
if: github.repository_owner == 'github'
|
||||||
|
runs-on: ubuntu-latest-xl
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup CodeQL
|
||||||
|
uses: ./.github/actions/fetch-codeql
|
||||||
|
with:
|
||||||
|
channel: 'release'
|
||||||
|
- name: Cache compilation cache
|
||||||
|
id: query-cache
|
||||||
|
uses: ./.github/actions/cache-query-compilation
|
||||||
|
with:
|
||||||
|
key: all-queries
|
||||||
|
- name: check formatting
|
||||||
|
run: find shared */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
|
||||||
|
- name: compile queries - check-only
|
||||||
|
# run with --check-only if running in a PR (github.sha != main)
|
||||||
|
if : ${{ github.event_name == 'pull_request' }}
|
||||||
|
shell: bash
|
||||||
|
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500 --ram=56000
|
||||||
|
- name: compile queries - full
|
||||||
|
# do full compile if running on main - this populates the cache
|
||||||
|
if : ${{ github.event_name != 'pull_request' }}
|
||||||
|
shell: bash
|
||||||
|
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 --ram=56000
|
||||||
2
.github/workflows/cpp-swift-analysis.yml
vendored
2
.github/workflows/cpp-swift-analysis.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|||||||
14
.github/workflows/csharp-qltest.yml
vendored
14
.github/workflows/csharp-qltest.yml
vendored
@@ -39,23 +39,23 @@ jobs:
|
|||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 10.0.100
|
dotnet-version: 9.0.100
|
||||||
- name: Extractor unit tests
|
- name: Extractor unit tests
|
||||||
run: |
|
run: |
|
||||||
dotnet tool restore
|
dotnet tool restore
|
||||||
dotnet test -p:RuntimeFrameworkVersion=10.0.0 extractor/Semmle.Util.Tests
|
dotnet test -p:RuntimeFrameworkVersion=9.0.0 extractor/Semmle.Util.Tests
|
||||||
dotnet test -p:RuntimeFrameworkVersion=10.0.0 extractor/Semmle.Extraction.Tests
|
dotnet test -p:RuntimeFrameworkVersion=9.0.0 extractor/Semmle.Extraction.Tests
|
||||||
dotnet test -p:RuntimeFrameworkVersion=10.0.0 autobuilder/Semmle.Autobuild.CSharp.Tests
|
dotnet test -p:RuntimeFrameworkVersion=9.0.0 autobuilder/Semmle.Autobuild.CSharp.Tests
|
||||||
dotnet test -p:RuntimeFrameworkVersion=10.0.0 autobuilder/Semmle.Autobuild.Cpp.Tests
|
dotnet test -p:RuntimeFrameworkVersion=9.0.0 autobuilder/Semmle.Autobuild.Cpp.Tests
|
||||||
shell: bash
|
shell: bash
|
||||||
stubgentest:
|
stubgentest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- uses: ./csharp/actions/create-extractor-pack
|
- uses: ./csharp/actions/create-extractor-pack
|
||||||
- name: Run stub generator tests
|
- name: Run stub generator tests
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
4
.github/workflows/csv-coverage-metrics.yml
vendored
4
.github/workflows/csv-coverage-metrics.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Setup CodeQL
|
- name: Setup CodeQL
|
||||||
uses: ./.github/actions/fetch-codeql
|
uses: ./.github/actions/fetch-codeql
|
||||||
- name: Create empty database
|
- name: Create empty database
|
||||||
@@ -51,7 +51,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Setup CodeQL
|
- name: Setup CodeQL
|
||||||
uses: ./.github/actions/fetch-codeql
|
uses: ./.github/actions/fetch-codeql
|
||||||
- name: Create empty database
|
- name: Create empty database
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ jobs:
|
|||||||
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
|
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- name: Clone self (github/codeql) - MERGE
|
- name: Clone self (github/codeql) - MERGE
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: merge
|
path: merge
|
||||||
- name: Clone self (github/codeql) - BASE
|
- name: Clone self (github/codeql) - BASE
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
path: base
|
path: base
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
|
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- name: Clone self (github/codeql)
|
- name: Clone self (github/codeql)
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Set up Python 3.8
|
- name: Set up Python 3.8
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone self (github/codeql)
|
- name: Clone self (github/codeql)
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: script
|
path: script
|
||||||
- name: Clone self (github/codeql) for analysis
|
- name: Clone self (github/codeql) for analysis
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: codeqlModels
|
path: codeqlModels
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
2
.github/workflows/csv-coverage-update.yml
vendored
2
.github/workflows/csv-coverage-update.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
|
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- name: Clone self (github/codeql)
|
- name: Clone self (github/codeql)
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: ql
|
path: ql
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
4
.github/workflows/csv-coverage.yml
vendored
4
.github/workflows/csv-coverage.yml
vendored
@@ -16,11 +16,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone self (github/codeql)
|
- name: Clone self (github/codeql)
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: script
|
path: script
|
||||||
- name: Clone self (github/codeql) for analysis
|
- name: Clone self (github/codeql) for analysis
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: codeqlModels
|
path: codeqlModels
|
||||||
ref: ${{ github.event.inputs.qlModelShaOverride || github.ref }}
|
ref: ${{ github.event.inputs.qlModelShaOverride || github.ref }}
|
||||||
|
|||||||
2
.github/workflows/fast-forward.yml
vendored
2
.github/workflows/fast-forward.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Git config
|
- name: Git config
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
35
.github/workflows/go-tests-other-os.yml
vendored
Normal file
35
.github/workflows/go-tests-other-os.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
name: "Go: Run Tests - Other OS"
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "go/**"
|
||||||
|
- "!go/documentation/**"
|
||||||
|
- "!go/ql/**" # don't run other-os if only ql/ files changed
|
||||||
|
- .github/workflows/go-tests-other-os.yml
|
||||||
|
- .github/actions/**
|
||||||
|
- codeql-workspace.yml
|
||||||
|
- MODULE.bazel
|
||||||
|
- .bazelrc
|
||||||
|
- misc/bazel/**
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-mac:
|
||||||
|
name: Test MacOS
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run tests
|
||||||
|
uses: ./go/actions/test
|
||||||
|
|
||||||
|
test-win:
|
||||||
|
name: Test Windows
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run tests
|
||||||
|
uses: ./go/actions/test
|
||||||
22
.github/workflows/go-tests-rtjo.yml
vendored
Normal file
22
.github/workflows/go-tests-rtjo.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: "Go: Run RTJO Tests"
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-linux:
|
||||||
|
if: "github.repository_owner == 'github' && github.event.label.name == 'Run: RTJO Language Tests'"
|
||||||
|
name: RTJO Test Linux (Ubuntu)
|
||||||
|
runs-on: ubuntu-latest-xl
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run tests
|
||||||
|
uses: ./go/actions/test
|
||||||
|
with:
|
||||||
|
run-code-checks: true
|
||||||
|
dynamic-join-order-mode: all
|
||||||
13
.github/workflows/go-tests.yml
vendored
13
.github/workflows/go-tests.yml
vendored
@@ -1,5 +1,16 @@
|
|||||||
name: "Go: Run Tests"
|
name: "Go: Run Tests"
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "go/**"
|
||||||
|
- "!go/documentation/**"
|
||||||
|
- "shared/**"
|
||||||
|
- .github/workflows/go-tests.yml
|
||||||
|
- .github/actions/**
|
||||||
|
- codeql-workspace.yml
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "rc/*"
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "go/**"
|
- "go/**"
|
||||||
@@ -22,7 +33,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest-xl
|
runs-on: ubuntu-latest-xl
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: ./go/actions/test
|
uses: ./go/actions/test
|
||||||
with:
|
with:
|
||||||
|
|||||||
208
.github/workflows/go-version-update.yml
vendored
208
.github/workflows/go-version-update.yml
vendored
@@ -1,208 +0,0 @@
|
|||||||
name: Update Go version
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 3 * * 1" # Run weekly on Mondays at 3 AM UTC (1 = Monday)
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-go-version:
|
|
||||||
name: Check and update Go version
|
|
||||||
if: github.repository == 'github/codeql'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set up Git
|
|
||||||
run: |
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
||||||
|
|
||||||
- name: Fetch latest Go version
|
|
||||||
id: fetch-version
|
|
||||||
run: |
|
|
||||||
LATEST_GO_VERSION=$(curl -s https://go.dev/dl/?mode=json | jq -r '.[0].version')
|
|
||||||
|
|
||||||
if [ -z "$LATEST_GO_VERSION" ] || [ "$LATEST_GO_VERSION" = "null" ]; then
|
|
||||||
echo "Error: Failed to fetch latest Go version from go.dev"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Latest Go version from go.dev: $LATEST_GO_VERSION"
|
|
||||||
echo "version=$LATEST_GO_VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# Extract version numbers (e.g., go1.26.0 -> 1.26.0)
|
|
||||||
LATEST_VERSION_NUM=$(echo $LATEST_GO_VERSION | sed 's/^go//')
|
|
||||||
echo "version_num=$LATEST_VERSION_NUM" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# Extract major.minor version (e.g., 1.26.0 -> 1.26)
|
|
||||||
LATEST_MAJOR_MINOR=$(echo $LATEST_VERSION_NUM | sed -E 's/^([0-9]+\.[0-9]+).*/\1/')
|
|
||||||
echo "major_minor=$LATEST_MAJOR_MINOR" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Check current Go version
|
|
||||||
id: current-version
|
|
||||||
run: |
|
|
||||||
CURRENT_VERSION=$(sed -n 's/.*go_sdk\.download(version = \"\([^\"]*\)\".*/\1/p' MODULE.bazel)
|
|
||||||
|
|
||||||
if [ -z "$CURRENT_VERSION" ]; then
|
|
||||||
echo "Error: Could not extract Go version from MODULE.bazel"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Current Go version in MODULE.bazel: $CURRENT_VERSION"
|
|
||||||
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# Extract major.minor version
|
|
||||||
CURRENT_MAJOR_MINOR=$(echo $CURRENT_VERSION | sed -E 's/^([0-9]+\.[0-9]+).*/\1/')
|
|
||||||
echo "major_minor=$CURRENT_MAJOR_MINOR" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Compare versions
|
|
||||||
id: compare
|
|
||||||
run: |
|
|
||||||
LATEST="${{ steps.fetch-version.outputs.version_num }}"
|
|
||||||
CURRENT="${{ steps.current-version.outputs.version }}"
|
|
||||||
|
|
||||||
echo "Latest: $LATEST"
|
|
||||||
echo "Current: $CURRENT"
|
|
||||||
|
|
||||||
if [ "$LATEST" = "$CURRENT" ]; then
|
|
||||||
echo "Go version is up to date"
|
|
||||||
echo "needs_update=false" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "Go version needs update from $CURRENT to $LATEST"
|
|
||||||
echo "needs_update=true" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Update Go version in files
|
|
||||||
if: steps.compare.outputs.needs_update == 'true'
|
|
||||||
run: |
|
|
||||||
LATEST_VERSION_NUM="${{ steps.fetch-version.outputs.version_num }}"
|
|
||||||
LATEST_MAJOR_MINOR="${{ steps.fetch-version.outputs.major_minor }}"
|
|
||||||
CURRENT_VERSION="${{ steps.current-version.outputs.version }}"
|
|
||||||
CURRENT_MAJOR_MINOR="${{ steps.current-version.outputs.major_minor }}"
|
|
||||||
|
|
||||||
echo "Updating from $CURRENT_VERSION to $LATEST_VERSION_NUM"
|
|
||||||
|
|
||||||
# Escape dots in current version strings for use in sed patterns
|
|
||||||
CURRENT_VERSION_ESCAPED=$(echo "$CURRENT_VERSION" | sed 's/\./\\./g')
|
|
||||||
CURRENT_MAJOR_MINOR_ESCAPED=$(echo "$CURRENT_MAJOR_MINOR" | sed 's/\./\\./g')
|
|
||||||
|
|
||||||
# Update MODULE.bazel
|
|
||||||
sed -i "s/go_sdk\.download(version = \"$CURRENT_VERSION_ESCAPED\")/go_sdk.download(version = \"$LATEST_VERSION_NUM\")/" MODULE.bazel
|
|
||||||
if ! grep -q "go_sdk.download(version = \"$LATEST_VERSION_NUM\")" MODULE.bazel; then
|
|
||||||
echo "Error: Failed to update MODULE.bazel"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update go/extractor/go.mod
|
|
||||||
if ! sed -i "s/^go $CURRENT_MAJOR_MINOR_ESCAPED\$/go $LATEST_MAJOR_MINOR/" go/extractor/go.mod; then
|
|
||||||
echo "Warning: Failed to update go directive in go.mod"
|
|
||||||
fi
|
|
||||||
if ! sed -i "s/^toolchain go$CURRENT_VERSION_ESCAPED\$/toolchain go$LATEST_VERSION_NUM/" go/extractor/go.mod; then
|
|
||||||
echo "Warning: Failed to update toolchain in go.mod"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update go/extractor/autobuilder/build-environment.go
|
|
||||||
if ! sed -i "s/var maxGoVersion = util\.NewSemVer(\"$CURRENT_MAJOR_MINOR_ESCAPED\")/var maxGoVersion = util.NewSemVer(\"$LATEST_MAJOR_MINOR\")/" go/extractor/autobuilder/build-environment.go; then
|
|
||||||
echo "Warning: Failed to update build-environment.go"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update go/actions/test/action.yml
|
|
||||||
if ! sed -i "s/default: \"~$CURRENT_VERSION_ESCAPED\"/default: \"~$LATEST_VERSION_NUM\"/" go/actions/test/action.yml; then
|
|
||||||
echo "Warning: Failed to update action.yml"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Show what changed
|
|
||||||
git diff
|
|
||||||
|
|
||||||
- name: Check for changes
|
|
||||||
id: check-changes
|
|
||||||
if: steps.compare.outputs.needs_update == 'true'
|
|
||||||
run: |
|
|
||||||
if git diff --quiet; then
|
|
||||||
echo "No changes detected"
|
|
||||||
echo "has_changes=false" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "Changes detected"
|
|
||||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Check for existing PR
|
|
||||||
if: steps.check-changes.outputs.has_changes == 'true'
|
|
||||||
id: check-pr
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
BRANCH_NAME="workflow/go-version-update"
|
|
||||||
PR_NUMBER=$(gh pr list --head "$BRANCH_NAME" --state open --json number --jq '.[0].number')
|
|
||||||
|
|
||||||
if [ -n "$PR_NUMBER" ]; then
|
|
||||||
echo "Existing PR found: #$PR_NUMBER"
|
|
||||||
echo "pr_exists=true" >> $GITHUB_OUTPUT
|
|
||||||
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "No existing PR found"
|
|
||||||
echo "pr_exists=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Commit and push changes
|
|
||||||
if: steps.check-changes.outputs.has_changes == 'true'
|
|
||||||
run: |
|
|
||||||
BRANCH_NAME="workflow/go-version-update"
|
|
||||||
LATEST_VERSION_NUM="${{ steps.fetch-version.outputs.version_num }}"
|
|
||||||
LATEST_MAJOR_MINOR="${{ steps.fetch-version.outputs.major_minor }}"
|
|
||||||
|
|
||||||
# Create or switch to branch
|
|
||||||
git checkout -B "$BRANCH_NAME"
|
|
||||||
|
|
||||||
# Stage and commit changes
|
|
||||||
git add MODULE.bazel go/extractor/go.mod go/extractor/autobuilder/build-environment.go go/actions/test/action.yml
|
|
||||||
git commit -m "Go: Update to $LATEST_VERSION_NUM"
|
|
||||||
|
|
||||||
# Push changes
|
|
||||||
git push --force-with-lease origin "$BRANCH_NAME"
|
|
||||||
|
|
||||||
- name: Create or update PR
|
|
||||||
if: steps.check-changes.outputs.has_changes == 'true'
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
BRANCH_NAME="workflow/go-version-update"
|
|
||||||
LATEST_VERSION_NUM="${{ steps.fetch-version.outputs.version_num }}"
|
|
||||||
CURRENT_VERSION="${{ steps.current-version.outputs.version }}"
|
|
||||||
|
|
||||||
PR_TITLE="Go: Update to $LATEST_VERSION_NUM"
|
|
||||||
|
|
||||||
PR_BODY=$(cat <<EOF
|
|
||||||
This PR updates Go from $CURRENT_VERSION to $LATEST_VERSION_NUM.
|
|
||||||
|
|
||||||
Updated files:
|
|
||||||
- \`MODULE.bazel\` - go_sdk.download version
|
|
||||||
- \`go/extractor/go.mod\` - go directive and toolchain
|
|
||||||
- \`go/extractor/autobuilder/build-environment.go\` - maxGoVersion (only if MAJOR.MINOR changes)
|
|
||||||
- \`go/actions/test/action.yml\` - default go-test-version
|
|
||||||
|
|
||||||
This PR was automatically created by the [Go version update workflow](https://github.com/${{ github.repository }}/blob/main/.github/workflows/go-version-update.yml).
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ "${{ steps.check-pr.outputs.pr_exists }}" = "true" ]; then
|
|
||||||
echo "Updating existing PR #${{ steps.check-pr.outputs.pr_number }}"
|
|
||||||
gh pr edit "${{ steps.check-pr.outputs.pr_number }}" --title "$PR_TITLE" --body "$PR_BODY"
|
|
||||||
else
|
|
||||||
echo "Creating new PR"
|
|
||||||
gh pr create \
|
|
||||||
--title "$PR_TITLE" \
|
|
||||||
--body "$PR_BODY" \
|
|
||||||
--base main \
|
|
||||||
--head "$BRANCH_NAME" \
|
|
||||||
--label "Go"
|
|
||||||
fi
|
|
||||||
2
.github/workflows/kotlin-build.yml
vendored
2
.github/workflows/kotlin-build.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- run: |
|
- run: |
|
||||||
bazel query //java/kotlin-extractor/...
|
bazel query //java/kotlin-extractor/...
|
||||||
# only build the default version as a quick check that we can build from `codeql`
|
# only build the default version as a quick check that we can build from `codeql`
|
||||||
|
|||||||
6
.github/workflows/mad_modelDiff.yml
vendored
6
.github/workflows/mad_modelDiff.yml
vendored
@@ -28,12 +28,12 @@ jobs:
|
|||||||
slug: ${{fromJson(github.event.inputs.projects || '["apache/commons-codec", "apache/commons-io", "apache/commons-beanutils", "apache/commons-logging", "apache/commons-fileupload", "apache/commons-lang", "apache/commons-validator", "apache/commons-csv", "apache/dubbo"]' )}}
|
slug: ${{fromJson(github.event.inputs.projects || '["apache/commons-codec", "apache/commons-io", "apache/commons-beanutils", "apache/commons-logging", "apache/commons-fileupload", "apache/commons-lang", "apache/commons-validator", "apache/commons-csv", "apache/dubbo"]' )}}
|
||||||
steps:
|
steps:
|
||||||
- name: Clone github/codeql from PR
|
- name: Clone github/codeql from PR
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
if: github.event.pull_request
|
if: github.event.pull_request
|
||||||
with:
|
with:
|
||||||
path: codeql-pr
|
path: codeql-pr
|
||||||
- name: Clone github/codeql from main
|
- name: Clone github/codeql from main
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: codeql-main
|
path: codeql-main
|
||||||
ref: main
|
ref: main
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
SHORTNAME=`basename $DATABASE`
|
SHORTNAME=`basename $DATABASE`
|
||||||
python misc/scripts/models-as-data/generate_mad.py --language java --with-summaries --with-sinks $DATABASE $SHORTNAME/$QL_VARIANT
|
python misc/scripts/models-as-data/generate_mad.py --language java --with-summaries --with-sinks $DATABASE $SHORTNAME/$QL_VARIANT
|
||||||
mkdir -p $MODELS/$SHORTNAME
|
mkdir -p $MODELS/$SHORTNAME
|
||||||
mv java/ql/lib/ext/generated/modelgenerator/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME
|
mv java/ql/lib/ext/generated/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/mad_regenerate-models.yml
vendored
4
.github/workflows/mad_regenerate-models.yml
vendored
@@ -30,11 +30,11 @@ jobs:
|
|||||||
ref: "placeholder"
|
ref: "placeholder"
|
||||||
steps:
|
steps:
|
||||||
- name: Clone self (github/codeql)
|
- name: Clone self (github/codeql)
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Setup CodeQL binaries
|
- name: Setup CodeQL binaries
|
||||||
uses: ./.github/actions/fetch-codeql
|
uses: ./.github/actions/fetch-codeql
|
||||||
- name: Clone repositories
|
- name: Clone repositories
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: repos/${{ matrix.ref }}
|
path: repos/${{ matrix.ref }}
|
||||||
ref: ${{ matrix.ref }}
|
ref: ${{ matrix.ref }}
|
||||||
|
|||||||
4
.github/workflows/python-tooling.yml
vendored
4
.github/workflows/python-tooling.yml
vendored
@@ -5,7 +5,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "misc/bazel/**"
|
- "misc/bazel/**"
|
||||||
- "misc/codegen/**"
|
- "misc/codegen/**"
|
||||||
- "misc/scripts/models-as-data/*.py"
|
- "misc/scripts/models-as-data/bulk_generate_mad.py"
|
||||||
- "*.bazel*"
|
- "*.bazel*"
|
||||||
- .github/workflows/codegen.yml
|
- .github/workflows/codegen.yml
|
||||||
- .pre-commit-config.yaml
|
- .pre-commit-config.yaml
|
||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
check-python-tooling:
|
check-python-tooling:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.12'
|
||||||
|
|||||||
2
.github/workflows/qhelp-pr-preview.yml
vendored
2
.github/workflows/qhelp-pr-preview.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|||||||
3
.github/workflows/ql-for-ql-build.yml
vendored
3
.github/workflows/ql-for-ql-build.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest-xl
|
runs-on: ubuntu-latest-xl
|
||||||
steps:
|
steps:
|
||||||
### Build the queries ###
|
### Build the queries ###
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Find codeql
|
- name: Find codeql
|
||||||
@@ -27,7 +27,6 @@ jobs:
|
|||||||
uses: github/codeql-action/init@main
|
uses: github/codeql-action/init@main
|
||||||
with:
|
with:
|
||||||
languages: javascript # does not matter
|
languages: javascript # does not matter
|
||||||
tools: nightly
|
|
||||||
- uses: ./.github/actions/os-version
|
- uses: ./.github/actions/os-version
|
||||||
id: os_version
|
id: os_version
|
||||||
### Build the extractor ###
|
### Build the extractor ###
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
- github/codeql
|
- github/codeql
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Find codeql
|
- name: Find codeql
|
||||||
id: find-codeql
|
id: find-codeql
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
|
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
|
||||||
- name: Checkout ${{ matrix.repo }}
|
- name: Checkout ${{ matrix.repo }}
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ matrix.repo }}
|
repository: ${{ matrix.repo }}
|
||||||
path: ${{ github.workspace }}/repo
|
path: ${{ github.workspace }}/repo
|
||||||
@@ -75,7 +75,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: measure
|
needs: measure
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: measurements
|
name: measurements
|
||||||
|
|||||||
6
.github/workflows/ql-for-ql-tests.yml
vendored
6
.github/workflows/ql-for-ql-tests.yml
vendored
@@ -24,13 +24,12 @@ jobs:
|
|||||||
qltest:
|
qltest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Find codeql
|
- name: Find codeql
|
||||||
id: find-codeql
|
id: find-codeql
|
||||||
uses: github/codeql-action/init@main
|
uses: github/codeql-action/init@main
|
||||||
with:
|
with:
|
||||||
languages: javascript # does not matter
|
languages: javascript # does not matter
|
||||||
tools: nightly
|
|
||||||
- uses: ./.github/actions/os-version
|
- uses: ./.github/actions/os-version
|
||||||
id: os_version
|
id: os_version
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
@@ -65,7 +64,7 @@ jobs:
|
|||||||
needs: [qltest]
|
needs: [qltest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Install GNU tar
|
- name: Install GNU tar
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
run: |
|
run: |
|
||||||
@@ -76,7 +75,6 @@ jobs:
|
|||||||
uses: github/codeql-action/init@main
|
uses: github/codeql-action/init@main
|
||||||
with:
|
with:
|
||||||
languages: javascript # does not matter
|
languages: javascript # does not matter
|
||||||
tools: nightly
|
|
||||||
- uses: ./.github/actions/os-version
|
- uses: ./.github/actions/os-version
|
||||||
id: os_version
|
id: os_version
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
|
|||||||
4
.github/workflows/query-list.yml
vendored
4
.github/workflows/query-list.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone self (github/codeql)
|
- name: Clone self (github/codeql)
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: codeql
|
path: codeql
|
||||||
- name: Set up Python 3.8
|
- name: Set up Python 3.8
|
||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.8
|
||||||
- name: Download CodeQL CLI
|
- name: Download CodeQL CLI
|
||||||
# Look under the `codeql` directory, as this is where we checked out the `github/codeql` repo
|
# Look under the `codeql` directory, as this is where we checked out the `github/codeql` repo
|
||||||
uses: ./codeql/.github/actions/fetch-codeql
|
uses: ./codeql/.github/actions/fetch-codeql
|
||||||
- name: Build code scanning query list
|
- name: Build code scanning query list
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
236
.github/workflows/ruby-build.yml
vendored
Normal file
236
.github/workflows/ruby-build.yml
vendored
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
name: "Ruby: Build"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "ruby/**"
|
||||||
|
- .github/workflows/ruby-build.yml
|
||||||
|
- .github/actions/fetch-codeql/action.yml
|
||||||
|
- codeql-workspace.yml
|
||||||
|
- "shared/tree-sitter-extractor/**"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "rc/*"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "ruby/**"
|
||||||
|
- .github/workflows/ruby-build.yml
|
||||||
|
- .github/actions/fetch-codeql/action.yml
|
||||||
|
- codeql-workspace.yml
|
||||||
|
- "shared/tree-sitter-extractor/**"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "rc/*"
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: "Version tag to create"
|
||||||
|
required: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ruby
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install GNU tar
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
brew install gnu-tar
|
||||||
|
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
|
||||||
|
- name: Prepare Windows
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
git config --global core.longpaths true
|
||||||
|
- uses: ./.github/actions/os-version
|
||||||
|
id: os_version
|
||||||
|
- name: Cache entire extractor
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-extractor
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
target/release/codeql-extractor-ruby
|
||||||
|
target/release/codeql-extractor-ruby.exe
|
||||||
|
ruby/extractor/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||||
|
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/Cargo.lock') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ruby/extractor/**/*.rs') }}
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
target
|
||||||
|
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-rust-cargo-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/**/Cargo.lock') }}
|
||||||
|
- name: Check formatting
|
||||||
|
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
||||||
|
run: cd extractor && cargo fmt -- --check
|
||||||
|
- name: Build
|
||||||
|
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
||||||
|
run: cd extractor && cargo build --verbose
|
||||||
|
- name: Run tests
|
||||||
|
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
||||||
|
run: cd extractor && cargo test --verbose
|
||||||
|
- name: Release build
|
||||||
|
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
||||||
|
run: cd extractor && cargo build --release
|
||||||
|
- name: Generate dbscheme
|
||||||
|
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
|
||||||
|
run: ../target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
|
with:
|
||||||
|
name: ruby.dbscheme
|
||||||
|
path: ruby/ql/lib/ruby.dbscheme
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
|
with:
|
||||||
|
name: TreeSitter.qll
|
||||||
|
path: ruby/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: extractor-${{ matrix.os }}
|
||||||
|
path: |
|
||||||
|
target/release/codeql-extractor-ruby
|
||||||
|
target/release/codeql-extractor-ruby.exe
|
||||||
|
retention-days: 1
|
||||||
|
compile-queries:
|
||||||
|
if: github.repository_owner == 'github'
|
||||||
|
runs-on: ubuntu-latest-xl
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Fetch CodeQL
|
||||||
|
uses: ./.github/actions/fetch-codeql
|
||||||
|
- name: Cache compilation cache
|
||||||
|
id: query-cache
|
||||||
|
uses: ./.github/actions/cache-query-compilation
|
||||||
|
with:
|
||||||
|
key: ruby-build
|
||||||
|
- name: Build Query Pack
|
||||||
|
run: |
|
||||||
|
PACKS=${{ runner.temp }}/query-packs
|
||||||
|
rm -rf $PACKS
|
||||||
|
codeql pack create ../misc/suite-helpers --output "$PACKS"
|
||||||
|
codeql pack create ../shared/regex --output "$PACKS"
|
||||||
|
codeql pack create ../shared/ssa --output "$PACKS"
|
||||||
|
codeql pack create ../shared/tutorial --output "$PACKS"
|
||||||
|
codeql pack create ql/lib --output "$PACKS"
|
||||||
|
codeql pack create -j0 ql/src --output "$PACKS" --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
|
||||||
|
PACK_FOLDER=$(readlink -f "$PACKS"/codeql/ruby-queries/*)
|
||||||
|
codeql generate query-help --format=sarifv2.1.0 --output="${PACK_FOLDER}/rules.sarif" ql/src
|
||||||
|
(cd ql/src; find queries \( -name '*.qhelp' -o -name '*.rb' -o -name '*.erb' \) -exec bash -c 'mkdir -p "'"${PACK_FOLDER}"'/$(dirname "{}")"' \; -exec cp "{}" "${PACK_FOLDER}/{}" \;)
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: codeql-ruby-queries
|
||||||
|
path: |
|
||||||
|
${{ runner.temp }}/query-packs/*
|
||||||
|
retention-days: 1
|
||||||
|
include-hidden-files: true
|
||||||
|
|
||||||
|
package:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build, compile-queries]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ruby.dbscheme
|
||||||
|
path: ruby/ruby
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: extractor-ubuntu-latest
|
||||||
|
path: ruby/linux64
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: extractor-windows-latest
|
||||||
|
path: ruby/win64
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: extractor-macos-latest
|
||||||
|
path: ruby/osx64
|
||||||
|
- run: |
|
||||||
|
mkdir -p ruby
|
||||||
|
cp -r codeql-extractor.yml tools ql/lib/ruby.dbscheme.stats ruby/
|
||||||
|
mkdir -p ruby/tools/{linux64,osx64,win64}
|
||||||
|
cp linux64/codeql-extractor-ruby ruby/tools/linux64/extractor
|
||||||
|
cp osx64/codeql-extractor-ruby ruby/tools/osx64/extractor
|
||||||
|
cp win64/codeql-extractor-ruby.exe ruby/tools/win64/extractor.exe
|
||||||
|
chmod +x ruby/tools/{linux64,osx64}/extractor
|
||||||
|
zip -rq codeql-ruby.zip ruby
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: codeql-ruby-pack
|
||||||
|
path: ruby/codeql-ruby.zip
|
||||||
|
retention-days: 1
|
||||||
|
include-hidden-files: true
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: codeql-ruby-queries
|
||||||
|
path: ruby/qlpacks
|
||||||
|
- run: |
|
||||||
|
echo '{
|
||||||
|
"provide": [
|
||||||
|
"ruby/codeql-extractor.yml",
|
||||||
|
"qlpacks/*/*/*/qlpack.yml"
|
||||||
|
]
|
||||||
|
}' > .codeqlmanifest.json
|
||||||
|
zip -rq codeql-ruby-bundle.zip .codeqlmanifest.json ruby qlpacks
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: codeql-ruby-bundle
|
||||||
|
path: ruby/codeql-ruby-bundle.zip
|
||||||
|
retention-days: 1
|
||||||
|
include-hidden-files: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
needs: [package]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Fetch CodeQL
|
||||||
|
uses: ./.github/actions/fetch-codeql
|
||||||
|
|
||||||
|
- name: Download Ruby bundle
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: codeql-ruby-bundle
|
||||||
|
path: ${{ runner.temp }}
|
||||||
|
- name: Unzip Ruby bundle
|
||||||
|
shell: bash
|
||||||
|
run: unzip -q -d "${{ runner.temp }}/ruby-bundle" "${{ runner.temp }}/codeql-ruby-bundle.zip"
|
||||||
|
|
||||||
|
- name: Run QL test
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
codeql test run --search-path "${{ runner.temp }}/ruby-bundle" --additional-packs "${{ runner.temp }}/ruby-bundle" ruby/ql/test/library-tests/ast/constants/
|
||||||
|
- name: Create database
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
codeql database create --search-path "${{ runner.temp }}/ruby-bundle" --language ruby --source-root ruby/ql/test/library-tests/ast/constants/ ../database
|
||||||
|
- name: Analyze database
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
codeql database analyze --search-path "${{ runner.temp }}/ruby-bundle" --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls
|
||||||
75
.github/workflows/ruby-dataset-measure.yml
vendored
Normal file
75
.github/workflows/ruby-dataset-measure.yml
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
name: "Ruby: Collect database stats"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "rc/*"
|
||||||
|
paths:
|
||||||
|
- ruby/ql/lib/ruby.dbscheme
|
||||||
|
- .github/workflows/ruby-dataset-measure.yml
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "rc/*"
|
||||||
|
paths:
|
||||||
|
- ruby/ql/lib/ruby.dbscheme
|
||||||
|
- .github/workflows/ruby-dataset-measure.yml
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
measure:
|
||||||
|
env:
|
||||||
|
CODEQL_THREADS: 4 # TODO: remove this once it's set by the CLI
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
repo: [rails/rails, discourse/discourse, spree/spree, ruby/ruby]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: ./.github/actions/fetch-codeql
|
||||||
|
|
||||||
|
- uses: ./ruby/actions/create-extractor-pack
|
||||||
|
|
||||||
|
- name: Checkout ${{ matrix.repo }}
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: ${{ matrix.repo }}
|
||||||
|
path: ${{ github.workspace }}/repo
|
||||||
|
- name: Create database
|
||||||
|
run: |
|
||||||
|
codeql database create \
|
||||||
|
--search-path "${{ github.workspace }}" \
|
||||||
|
--threads 4 \
|
||||||
|
--language ruby --source-root "${{ github.workspace }}/repo" \
|
||||||
|
"${{ runner.temp }}/database"
|
||||||
|
- name: Measure database
|
||||||
|
run: |
|
||||||
|
mkdir -p "stats/${{ matrix.repo }}"
|
||||||
|
codeql dataset measure --threads 4 --output "stats/${{ matrix.repo }}/stats.xml" "${{ runner.temp }}/database/db-ruby"
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: measurements-${{ hashFiles('stats/**') }}
|
||||||
|
path: stats
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
merge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: measure
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: stats
|
||||||
|
- run: |
|
||||||
|
python -m pip install --user lxml
|
||||||
|
find stats -name 'stats.xml' | sort | xargs python ruby/scripts/merge_stats.py --output ruby/ql/lib/ruby.dbscheme.stats --normalise ruby_tokeninfo
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ruby.dbscheme.stats
|
||||||
|
path: ruby/ql/lib/ruby.dbscheme.stats
|
||||||
40
.github/workflows/ruby-qltest-rtjo.yml
vendored
Normal file
40
.github/workflows/ruby-qltest-rtjo.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: "Ruby: Run RTJO Language Tests"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- labeled
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ruby
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
qltest-rtjo:
|
||||||
|
if: "github.repository_owner == 'github' && github.event.label.name == 'Run: RTJO Language Tests'"
|
||||||
|
runs-on: ubuntu-latest-xl
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/fetch-codeql
|
||||||
|
- uses: ./ruby/actions/create-extractor-pack
|
||||||
|
- name: Cache compilation cache
|
||||||
|
id: query-cache
|
||||||
|
uses: ./.github/actions/cache-query-compilation
|
||||||
|
with:
|
||||||
|
key: ruby-qltest
|
||||||
|
- name: Run QL tests
|
||||||
|
run: |
|
||||||
|
codeql test run --dynamic-join-order-mode=all --threads=0 --ram 50000 --search-path "${{ github.workspace }}" --check-databases --check-diff-informed --check-undefined-labels --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
73
.github/workflows/ruby-qltest.yml
vendored
Normal file
73
.github/workflows/ruby-qltest.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
name: "Ruby: Run QL Tests"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "ruby/**"
|
||||||
|
- "shared/**"
|
||||||
|
- .github/workflows/ruby-build.yml
|
||||||
|
- .github/actions/fetch-codeql/action.yml
|
||||||
|
- codeql-workspace.yml
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "rc/*"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "ruby/**"
|
||||||
|
- "shared/**"
|
||||||
|
- .github/workflows/ruby-qltest.yml
|
||||||
|
- .github/actions/fetch-codeql/action.yml
|
||||||
|
- codeql-workspace.yml
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "rc/*"
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ruby
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
qlupgrade:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/fetch-codeql
|
||||||
|
- name: Check DB upgrade scripts
|
||||||
|
run: |
|
||||||
|
echo >empty.trap
|
||||||
|
codeql dataset import -S ql/lib/upgrades/initial/ruby.dbscheme testdb empty.trap
|
||||||
|
codeql dataset upgrade testdb --additional-packs ql/lib
|
||||||
|
diff -q testdb/ruby.dbscheme ql/lib/ruby.dbscheme
|
||||||
|
- name: Check DB downgrade scripts
|
||||||
|
run: |
|
||||||
|
echo >empty.trap
|
||||||
|
rm -rf testdb; codeql dataset import -S ql/lib/ruby.dbscheme testdb empty.trap
|
||||||
|
codeql resolve upgrades --format=lines --allow-downgrades --additional-packs downgrades \
|
||||||
|
--dbscheme=ql/lib/ruby.dbscheme --target-dbscheme=downgrades/initial/ruby.dbscheme |
|
||||||
|
xargs codeql execute upgrades testdb
|
||||||
|
diff -q testdb/ruby.dbscheme downgrades/initial/ruby.dbscheme
|
||||||
|
qltest:
|
||||||
|
if: github.repository_owner == 'github'
|
||||||
|
runs-on: ubuntu-latest-xl
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/fetch-codeql
|
||||||
|
- uses: ./ruby/actions/create-extractor-pack
|
||||||
|
- name: Cache compilation cache
|
||||||
|
id: query-cache
|
||||||
|
uses: ./.github/actions/cache-query-compilation
|
||||||
|
with:
|
||||||
|
key: ruby-qltest
|
||||||
|
- name: Run QL tests
|
||||||
|
run: |
|
||||||
|
codeql test run --threads=0 --ram 50000 --search-path "${{ github.workspace }}" --check-databases --check-diff-informed --check-undefined-labels --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
2
.github/workflows/rust-analysis.yml
vendored
2
.github/workflows/rust-analysis.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Query latest nightly CodeQL bundle
|
- name: Query latest nightly CodeQL bundle
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
6
.github/workflows/rust.yml
vendored
6
.github/workflows/rust.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
working-directory: rust/ast-generator
|
working-directory: rust/ast-generator
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Inject sources
|
- name: Inject sources
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
working-directory: rust/extractor
|
working-directory: rust/extractor
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Format
|
- name: Format
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Install CodeQL
|
- name: Install CodeQL
|
||||||
uses: ./.github/actions/fetch-codeql
|
uses: ./.github/actions/fetch-codeql
|
||||||
- name: Code generation
|
- name: Code generation
|
||||||
|
|||||||
8
.github/workflows/swift.yml
vendored
8
.github/workflows/swift.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Setup (Linux)
|
- name: Setup (Linux)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
clang-format:
|
clang-format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
|
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
|
||||||
name: Check that python code is properly formatted
|
name: Check that python code is properly formatted
|
||||||
with:
|
with:
|
||||||
@@ -61,7 +61,7 @@ jobs:
|
|||||||
codegen:
|
codegen:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- uses: ./.github/actions/fetch-codeql
|
- uses: ./.github/actions/fetch-codeql
|
||||||
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
|
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
|
||||||
name: Check that QL generated code was checked in
|
name: Check that QL generated code was checked in
|
||||||
@@ -77,6 +77,6 @@ jobs:
|
|||||||
check-no-override:
|
check-no-override:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Check that no override is present in load.bzl
|
- name: Check that no override is present in load.bzl
|
||||||
run: bazel test ... --test_tag_filters=override --test_output=errors
|
run: bazel test ... --test_tag_filters=override --test_output=errors
|
||||||
|
|||||||
2
.github/workflows/sync-files.yml
vendored
2
.github/workflows/sync-files.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
sync:
|
sync:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Check synchronized files
|
- name: Check synchronized files
|
||||||
run: python config/sync-files.py
|
run: python config/sync-files.py
|
||||||
- name: Check dbscheme fragments
|
- name: Check dbscheme fragments
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: cargo fmt -- --check
|
run: cargo fmt -- --check
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
@@ -38,12 +38,12 @@ jobs:
|
|||||||
fmt:
|
fmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: cargo fmt --check
|
run: cargo fmt --check
|
||||||
clippy:
|
clippy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: cargo clippy -- --no-deps -D warnings -A clippy::new_without_default -A clippy::too_many_arguments
|
run: cargo clippy -- --no-deps -D warnings -A clippy::new_without_default -A clippy::too_many_arguments
|
||||||
|
|||||||
2
.github/workflows/validate-change-notes.yml
vendored
2
.github/workflows/validate-change-notes.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup CodeQL
|
- name: Setup CodeQL
|
||||||
uses: ./.github/actions/fetch-codeql
|
uses: ./.github/actions/fetch-codeql
|
||||||
|
|||||||
2
.github/workflows/zipmerge-test.yml
vendored
2
.github/workflows/zipmerge-test.yml
vendored
@@ -18,6 +18,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- run: |
|
- run: |
|
||||||
bazel test //misc/bazel/internal/zipmerge:test --test_output=all
|
bazel test //misc/bazel/internal/zipmerge:test --test_output=all
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -76,6 +76,3 @@ node_modules/
|
|||||||
# some upgrade/downgrade checks create these files
|
# some upgrade/downgrade checks create these files
|
||||||
**/upgrades/*/*.dbscheme.stats
|
**/upgrades/*/*.dbscheme.stats
|
||||||
**/downgrades/*/*.dbscheme.stats
|
**/downgrades/*/*.dbscheme.stats
|
||||||
|
|
||||||
# Mergetool files
|
|
||||||
*.orig
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ repos:
|
|||||||
rev: v3.2.0
|
rev: v3.2.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
exclude: /test([^/]*)/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
|
exclude: /test/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
exclude: Cargo.lock$|/test([^/]*)/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
|
exclude: Cargo.lock$|/test/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
rev: v17.0.6
|
rev: v17.0.6
|
||||||
|
|||||||
25
CODEOWNERS
25
CODEOWNERS
@@ -1,33 +1,17 @@
|
|||||||
# Catch-all for anything which isn't matched by a line lower down
|
|
||||||
* @github/code-scanning-alert-coverage
|
|
||||||
|
|
||||||
# CodeQL language libraries
|
|
||||||
/actions/ @github/codeql-dynamic
|
/actions/ @github/codeql-dynamic
|
||||||
/cpp/ @github/codeql-c-analysis
|
/cpp/ @github/codeql-c-analysis
|
||||||
/csharp/ @github/codeql-csharp
|
/csharp/ @github/codeql-csharp
|
||||||
/csharp/autobuilder/Semmle.Autobuild.Cpp @github/codeql-c-extractor @github/code-scanning-language-coverage
|
/csharp/autobuilder/Semmle.Autobuild.Cpp @github/codeql-c-extractor
|
||||||
/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests @github/codeql-c-extractor @github/code-scanning-language-coverage
|
/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests @github/codeql-c-extractor
|
||||||
/go/ @github/codeql-go
|
/go/ @github/codeql-go
|
||||||
/go/codeql-tools/ @github/codeql-go @github/code-scanning-language-coverage
|
|
||||||
/go/downgrades/ @github/codeql-go @github/code-scanning-language-coverage
|
|
||||||
/go/extractor/ @github/codeql-go @github/code-scanning-language-coverage
|
|
||||||
/go/extractor-smoke-test/ @github/codeql-go @github/code-scanning-language-coverage
|
|
||||||
/go/ql/test/extractor-tests/ @github/codeql-go @github/code-scanning-language-coverage
|
|
||||||
/java/ @github/codeql-java
|
/java/ @github/codeql-java
|
||||||
/javascript/ @github/codeql-javascript
|
/javascript/ @github/codeql-javascript
|
||||||
/javascript/extractor/ @github/codeql-javascript @github/code-scanning-language-coverage
|
|
||||||
/python/ @github/codeql-python
|
/python/ @github/codeql-python
|
||||||
/python/extractor/ @github/codeql-python @github/code-scanning-language-coverage
|
|
||||||
/ql/ @github/codeql-ql-for-ql-reviewers
|
|
||||||
/ruby/ @github/codeql-ruby
|
/ruby/ @github/codeql-ruby
|
||||||
/ruby/extractor/ @github/codeql-ruby @github/code-scanning-language-coverage
|
|
||||||
/rust/ @github/codeql-rust
|
/rust/ @github/codeql-rust
|
||||||
/rust/extractor/ @github/codeql-rust @github/code-scanning-language-coverage
|
|
||||||
/shared/ @github/codeql-shared-libraries-reviewers
|
|
||||||
/swift/ @github/codeql-swift
|
/swift/ @github/codeql-swift
|
||||||
/swift/extractor/ @github/codeql-swift @github/code-scanning-language-coverage
|
|
||||||
/misc/codegen/ @github/codeql-swift
|
/misc/codegen/ @github/codeql-swift
|
||||||
/java/kotlin-extractor/ @github/codeql-kotlin @github/code-scanning-language-coverage
|
/java/kotlin-extractor/ @github/codeql-kotlin
|
||||||
/java/ql/test-kotlin1/ @github/codeql-kotlin
|
/java/ql/test-kotlin1/ @github/codeql-kotlin
|
||||||
/java/ql/test-kotlin2/ @github/codeql-kotlin
|
/java/ql/test-kotlin2/ @github/codeql-kotlin
|
||||||
|
|
||||||
@@ -41,6 +25,9 @@
|
|||||||
/docs/codeql/ql-language-reference/ @github/codeql-frontend-reviewers
|
/docs/codeql/ql-language-reference/ @github/codeql-frontend-reviewers
|
||||||
/docs/query-*-style-guide.md @github/codeql-analysis-reviewers
|
/docs/query-*-style-guide.md @github/codeql-analysis-reviewers
|
||||||
|
|
||||||
|
# QL for QL reviewers
|
||||||
|
/ql/ @github/codeql-ql-for-ql-reviewers
|
||||||
|
|
||||||
# Bazel (excluding BUILD.bazel files)
|
# Bazel (excluding BUILD.bazel files)
|
||||||
MODULE.bazel @github/codeql-ci-reviewers
|
MODULE.bazel @github/codeql-ci-reviewers
|
||||||
.bazelversion @github/codeql-ci-reviewers
|
.bazelversion @github/codeql-ci-reviewers
|
||||||
|
|||||||
1539
Cargo.lock
generated
1539
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -4,13 +4,10 @@
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"shared/tree-sitter-extractor",
|
"shared/tree-sitter-extractor",
|
||||||
"shared/yeast",
|
|
||||||
"shared/yeast-macros",
|
|
||||||
"ruby/extractor",
|
"ruby/extractor",
|
||||||
"unified/extractor",
|
|
||||||
"unified/extractor/tree-sitter-swift",
|
|
||||||
"rust/extractor",
|
"rust/extractor",
|
||||||
"rust/extractor/macros",
|
"rust/extractor/macros",
|
||||||
"rust/ast-generator",
|
"rust/ast-generator",
|
||||||
"rust/autobuild",
|
"rust/autobuild",
|
||||||
]
|
]
|
||||||
|
exclude = ["mad-generation-build"]
|
||||||
|
|||||||
204
MODULE.bazel
204
MODULE.bazel
@@ -14,24 +14,22 @@ local_path_override(
|
|||||||
|
|
||||||
# see https://registry.bazel.build/ for a list of available packages
|
# see https://registry.bazel.build/ for a list of available packages
|
||||||
|
|
||||||
bazel_dep(name = "platforms", version = "1.0.0")
|
bazel_dep(name = "platforms", version = "0.0.11")
|
||||||
bazel_dep(name = "rules_cc", version = "0.2.17")
|
bazel_dep(name = "rules_go", version = "0.50.1")
|
||||||
bazel_dep(name = "rules_go", version = "0.60.0")
|
bazel_dep(name = "rules_pkg", version = "1.0.1")
|
||||||
bazel_dep(name = "rules_java", version = "9.6.1")
|
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
|
||||||
bazel_dep(name = "rules_pkg", version = "1.2.0")
|
bazel_dep(name = "rules_python", version = "0.40.0")
|
||||||
bazel_dep(name = "rules_nodejs", version = "6.7.3")
|
bazel_dep(name = "rules_shell", version = "0.3.0")
|
||||||
bazel_dep(name = "rules_python", version = "1.9.0")
|
bazel_dep(name = "bazel_skylib", version = "1.7.1")
|
||||||
bazel_dep(name = "rules_shell", version = "0.7.1")
|
bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "absl")
|
||||||
bazel_dep(name = "bazel_skylib", version = "1.9.0")
|
|
||||||
bazel_dep(name = "abseil-cpp", version = "20260107.1", repo_name = "absl")
|
|
||||||
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
|
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
|
||||||
bazel_dep(name = "fmt", version = "12.1.0-codeql.1")
|
bazel_dep(name = "fmt", version = "10.0.0")
|
||||||
bazel_dep(name = "rules_kotlin", version = "2.2.2-codeql.1")
|
bazel_dep(name = "rules_kotlin", version = "2.1.3-codeql.1")
|
||||||
bazel_dep(name = "gazelle", version = "0.50.0")
|
bazel_dep(name = "gazelle", version = "0.40.0")
|
||||||
bazel_dep(name = "rules_dotnet", version = "0.21.5-codeql.1")
|
bazel_dep(name = "rules_dotnet", version = "0.17.4")
|
||||||
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
|
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
|
||||||
bazel_dep(name = "rules_rust", version = "0.69.0")
|
bazel_dep(name = "rules_rust", version = "0.58.0")
|
||||||
bazel_dep(name = "zstd", version = "1.5.7.bcr.1")
|
bazel_dep(name = "zstd", version = "1.5.5.bcr.1")
|
||||||
|
|
||||||
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
|
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
|
||||||
|
|
||||||
@@ -39,11 +37,7 @@ bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True
|
|||||||
# the versions there are canonical, the versions here are used for CI in github/codeql, as well as for the vendoring of dependencies.
|
# the versions there are canonical, the versions here are used for CI in github/codeql, as well as for the vendoring of dependencies.
|
||||||
RUST_EDITION = "2024"
|
RUST_EDITION = "2024"
|
||||||
|
|
||||||
# run buildutils-internal/scripts/fill-rust-sha256s.py when updating (internal repo)
|
RUST_VERSION = "1.86.0"
|
||||||
# a nightly toolchain is required to enable experimental_use_cc_common_link, which we require internally
|
|
||||||
# we prefer to run the same version as internally, even if experimental_use_cc_common_link is not really
|
|
||||||
# required in this repo
|
|
||||||
RUST_VERSION = "nightly/2026-01-22"
|
|
||||||
|
|
||||||
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
|
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
|
||||||
rust.toolchain(
|
rust.toolchain(
|
||||||
@@ -53,29 +47,6 @@ rust.toolchain(
|
|||||||
"x86_64-apple-darwin",
|
"x86_64-apple-darwin",
|
||||||
"aarch64-apple-darwin",
|
"aarch64-apple-darwin",
|
||||||
],
|
],
|
||||||
# generated by buildutils-internal/scripts/fill-rust-sha256s.py (internal repo)
|
|
||||||
sha256s = {
|
|
||||||
"2026-01-22/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz": "88db619323cc1321630d124efa51ed02fabc5e020f08cfa0eda2c0ac1afbe69a",
|
|
||||||
"2026-01-22/rustc-nightly-x86_64-apple-darwin.tar.xz": "08484da3fa38db56f93629aeabdc0ae9ff8ed9704c0792d35259cbc849b3f54c",
|
|
||||||
"2026-01-22/rustc-nightly-aarch64-apple-darwin.tar.xz": "a39c0b21b7058e364ea1bd43144e42e4bf1efade036b2e82455f2afce194ee81",
|
|
||||||
"2026-01-22/rustc-nightly-x86_64-pc-windows-msvc.tar.xz": "d00248ee9850dbb6932b2578e32ff74fc7c429854c1aa071066ca31b65385a3b",
|
|
||||||
"2026-01-22/clippy-nightly-x86_64-unknown-linux-gnu.tar.xz": "70656a0ce994ffff16d5a35a7b170a0acd41e9bb54a589c96ed45bf97b094a4d",
|
|
||||||
"2026-01-22/clippy-nightly-x86_64-apple-darwin.tar.xz": "fe242519fa961522734733009705aec3c2d9a20cc57291f2aa614e5e6262c88f",
|
|
||||||
"2026-01-22/clippy-nightly-aarch64-apple-darwin.tar.xz": "38bb226363ec97c9722edf966cd58774a683e19fd2ff2a6030094445d51e06f9",
|
|
||||||
"2026-01-22/clippy-nightly-x86_64-pc-windows-msvc.tar.xz": "6da9b4470beea67abfebf046f141eee0d2a8db7c7a9e4e2294478734fd477228",
|
|
||||||
"2026-01-22/cargo-nightly-x86_64-unknown-linux-gnu.tar.xz": "99004e9d10c43a01499642f53bb3184d41137a95d65bfb217098840a9e79e892",
|
|
||||||
"2026-01-22/cargo-nightly-x86_64-apple-darwin.tar.xz": "6e021394cf8d8400ac6cfdfcef24e4d74f988e91eb8028b36de3a64ce3502990",
|
|
||||||
"2026-01-22/cargo-nightly-aarch64-apple-darwin.tar.xz": "4b2494cb69ab64132cddbc411a38ea9f1105e54d6f986e43168d54f79510c673",
|
|
||||||
"2026-01-22/cargo-nightly-x86_64-pc-windows-msvc.tar.xz": "c36613cf57407212d10d37b76e49a60ff42336e953cdff9e177283f530a83fc1",
|
|
||||||
"2026-01-22/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz": "0b123c5027dbd833aae6845ffe9bd07d309bf798746a7176aadaea68fbcbd05d",
|
|
||||||
"2026-01-22/llvm-tools-nightly-x86_64-apple-darwin.tar.xz": "a47864491ad5619158c950ab7570fb6e487d5117338585c27334d45824b406d8",
|
|
||||||
"2026-01-22/llvm-tools-nightly-aarch64-apple-darwin.tar.xz": "db9bc826d6e2e7e914505d50157682e516ceb90357e83d77abddc32c2d962f41",
|
|
||||||
"2026-01-22/llvm-tools-nightly-x86_64-pc-windows-msvc.tar.xz": "ffaa406932b2fe62e01dad61cf4ed34860a5d2a6f9306ca340d79e630d930039",
|
|
||||||
"2026-01-22/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz": "e9c0d5e06e18a4b509391b3088f29293e310cdc8ccc865be8fa3f09733326925",
|
|
||||||
"2026-01-22/rust-std-nightly-x86_64-apple-darwin.tar.xz": "25d75995cee679a4828ca9fe48c5a31a67c3b0846018440ef912e5a6208f53f6",
|
|
||||||
"2026-01-22/rust-std-nightly-aarch64-apple-darwin.tar.xz": "e4132bf3f2eed4684c86756a02315bcf481c23e675e3e25630fc604c9cb4594c",
|
|
||||||
"2026-01-22/rust-std-nightly-x86_64-pc-windows-msvc.tar.xz": "961bb535ef95ae8a5fa4e224cb94aff190f155c45a9bcf7a53e184b024aa41b1",
|
|
||||||
},
|
|
||||||
versions = [RUST_VERSION],
|
versions = [RUST_VERSION],
|
||||||
)
|
)
|
||||||
use_repo(rust, "rust_toolchains")
|
use_repo(rust, "rust_toolchains")
|
||||||
@@ -91,8 +62,8 @@ use_repo(
|
|||||||
"vendor_py__cc-1.2.14",
|
"vendor_py__cc-1.2.14",
|
||||||
"vendor_py__clap-4.5.30",
|
"vendor_py__clap-4.5.30",
|
||||||
"vendor_py__regex-1.11.1",
|
"vendor_py__regex-1.11.1",
|
||||||
"vendor_py__tree-sitter-0.24.7",
|
"vendor_py__tree-sitter-0.20.4",
|
||||||
"vendor_py__tree-sitter-graph-0.12.0",
|
"vendor_py__tree-sitter-graph-0.7.0",
|
||||||
)
|
)
|
||||||
|
|
||||||
# deps for ruby+rust
|
# deps for ruby+rust
|
||||||
@@ -100,60 +71,55 @@ use_repo(
|
|||||||
tree_sitter_extractors_deps = use_extension("//misc/bazel/3rdparty:tree_sitter_extractors_extension.bzl", "r")
|
tree_sitter_extractors_deps = use_extension("//misc/bazel/3rdparty:tree_sitter_extractors_extension.bzl", "r")
|
||||||
use_repo(
|
use_repo(
|
||||||
tree_sitter_extractors_deps,
|
tree_sitter_extractors_deps,
|
||||||
"vendor_ts__anyhow-1.0.100",
|
"vendor_ts__anyhow-1.0.98",
|
||||||
"vendor_ts__argfile-0.2.1",
|
"vendor_ts__argfile-0.2.1",
|
||||||
"vendor_ts__cc-1.2.61",
|
"vendor_ts__chalk-ir-0.103.0",
|
||||||
"vendor_ts__chalk-ir-0.104.0",
|
"vendor_ts__chrono-0.4.41",
|
||||||
"vendor_ts__chrono-0.4.42",
|
"vendor_ts__clap-4.5.40",
|
||||||
"vendor_ts__clap-4.5.48",
|
|
||||||
"vendor_ts__dunce-1.0.5",
|
"vendor_ts__dunce-1.0.5",
|
||||||
"vendor_ts__either-1.15.0",
|
"vendor_ts__either-1.15.0",
|
||||||
"vendor_ts__encoding-0.2.33",
|
"vendor_ts__encoding-0.2.33",
|
||||||
"vendor_ts__figment-0.10.19",
|
"vendor_ts__figment-0.10.19",
|
||||||
"vendor_ts__flate2-1.1.2",
|
"vendor_ts__flate2-1.1.0",
|
||||||
"vendor_ts__glob-0.3.3",
|
"vendor_ts__glob-0.3.2",
|
||||||
"vendor_ts__globset-0.4.16",
|
"vendor_ts__globset-0.4.15",
|
||||||
"vendor_ts__itertools-0.14.0",
|
"vendor_ts__itertools-0.14.0",
|
||||||
"vendor_ts__lazy_static-1.5.0",
|
"vendor_ts__lazy_static-1.5.0",
|
||||||
"vendor_ts__mustache-0.9.0",
|
"vendor_ts__mustache-0.9.0",
|
||||||
"vendor_ts__num-traits-0.2.19",
|
"vendor_ts__num-traits-0.2.19",
|
||||||
"vendor_ts__num_cpus-1.17.0",
|
"vendor_ts__num_cpus-1.17.0",
|
||||||
"vendor_ts__proc-macro2-1.0.101",
|
"vendor_ts__proc-macro2-1.0.95",
|
||||||
"vendor_ts__quote-1.0.41",
|
"vendor_ts__quote-1.0.40",
|
||||||
"vendor_ts__ra_ap_base_db-0.0.301",
|
"vendor_ts__ra_ap_base_db-0.0.288",
|
||||||
"vendor_ts__ra_ap_cfg-0.0.301",
|
"vendor_ts__ra_ap_cfg-0.0.288",
|
||||||
"vendor_ts__ra_ap_hir-0.0.301",
|
"vendor_ts__ra_ap_hir-0.0.288",
|
||||||
"vendor_ts__ra_ap_hir_def-0.0.301",
|
"vendor_ts__ra_ap_hir_def-0.0.288",
|
||||||
"vendor_ts__ra_ap_hir_expand-0.0.301",
|
"vendor_ts__ra_ap_hir_expand-0.0.288",
|
||||||
"vendor_ts__ra_ap_hir_ty-0.0.301",
|
"vendor_ts__ra_ap_hir_ty-0.0.288",
|
||||||
"vendor_ts__ra_ap_ide_db-0.0.301",
|
"vendor_ts__ra_ap_ide_db-0.0.288",
|
||||||
"vendor_ts__ra_ap_intern-0.0.301",
|
"vendor_ts__ra_ap_intern-0.0.288",
|
||||||
"vendor_ts__ra_ap_load-cargo-0.0.301",
|
"vendor_ts__ra_ap_load-cargo-0.0.288",
|
||||||
"vendor_ts__ra_ap_parser-0.0.301",
|
"vendor_ts__ra_ap_parser-0.0.288",
|
||||||
"vendor_ts__ra_ap_paths-0.0.301",
|
"vendor_ts__ra_ap_paths-0.0.288",
|
||||||
"vendor_ts__ra_ap_project_model-0.0.301",
|
"vendor_ts__ra_ap_project_model-0.0.288",
|
||||||
"vendor_ts__ra_ap_span-0.0.301",
|
"vendor_ts__ra_ap_span-0.0.288",
|
||||||
"vendor_ts__ra_ap_stdx-0.0.301",
|
"vendor_ts__ra_ap_stdx-0.0.288",
|
||||||
"vendor_ts__ra_ap_syntax-0.0.301",
|
"vendor_ts__ra_ap_syntax-0.0.288",
|
||||||
"vendor_ts__ra_ap_vfs-0.0.301",
|
"vendor_ts__ra_ap_vfs-0.0.288",
|
||||||
"vendor_ts__rand-0.9.2",
|
"vendor_ts__rand-0.9.1",
|
||||||
"vendor_ts__rayon-1.11.0",
|
"vendor_ts__rayon-1.10.0",
|
||||||
"vendor_ts__regex-1.11.3",
|
"vendor_ts__regex-1.11.1",
|
||||||
"vendor_ts__serde-1.0.228",
|
"vendor_ts__serde-1.0.219",
|
||||||
"vendor_ts__serde_json-1.0.145",
|
"vendor_ts__serde_json-1.0.140",
|
||||||
"vendor_ts__serde_with-3.14.1",
|
"vendor_ts__serde_with-3.13.0",
|
||||||
"vendor_ts__serde_yaml-0.9.34-deprecated",
|
"vendor_ts__syn-2.0.103",
|
||||||
"vendor_ts__syn-2.0.106",
|
"vendor_ts__toml-0.8.23",
|
||||||
"vendor_ts__toml-0.9.7",
|
|
||||||
"vendor_ts__tracing-0.1.41",
|
"vendor_ts__tracing-0.1.41",
|
||||||
"vendor_ts__tracing-flame-0.2.0",
|
"vendor_ts__tracing-flame-0.2.0",
|
||||||
"vendor_ts__tracing-subscriber-0.3.20",
|
"vendor_ts__tracing-subscriber-0.3.19",
|
||||||
"vendor_ts__tree-sitter-0.26.8",
|
"vendor_ts__tree-sitter-0.24.6",
|
||||||
"vendor_ts__tree-sitter-embedded-template-0.25.0",
|
"vendor_ts__tree-sitter-embedded-template-0.23.2",
|
||||||
"vendor_ts__tree-sitter-generate-0.26.8",
|
|
||||||
"vendor_ts__tree-sitter-json-0.24.8",
|
"vendor_ts__tree-sitter-json-0.24.8",
|
||||||
"vendor_ts__tree-sitter-language-0.1.5",
|
|
||||||
"vendor_ts__tree-sitter-python-0.23.6",
|
|
||||||
"vendor_ts__tree-sitter-ql-0.23.1",
|
"vendor_ts__tree-sitter-ql-0.23.1",
|
||||||
"vendor_ts__tree-sitter-ruby-0.23.1",
|
"vendor_ts__tree-sitter-ruby-0.23.1",
|
||||||
"vendor_ts__triomphe-0.1.14",
|
"vendor_ts__triomphe-0.1.14",
|
||||||
@@ -179,7 +145,7 @@ http_archive(
|
|||||||
)
|
)
|
||||||
|
|
||||||
dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
|
dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
|
||||||
dotnet.toolchain(dotnet_version = "10.0.100")
|
dotnet.toolchain(dotnet_version = "9.0.100")
|
||||||
use_repo(dotnet, "dotnet_toolchains")
|
use_repo(dotnet, "dotnet_toolchains")
|
||||||
|
|
||||||
register_toolchains("@dotnet_toolchains//:all")
|
register_toolchains("@dotnet_toolchains//:all")
|
||||||
@@ -195,15 +161,6 @@ pip.parse(
|
|||||||
)
|
)
|
||||||
use_repo(pip, "codegen_deps")
|
use_repo(pip, "codegen_deps")
|
||||||
|
|
||||||
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
|
|
||||||
python.toolchain(
|
|
||||||
is_default = True,
|
|
||||||
python_version = "3.12",
|
|
||||||
)
|
|
||||||
use_repo(python, "python_3_12", "python_versions")
|
|
||||||
|
|
||||||
register_toolchains("@python_versions//3.12:all")
|
|
||||||
|
|
||||||
swift_deps = use_extension("//swift/third_party:load.bzl", "swift_deps")
|
swift_deps = use_extension("//swift/third_party:load.bzl", "swift_deps")
|
||||||
|
|
||||||
# following list can be kept in sync with `bazel mod tidy`
|
# following list can be kept in sync with `bazel mod tidy`
|
||||||
@@ -237,6 +194,10 @@ use_repo(
|
|||||||
kotlin_extractor_deps,
|
kotlin_extractor_deps,
|
||||||
"codeql_kotlin_defaults",
|
"codeql_kotlin_defaults",
|
||||||
"codeql_kotlin_embeddable",
|
"codeql_kotlin_embeddable",
|
||||||
|
"kotlin-compiler-1.6.0",
|
||||||
|
"kotlin-compiler-1.6.20",
|
||||||
|
"kotlin-compiler-1.7.0",
|
||||||
|
"kotlin-compiler-1.7.20",
|
||||||
"kotlin-compiler-1.8.0",
|
"kotlin-compiler-1.8.0",
|
||||||
"kotlin-compiler-1.9.0-Beta",
|
"kotlin-compiler-1.9.0-Beta",
|
||||||
"kotlin-compiler-1.9.20-Beta",
|
"kotlin-compiler-1.9.20-Beta",
|
||||||
@@ -245,9 +206,10 @@ use_repo(
|
|||||||
"kotlin-compiler-2.1.0-Beta1",
|
"kotlin-compiler-2.1.0-Beta1",
|
||||||
"kotlin-compiler-2.1.20-Beta1",
|
"kotlin-compiler-2.1.20-Beta1",
|
||||||
"kotlin-compiler-2.2.0-Beta1",
|
"kotlin-compiler-2.2.0-Beta1",
|
||||||
"kotlin-compiler-2.2.20-Beta2",
|
"kotlin-compiler-embeddable-1.6.0",
|
||||||
"kotlin-compiler-2.3.0",
|
"kotlin-compiler-embeddable-1.6.20",
|
||||||
"kotlin-compiler-2.3.20",
|
"kotlin-compiler-embeddable-1.7.0",
|
||||||
|
"kotlin-compiler-embeddable-1.7.20",
|
||||||
"kotlin-compiler-embeddable-1.8.0",
|
"kotlin-compiler-embeddable-1.8.0",
|
||||||
"kotlin-compiler-embeddable-1.9.0-Beta",
|
"kotlin-compiler-embeddable-1.9.0-Beta",
|
||||||
"kotlin-compiler-embeddable-1.9.20-Beta",
|
"kotlin-compiler-embeddable-1.9.20-Beta",
|
||||||
@@ -256,9 +218,10 @@ use_repo(
|
|||||||
"kotlin-compiler-embeddable-2.1.0-Beta1",
|
"kotlin-compiler-embeddable-2.1.0-Beta1",
|
||||||
"kotlin-compiler-embeddable-2.1.20-Beta1",
|
"kotlin-compiler-embeddable-2.1.20-Beta1",
|
||||||
"kotlin-compiler-embeddable-2.2.0-Beta1",
|
"kotlin-compiler-embeddable-2.2.0-Beta1",
|
||||||
"kotlin-compiler-embeddable-2.2.20-Beta2",
|
"kotlin-stdlib-1.6.0",
|
||||||
"kotlin-compiler-embeddable-2.3.0",
|
"kotlin-stdlib-1.6.20",
|
||||||
"kotlin-compiler-embeddable-2.3.20",
|
"kotlin-stdlib-1.7.0",
|
||||||
|
"kotlin-stdlib-1.7.20",
|
||||||
"kotlin-stdlib-1.8.0",
|
"kotlin-stdlib-1.8.0",
|
||||||
"kotlin-stdlib-1.9.0-Beta",
|
"kotlin-stdlib-1.9.0-Beta",
|
||||||
"kotlin-stdlib-1.9.20-Beta",
|
"kotlin-stdlib-1.9.20-Beta",
|
||||||
@@ -267,28 +230,33 @@ use_repo(
|
|||||||
"kotlin-stdlib-2.1.0-Beta1",
|
"kotlin-stdlib-2.1.0-Beta1",
|
||||||
"kotlin-stdlib-2.1.20-Beta1",
|
"kotlin-stdlib-2.1.20-Beta1",
|
||||||
"kotlin-stdlib-2.2.0-Beta1",
|
"kotlin-stdlib-2.2.0-Beta1",
|
||||||
"kotlin-stdlib-2.2.20-Beta2",
|
|
||||||
"kotlin-stdlib-2.3.0",
|
|
||||||
"kotlin-stdlib-2.3.20",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
|
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
|
||||||
go_sdk.download(version = "1.26.4")
|
go_sdk.download(version = "1.24.0")
|
||||||
|
|
||||||
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
|
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
|
||||||
go_deps.from_file(go_mod = "//go/extractor:go.mod")
|
go_deps.from_file(go_mod = "//go/extractor:go.mod")
|
||||||
use_repo(go_deps, "com_github_stretchr_testify", "org_golang_x_mod", "org_golang_x_tools")
|
use_repo(go_deps, "org_golang_x_mod", "org_golang_x_tools")
|
||||||
|
|
||||||
ripunzip_archive = use_repo_rule("//misc/ripunzip:ripunzip.bzl", "ripunzip_archive")
|
lfs_archive = use_repo_rule("//misc/bazel:lfs.bzl", "lfs_archive")
|
||||||
|
|
||||||
# go to https://github.com/GoogleChrome/ripunzip/releases to find latest version and corresponding sha256s
|
lfs_archive(
|
||||||
ripunzip_archive(
|
name = "ripunzip-linux",
|
||||||
name = "ripunzip",
|
src = "//misc/ripunzip:ripunzip-Linux.zip",
|
||||||
sha256_linux = "71482d7a7e4ea9176d5596161c49250c34b136b157c45f632b1111323fbfc0de",
|
build_file = "//misc/ripunzip:BUILD.ripunzip.bazel",
|
||||||
sha256_macos_arm = "604194ab13f0aba3972995d995f11002b8fc285c8170401fcd46655065df20c9",
|
)
|
||||||
sha256_macos_intel = "65367b94fd579d93d46f2d2595cc4c9a60cfcf497e3c824f9d1a7b80fa8bd38a",
|
|
||||||
sha256_windows = "ac3874075def2b9e5074a3b5945005ab082cc6e689e1de658da8965bc23e643e",
|
lfs_archive(
|
||||||
version = "2.0.4",
|
name = "ripunzip-windows",
|
||||||
|
src = "//misc/ripunzip:ripunzip-Windows.zip",
|
||||||
|
build_file = "//misc/ripunzip:BUILD.ripunzip.bazel",
|
||||||
|
)
|
||||||
|
|
||||||
|
lfs_archive(
|
||||||
|
name = "ripunzip-macos",
|
||||||
|
src = "//misc/ripunzip:ripunzip-macOS.zip",
|
||||||
|
build_file = "//misc/ripunzip:BUILD.ripunzip.bazel",
|
||||||
)
|
)
|
||||||
|
|
||||||
register_toolchains(
|
register_toolchains(
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
name: "actions"
|
name: "actions"
|
||||||
|
aliases: []
|
||||||
display_name: "GitHub Actions"
|
display_name: "GitHub Actions"
|
||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
column_kind: "utf16"
|
column_kind: "utf16"
|
||||||
unicode_newlines: true
|
unicode_newlines: true
|
||||||
build_modes:
|
build_modes:
|
||||||
- none
|
- none
|
||||||
default_queries:
|
file_coverage_languages: []
|
||||||
- codeql/actions-queries
|
|
||||||
# Actions workflows are not reported separately by the GitHub API, so we can't
|
|
||||||
# associate them with a specific language.
|
|
||||||
github_api_languages: []
|
github_api_languages: []
|
||||||
scc_languages:
|
scc_languages: []
|
||||||
- YAML
|
|
||||||
file_types:
|
file_types:
|
||||||
- name: workflow
|
- name: workflow
|
||||||
display_name: GitHub Actions workflow files
|
display_name: GitHub Actions workflow files
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"paths": [
|
|
||||||
".github/workflows/*.yml",
|
|
||||||
".github/workflows/*.yaml",
|
|
||||||
".github/reusable_workflows/**/*.yml",
|
|
||||||
".github/reusable_workflows/**/*.yaml",
|
|
||||||
"**/action.yml",
|
|
||||||
"**/action.yaml"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
type "%CODEQL_EXTRACTOR_ACTIONS_ROOT%\tools\baseline-config.json"
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
cat "$CODEQL_EXTRACTOR_ACTIONS_ROOT/tools/baseline-config.json"
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
lockVersion: 1.0.0
|
|
||||||
dependencies: {}
|
|
||||||
compiled: false
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
name: codeql/actions-examples
|
|
||||||
groups:
|
|
||||||
- actions
|
|
||||||
- examples
|
|
||||||
dependencies:
|
|
||||||
codeql/actions-all: ${workspace}
|
|
||||||
warnOnImplicitThis: true
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/**
|
|
||||||
* @name Uses step with pinned SHA
|
|
||||||
* @description Finds 'uses' steps where the version is a pinned SHA.
|
|
||||||
* @id actions/examples/uses-pinned-sha
|
|
||||||
* @tags example
|
|
||||||
*/
|
|
||||||
|
|
||||||
import actions
|
|
||||||
|
|
||||||
from UsesStep uses
|
|
||||||
where uses.getVersion().regexpMatch("^[A-Fa-f0-9]{40}([A-Fa-f0-9]{24})?$")
|
|
||||||
select uses, "This 'uses' step has a pinned SHA version."
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
ql/actions/ql/src/Diagnostics/SuccessfullyExtractedFiles.ql
|
|
||||||
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.ql
|
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.ql
|
||||||
ql/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.ql
|
ql/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.ql
|
||||||
ql/actions/ql/src/Security/CWE-094/CodeInjectionCritical.ql
|
ql/actions/ql/src/Security/CWE-094/CodeInjectionCritical.ql
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
ql/actions/ql/src/Debug/SyntaxError.ql
|
ql/actions/ql/src/Debug/SyntaxError.ql
|
||||||
ql/actions/ql/src/Diagnostics/SuccessfullyExtractedFiles.ql
|
|
||||||
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.ql
|
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.ql
|
||||||
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionMedium.ql
|
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionMedium.ql
|
||||||
ql/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.ql
|
ql/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.ql
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
ql/actions/ql/src/Diagnostics/SuccessfullyExtractedFiles.ql
|
|
||||||
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.ql
|
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.ql
|
||||||
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionMedium.ql
|
ql/actions/ql/src/Security/CWE-077/EnvPathInjectionMedium.ql
|
||||||
ql/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.ql
|
ql/actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.ql
|
||||||
|
|||||||
@@ -1,115 +1,3 @@
|
|||||||
## 0.4.37
|
|
||||||
|
|
||||||
### Minor Analysis Improvements
|
|
||||||
|
|
||||||
* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used.
|
|
||||||
|
|
||||||
## 0.4.36
|
|
||||||
|
|
||||||
### Minor Analysis Improvements
|
|
||||||
|
|
||||||
* Altered 2 patterns in the `poisonable_steps` modelling. Extra sinks are detected in the following cases: scripts executed via python modules and `go run` in directories are detected as potential mechanisms of injection. For the go execution pattern, the pattern is updated to now ignore flags that occur between go and the specific command. This change may lead to more results being detected by the following queries: `actions/untrusted-checkout/high`, `actions/untrusted-checkout/critical`, `actions/untrusted-checkout-toctou/high`, `actions/untrusted-checkout-toctou/critical`, `actions/cache-poisoning/poisonable-step`, `actions/cache-poisoning/direct-cache` and `actions/artifact-poisoning/path-traversal`.
|
|
||||||
|
|
||||||
## 0.4.35
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.34
|
|
||||||
|
|
||||||
### Minor Analysis Improvements
|
|
||||||
|
|
||||||
* Removed false positive injection sink models for the `context` input of `docker/build-push-action` and the `allowed-endpoints` input of `step-security/harden-runner`.
|
|
||||||
|
|
||||||
## 0.4.33
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.32
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.31
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.30
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.29
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.28
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.27
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* Fixed a crash when analysing a `${{ ... }}` expression over around 300 characters in length.
|
|
||||||
|
|
||||||
## 0.4.26
|
|
||||||
|
|
||||||
### Major Analysis Improvements
|
|
||||||
|
|
||||||
* The query `actions/code-injection/medium` has been updated to include results which were incorrectly excluded while filtering out results that are reported by `actions/code-injection/critical`.
|
|
||||||
|
|
||||||
## 0.4.25
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.24
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.23
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.22
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.21
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.20
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.19
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.18
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.17
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.16
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.15
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.14
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
|
|
||||||
## 0.4.13
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* The `actions/artifact-poisoning/critical` and `actions/artifact-poisoning/medium` queries now exclude artifacts downloaded to `$[{ runner.temp }}` in addition to `/tmp`.
|
|
||||||
|
|
||||||
## 0.4.12
|
## 0.4.12
|
||||||
|
|
||||||
### Minor Analysis Improvements
|
### Minor Analysis Improvements
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
## 0.4.13
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* The `actions/artifact-poisoning/critical` and `actions/artifact-poisoning/medium` queries now exclude artifacts downloaded to `$[{ runner.temp }}` in addition to `/tmp`.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.14
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.15
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.16
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.17
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.18
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.19
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.20
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.21
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.22
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.23
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.24
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.25
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
## 0.4.26
|
|
||||||
|
|
||||||
### Major Analysis Improvements
|
|
||||||
|
|
||||||
* The query `actions/code-injection/medium` has been updated to include results which were incorrectly excluded while filtering out results that are reported by `actions/code-injection/critical`.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
## 0.4.27
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* Fixed a crash when analysing a `${{ ... }}` expression over around 300 characters in length.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.28
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.29
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.30
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.31
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.32
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.33
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
## 0.4.34
|
|
||||||
|
|
||||||
### Minor Analysis Improvements
|
|
||||||
|
|
||||||
* Removed false positive injection sink models for the `context` input of `docker/build-push-action` and the `allowed-endpoints` input of `step-security/harden-runner`.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
## 0.4.35
|
|
||||||
|
|
||||||
No user-facing changes.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
## 0.4.36
|
|
||||||
|
|
||||||
### Minor Analysis Improvements
|
|
||||||
|
|
||||||
* Altered 2 patterns in the `poisonable_steps` modelling. Extra sinks are detected in the following cases: scripts executed via python modules and `go run` in directories are detected as potential mechanisms of injection. For the go execution pattern, the pattern is updated to now ignore flags that occur between go and the specific command. This change may lead to more results being detected by the following queries: `actions/untrusted-checkout/high`, `actions/untrusted-checkout/critical`, `actions/untrusted-checkout-toctou/high`, `actions/untrusted-checkout-toctou/critical`, `actions/cache-poisoning/poisonable-step`, `actions/cache-poisoning/direct-cache` and `actions/artifact-poisoning/path-traversal`.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
## 0.4.37
|
|
||||||
|
|
||||||
### Minor Analysis Improvements
|
|
||||||
|
|
||||||
* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used.
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 0.4.37
|
lastReleaseVersion: 0.4.12
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ class Location extends TLocation, TBaseLocation {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if this element is at the specified location.
|
* Holds if this element is at the specified location.
|
||||||
* The location spans column `sc` of line `sl` to
|
* The location spans column `startcolumn` of line `startline` to
|
||||||
* column `ec` of line `el` in file `p`.
|
* column `endcolumn` of line `endline` in file `filepath`.
|
||||||
* For more information, see
|
* For more information, see
|
||||||
* [Providing locations in CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
|
* [Providing locations in CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ class If extends AstNode instanceof IfImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An Environment node representing a deployment environment.
|
* An Environemnt node representing a deployment environment.
|
||||||
*/
|
*/
|
||||||
class Environment extends AstNode instanceof EnvironmentImpl {
|
class Environment extends AstNode instanceof EnvironmentImpl {
|
||||||
string getName() { result = super.getName() }
|
string getName() { result = super.getName() }
|
||||||
|
|||||||
@@ -785,22 +785,7 @@ module Bash {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if the given regex is used to match an alphanumeric string
|
* Holds if the given regex is used to match an alphanumeric string
|
||||||
* eg: `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$`, `^[0-9]+$` or `^[a-zA-Z0-9_]+$`
|
* eg: `^[0-9a-zA-Z]{40}$`, `^[0-9]+$` or `^[a-zA-Z0-9_]+$`
|
||||||
*/
|
*/
|
||||||
string alphaNumericRegex() {
|
string alphaNumericRegex() { result = "^\\^\\[([09azAZ_-]+)\\](\\+|\\{\\d+\\})\\$$" }
|
||||||
exists(string r1, string r2, string r3, string r4 |
|
|
||||||
// An alphanumeric character class
|
|
||||||
r1 = "\\[([09azAZ_-]+)\\]" and
|
|
||||||
// The same as above, followed by a quantifier like `+` or `{20}`
|
|
||||||
r2 = r1 + "(\\+|\\{\\d+\\})" and
|
|
||||||
// The same as above, possibly with parentheses around it
|
|
||||||
r3 = "\\(?" + r2 + "\\)?" and
|
|
||||||
// The same as above, possibly with a `?` after it
|
|
||||||
r4 = r3 + "\\??"
|
|
||||||
|
|
|
||||||
// The same as above, repeated one or more times, and with `^` at the
|
|
||||||
// beginning and `$` at the end
|
|
||||||
result = "^\\^(" + r4 + ")+\\$$"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ string normalizePath(string path) {
|
|||||||
then result = path
|
then result = path
|
||||||
else
|
else
|
||||||
// foo -> GITHUB_WORKSPACE/foo
|
// foo -> GITHUB_WORKSPACE/foo
|
||||||
if path.regexpMatch("^[^$/~].*")
|
if path.regexpMatch("^[^/~].*")
|
||||||
then result = "GITHUB_WORKSPACE/" + path.regexpReplaceAll("/$", "")
|
then result = "GITHUB_WORKSPACE/" + path.regexpReplaceAll("/$", "")
|
||||||
else
|
else
|
||||||
// ~/foo -> ~/foo
|
// ~/foo -> ~/foo
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ string getADelimitedExpression(YamlString s, int offset) {
|
|||||||
// not just the last (greedy match) or first (reluctant match).
|
// not just the last (greedy match) or first (reluctant match).
|
||||||
result =
|
result =
|
||||||
s.getValue()
|
s.getValue()
|
||||||
.regexpFind("\\$\\{\\{(?:[^}]|}(?!}))*+\\}\\}", _, offset)
|
.regexpFind("\\$\\{\\{(?:[^}]|}(?!}))*\\}\\}", _, offset)
|
||||||
.regexpCapture("(\\$\\{\\{(?:[^}]|}(?!}))*+\\}\\})", 1)
|
.regexpCapture("(\\$\\{\\{(?:[^}]|}(?!}))*\\}\\})", 1)
|
||||||
.trim()
|
.trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,11 +125,12 @@ abstract class AstNodeImpl extends TAstNode {
|
|||||||
* Gets the enclosing Step.
|
* Gets the enclosing Step.
|
||||||
*/
|
*/
|
||||||
StepImpl getEnclosingStep() {
|
StepImpl getEnclosingStep() {
|
||||||
this instanceof StepImpl and
|
if this instanceof StepImpl
|
||||||
result = this
|
then result = this
|
||||||
or
|
else
|
||||||
this instanceof ScalarValueImpl and
|
if this instanceof ScalarValueImpl
|
||||||
result.getAChildNode*() = this.getParentNode()
|
then result.getAChildNode*() = this.getParentNode()
|
||||||
|
else none()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1415,8 +1416,9 @@ class ExternalJobImpl extends JobImpl, UsesImpl {
|
|||||||
override string getVersion() {
|
override string getVersion() {
|
||||||
exists(YamlString name |
|
exists(YamlString name |
|
||||||
n.lookup("uses") = name and
|
n.lookup("uses") = name and
|
||||||
not name.getValue().matches("\\.%") and
|
if not name.getValue().matches("\\.%")
|
||||||
result = name.getValue().regexpCapture(repoUsesParser(), 4)
|
then result = name.getValue().regexpCapture(repoUsesParser(), 4)
|
||||||
|
else none()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ private module Cached {
|
|||||||
/**
|
/**
|
||||||
* Holds if `cfn` is the `i`th node in basic block `bb`.
|
* Holds if `cfn` is the `i`th node in basic block `bb`.
|
||||||
*
|
*
|
||||||
* In other words, `i` is the shortest distance from a node `bbStart`
|
* In other words, `i` is the shortest distance from a node `bb`
|
||||||
* that starts a basic block to `cfn` along the `intraBBSucc` relation.
|
* that starts a basic block to `cfn` along the `intraBBSucc` relation.
|
||||||
*/
|
*/
|
||||||
cached
|
cached
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ private import codeql.controlflow.Cfg as CfgShared
|
|||||||
private import codeql.Locations
|
private import codeql.Locations
|
||||||
|
|
||||||
module Completion {
|
module Completion {
|
||||||
import codeql.controlflow.SuccessorType
|
|
||||||
|
|
||||||
private newtype TCompletion =
|
private newtype TCompletion =
|
||||||
TSimpleCompletion() or
|
TSimpleCompletion() or
|
||||||
TBooleanCompletion(boolean b) { b in [false, true] } or
|
TBooleanCompletion(boolean b) { b in [false, true] } or
|
||||||
@@ -27,7 +25,7 @@ module Completion {
|
|||||||
|
|
||||||
override predicate isValidFor(AstNode e) { not any(Completion c).isValidForSpecific(e) }
|
override predicate isValidFor(AstNode e) { not any(Completion c).isValidForSpecific(e) }
|
||||||
|
|
||||||
override DirectSuccessor getAMatchingSuccessorType() { any() }
|
override NormalSuccessor getAMatchingSuccessorType() { any() }
|
||||||
}
|
}
|
||||||
|
|
||||||
class BooleanCompletion extends NormalCompletion, TBooleanCompletion {
|
class BooleanCompletion extends NormalCompletion, TBooleanCompletion {
|
||||||
@@ -51,6 +49,34 @@ module Completion {
|
|||||||
|
|
||||||
override ReturnSuccessor getAMatchingSuccessorType() { any() }
|
override ReturnSuccessor getAMatchingSuccessorType() { any() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cached
|
||||||
|
private newtype TSuccessorType =
|
||||||
|
TNormalSuccessor() or
|
||||||
|
TBooleanSuccessor(boolean b) { b in [false, true] } or
|
||||||
|
TReturnSuccessor()
|
||||||
|
|
||||||
|
class SuccessorType extends TSuccessorType {
|
||||||
|
string toString() { none() }
|
||||||
|
}
|
||||||
|
|
||||||
|
class NormalSuccessor extends SuccessorType, TNormalSuccessor {
|
||||||
|
override string toString() { result = "successor" }
|
||||||
|
}
|
||||||
|
|
||||||
|
class BooleanSuccessor extends SuccessorType, TBooleanSuccessor {
|
||||||
|
boolean value;
|
||||||
|
|
||||||
|
BooleanSuccessor() { this = TBooleanSuccessor(value) }
|
||||||
|
|
||||||
|
override string toString() { result = value.toString() }
|
||||||
|
|
||||||
|
boolean getValue() { result = value }
|
||||||
|
}
|
||||||
|
|
||||||
|
class ReturnSuccessor extends SuccessorType, TReturnSuccessor {
|
||||||
|
override string toString() { result = "return" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module CfgScope {
|
module CfgScope {
|
||||||
@@ -101,8 +127,14 @@ private module Implementation implements CfgShared::InputSig<Location> {
|
|||||||
last(scope.(CompositeAction), e, c)
|
last(scope.(CompositeAction), e, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
predicate successorTypeIsSimple(SuccessorType t) { t instanceof NormalSuccessor }
|
||||||
|
|
||||||
|
predicate successorTypeIsCondition(SuccessorType t) { t instanceof BooleanSuccessor }
|
||||||
|
|
||||||
SuccessorType getAMatchingSuccessorType(Completion c) { result = c.getAMatchingSuccessorType() }
|
SuccessorType getAMatchingSuccessorType(Completion c) { result = c.getAMatchingSuccessorType() }
|
||||||
|
|
||||||
|
predicate isAbnormalExitType(SuccessorType t) { none() }
|
||||||
|
|
||||||
int idOfAstNode(AstNode node) { none() }
|
int idOfAstNode(AstNode node) { none() }
|
||||||
|
|
||||||
int idOfCfgScope(CfgScope scope) { none() }
|
int idOfCfgScope(CfgScope scope) { none() }
|
||||||
|
|||||||
@@ -63,10 +63,10 @@ predicate madSource(DataFlow::Node source, string kind, string fieldName) {
|
|||||||
(
|
(
|
||||||
if fieldName.trim().matches("env.%")
|
if fieldName.trim().matches("env.%")
|
||||||
then source.asExpr() = uses.getInScopeEnvVarExpr(fieldName.trim().replaceAll("env.", ""))
|
then source.asExpr() = uses.getInScopeEnvVarExpr(fieldName.trim().replaceAll("env.", ""))
|
||||||
else (
|
else
|
||||||
fieldName.trim().matches("output.%") and
|
if fieldName.trim().matches("output.%")
|
||||||
source.asExpr() = uses
|
then source.asExpr() = uses
|
||||||
)
|
else none()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ abstract class RemoteFlowSource extends SourceNode {
|
|||||||
class GitHubCtxSource extends RemoteFlowSource {
|
class GitHubCtxSource extends RemoteFlowSource {
|
||||||
string flag;
|
string flag;
|
||||||
string event;
|
string event;
|
||||||
|
GitHubExpression e;
|
||||||
|
|
||||||
GitHubCtxSource() {
|
GitHubCtxSource() {
|
||||||
exists(GitHubExpression e |
|
|
||||||
this.asExpr() = e and
|
this.asExpr() = e and
|
||||||
// github.head_ref
|
// github.head_ref
|
||||||
e.getFieldName() = "head_ref" and
|
e.getFieldName() = "head_ref" and
|
||||||
flag = "branch"
|
flag = "branch" and
|
||||||
|
|
(
|
||||||
event = e.getATriggerEvent().getName() and
|
event = e.getATriggerEvent().getName() and
|
||||||
event = "pull_request_target"
|
event = "pull_request_target"
|
||||||
or
|
or
|
||||||
@@ -148,6 +148,7 @@ class GhCLICommandSource extends RemoteFlowSource, CommandSource {
|
|||||||
class GitHubEventPathSource extends RemoteFlowSource, CommandSource {
|
class GitHubEventPathSource extends RemoteFlowSource, CommandSource {
|
||||||
string cmd;
|
string cmd;
|
||||||
string flag;
|
string flag;
|
||||||
|
string access_path;
|
||||||
Run run;
|
Run run;
|
||||||
|
|
||||||
// Examples
|
// Examples
|
||||||
@@ -162,7 +163,7 @@ class GitHubEventPathSource extends RemoteFlowSource, CommandSource {
|
|||||||
run.getScript().getACommand() = cmd and
|
run.getScript().getACommand() = cmd and
|
||||||
cmd.matches("jq%") and
|
cmd.matches("jq%") and
|
||||||
cmd.matches("%GITHUB_EVENT_PATH%") and
|
cmd.matches("%GITHUB_EVENT_PATH%") and
|
||||||
exists(string regexp, string access_path |
|
exists(string regexp |
|
||||||
untrustedEventPropertiesDataModel(regexp, flag) and
|
untrustedEventPropertiesDataModel(regexp, flag) and
|
||||||
not flag = "json" and
|
not flag = "json" and
|
||||||
access_path = "github.event" + cmd.regexpCapture(".*\\s+([^\\s]+)\\s+.*", 1) and
|
access_path = "github.event" + cmd.regexpCapture(".*\\s+([^\\s]+)\\s+.*", 1) and
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user