mirror of
https://github.com/github/codeql.git
synced 2026-07-07 12:35:33 +02:00
Compare commits
1 Commits
codeql-cli
...
redsun82/r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a5737fe4d |
21
.bazelrc
21
.bazelrc
@@ -1,10 +1,8 @@
|
|||||||
common --enable_platform_specific_config
|
common --enable_platform_specific_config
|
||||||
|
common --enable_bzlmod
|
||||||
# because we use --override_module with `%workspace%`, the lock file is not stable
|
# because we use --override_module with `%workspace%`, the lock file is not stable
|
||||||
common --lockfile_mode=off
|
common --lockfile_mode=off
|
||||||
|
|
||||||
# Build release binaries by default, can be overwritten to in local.bazelrc and set to `fastbuild` or `dbg`
|
|
||||||
build --compilation_mode opt
|
|
||||||
|
|
||||||
# when building from this repository in isolation, the internal repository will not be found at ..
|
# when building from this repository in isolation, the internal repository will not be found at ..
|
||||||
# where `MODULE.bazel` looks for it. The following will get us past the module loading phase, so
|
# where `MODULE.bazel` looks for it. The following will get us past the module loading phase, so
|
||||||
# that we can build things that do not rely on that
|
# that we can build things that do not rely on that
|
||||||
@@ -12,9 +10,6 @@ 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++
|
||||||
|
|
||||||
# print test output, like sembuild does.
|
|
||||||
# Set to `errors` if this is too verbose.
|
|
||||||
test --test_output all
|
|
||||||
# we use transitions that break builds of `...`, so for `test` to work with that we need the following
|
# we use transitions that break builds of `...`, so for `test` to work with that we need the following
|
||||||
test --build_tests_only
|
test --build_tests_only
|
||||||
|
|
||||||
@@ -29,17 +24,7 @@ common --registry=file:///%workspace%/misc/bazel/registry
|
|||||||
common --registry=https://bcr.bazel.build
|
common --registry=https://bcr.bazel.build
|
||||||
|
|
||||||
common --@rules_dotnet//dotnet/settings:strict_deps=false
|
common --@rules_dotnet//dotnet/settings:strict_deps=false
|
||||||
|
common --experimental_isolated_extension_usages
|
||||||
# we only configure a nightly toolchain
|
common --incompatible_use_plus_in_repo_names
|
||||||
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
|
|
||||||
common --incompatible_autoload_externally="+@rules_java,+@rules_shell"
|
|
||||||
|
|
||||||
build --java_language_version=17
|
|
||||||
build --tool_java_language_version=17
|
|
||||||
build --tool_java_runtime_version=remotejdk_17
|
|
||||||
build --java_runtime_version=remotejdk_17
|
|
||||||
build --@rules_python//python/config_settings:python_version=3.12
|
|
||||||
|
|
||||||
try-import %workspace%/local.bazelrc
|
try-import %workspace%/local.bazelrc
|
||||||
|
|||||||
@@ -8,5 +8,4 @@ common --registry=https://bcr.bazel.build
|
|||||||
# its implementation packages without providing any code itself.
|
# its implementation packages without providing any code itself.
|
||||||
# We either can depend on internal implementation details, or turn of strict deps.
|
# We either can depend on internal implementation details, or turn of strict deps.
|
||||||
common --@rules_dotnet//dotnet/settings:strict_deps=false
|
common --@rules_dotnet//dotnet/settings:strict_deps=false
|
||||||
|
common --experimental_isolated_extension_usages
|
||||||
build --@rules_python//python/config_settings:python_version=3.12
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
8.4.2
|
5f5d70b6c4d2fb1a889479569107f1692239e8a7
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
|
|
||||||
|
|
||||||
USER root
|
|
||||||
# Install needed packages according to https://codeql.github.com/docs/codeql-overview/system-requirements/
|
|
||||||
# most come from the base image, but we need to install some additional ones
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y sudo man-db python3.12 npm unminimize
|
|
||||||
RUN yes | unminimize
|
|
||||||
@@ -7,10 +7,6 @@
|
|||||||
"ms-vscode.test-adapter-converter",
|
"ms-vscode.test-adapter-converter",
|
||||||
"slevesque.vscode-zipexplorer"
|
"slevesque.vscode-zipexplorer"
|
||||||
],
|
],
|
||||||
"build": {
|
|
||||||
// Path is relative to the devcontainer.json file.
|
|
||||||
"dockerfile": "Dockerfile.codespaces"
|
|
||||||
},
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"files.watcherExclude": {
|
"files.watcherExclude": {
|
||||||
"**/target/**": true
|
"**/target/**": true
|
||||||
|
|||||||
9
.devcontainer/swift/Dockerfile
Normal file
9
.devcontainer/swift/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.236.0/containers/cpp/.devcontainer/base.Dockerfile
|
||||||
|
|
||||||
|
# [Choice] Debian / Ubuntu version (use Debian 11, Ubuntu 18.04/22.04 on local arm64/Apple Silicon): debian-11, debian-10, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
|
||||||
|
FROM mcr.microsoft.com/vscode/devcontainers/cpp:0-ubuntu-22.04
|
||||||
|
|
||||||
|
USER root
|
||||||
|
ADD root.sh /tmp/root.sh
|
||||||
|
ADD update-codeql.sh /usr/local/bin/update-codeql
|
||||||
|
RUN bash /tmp/root.sh && rm /tmp/root.sh
|
||||||
25
.devcontainer/swift/devcontainer.json
Normal file
25
.devcontainer/swift/devcontainer.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"extensions": [
|
||||||
|
"github.vscode-codeql",
|
||||||
|
"hbenl.vscode-test-explorer",
|
||||||
|
"ms-vscode.test-adapter-converter",
|
||||||
|
"slevesque.vscode-zipexplorer",
|
||||||
|
"ms-vscode.cpptools"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"files.watcherExclude": {
|
||||||
|
"**/target/**": true
|
||||||
|
},
|
||||||
|
"codeQL.runningQueries.memory": 2048
|
||||||
|
},
|
||||||
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile",
|
||||||
|
},
|
||||||
|
"runArgs": [
|
||||||
|
"--cap-add=SYS_PTRACE",
|
||||||
|
"--security-opt",
|
||||||
|
"seccomp=unconfined"
|
||||||
|
],
|
||||||
|
"remoteUser": "vscode",
|
||||||
|
"onCreateCommand": ".devcontainer/swift/user.sh"
|
||||||
|
}
|
||||||
34
.devcontainer/swift/root.sh
Executable file
34
.devcontainer/swift/root.sh
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
set -xe
|
||||||
|
|
||||||
|
BAZELISK_VERSION=v1.12.0
|
||||||
|
BAZELISK_DOWNLOAD_SHA=6b0bcb2ea15bca16fffabe6fda75803440375354c085480fe361d2cbf32501db
|
||||||
|
|
||||||
|
# install git lfs apt source
|
||||||
|
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
|
||||||
|
|
||||||
|
# install gh apt source
|
||||||
|
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
|
||||||
|
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
|
||||||
|
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
|
||||||
|
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
|
||||||
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
apt-get -y install --no-install-recommends \
|
||||||
|
zlib1g-dev \
|
||||||
|
uuid-dev \
|
||||||
|
python3-distutils \
|
||||||
|
python3-pip \
|
||||||
|
bash-completion \
|
||||||
|
git-lfs \
|
||||||
|
gh
|
||||||
|
|
||||||
|
# Install Bazel
|
||||||
|
curl -fSsL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-linux-amd64
|
||||||
|
echo "${BAZELISK_DOWNLOAD_SHA} */usr/local/bin/bazelisk" | sha256sum --check -
|
||||||
|
chmod 0755 /usr/local/bin/bazelisk
|
||||||
|
ln -s bazelisk /usr/local/bin/bazel
|
||||||
|
|
||||||
|
# install latest codeql
|
||||||
|
update-codeql
|
||||||
20
.devcontainer/swift/update-codeql.sh
Executable file
20
.devcontainer/swift/update-codeql.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
URL=https://github.com/github/codeql-cli-binaries/releases
|
||||||
|
LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' $URL/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
|
||||||
|
CURRENT_VERSION=v$(codeql version 2>/dev/null | sed -ne 's/.*release \([0-9.]*\)\./\1/p')
|
||||||
|
if [[ $CURRENT_VERSION != $LATEST_VERSION ]]; then
|
||||||
|
if [[ $UID != 0 ]]; then
|
||||||
|
echo "update required, please run this script with sudo:"
|
||||||
|
echo " sudo $0"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ZIP=$(mktemp codeql.XXXX.zip)
|
||||||
|
curl -fSqL -o $ZIP $URL/download/$LATEST_VERSION/codeql-linux64.zip
|
||||||
|
unzip -q $ZIP -d /opt
|
||||||
|
rm $ZIP
|
||||||
|
ln -sf /opt/codeql/codeql /usr/local/bin/codeql
|
||||||
|
echo installed version $LATEST_VERSION
|
||||||
|
else
|
||||||
|
echo current version $CURRENT_VERSION is up-to-date
|
||||||
|
fi
|
||||||
15
.devcontainer/swift/user.sh
Executable file
15
.devcontainer/swift/user.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
set -xe
|
||||||
|
|
||||||
|
git lfs install
|
||||||
|
|
||||||
|
# add the workspace to the codeql search path
|
||||||
|
mkdir -p /home/vscode/.config/codeql
|
||||||
|
echo "--search-path /workspaces/codeql" > /home/vscode/.config/codeql/config
|
||||||
|
|
||||||
|
# create a swift extractor pack with the current state
|
||||||
|
cd /workspaces/codeql
|
||||||
|
bazel run swift/create-extractor-pack
|
||||||
|
|
||||||
|
#install and set up pre-commit
|
||||||
|
python3 -m pip install pre-commit --no-warn-script-location
|
||||||
|
$HOME/.local/bin/pre-commit install
|
||||||
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -82,6 +82,8 @@
|
|||||||
/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/resource-dir/*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
/swift/third_party/resources/*.tar.zst filter=lfs diff=lfs merge=lfs -text
|
|
||||||
|
|||||||
5
.github/codeql/codeql-config.yml
vendored
5
.github/codeql/codeql-config.yml
vendored
@@ -4,13 +4,8 @@ queries:
|
|||||||
- uses: security-and-quality
|
- uses: security-and-quality
|
||||||
|
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '/actions/ql/test'
|
|
||||||
- '/cpp/'
|
- '/cpp/'
|
||||||
- '/java/'
|
- '/java/'
|
||||||
- '/python/'
|
- '/python/'
|
||||||
- '/javascript/ql/test'
|
- '/javascript/ql/test'
|
||||||
- '/javascript/ql/integration-tests'
|
|
||||||
- '/javascript/extractor/tests'
|
- '/javascript/extractor/tests'
|
||||||
- '/javascript/extractor/parser-tests'
|
|
||||||
- '/javascript/ql/src/'
|
|
||||||
- '/rust/ql'
|
|
||||||
|
|||||||
5
.github/dependabot.yml
vendored
5
.github/dependabot.yml
vendored
@@ -40,8 +40,3 @@ updates:
|
|||||||
- dependency-name: "*"
|
- dependency-name: "*"
|
||||||
reviewers:
|
reviewers:
|
||||||
- "github/codeql-go"
|
- "github/codeql-go"
|
||||||
|
|
||||||
- package-ecosystem: bazel
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
4
.github/labeler.yml
vendored
4
.github/labeler.yml
vendored
@@ -38,10 +38,6 @@ Swift:
|
|||||||
- swift/**/*
|
- swift/**/*
|
||||||
- change-notes/**/*swift*
|
- change-notes/**/*swift*
|
||||||
|
|
||||||
Actions:
|
|
||||||
- actions/**/*
|
|
||||||
- change-notes/**/*actions*
|
|
||||||
|
|
||||||
documentation:
|
documentation:
|
||||||
- "**/*.qhelp"
|
- "**/*.qhelp"
|
||||||
- "**/*.md"
|
- "**/*.md"
|
||||||
|
|||||||
14
.github/pull_request_template.md
vendored
Normal file
14
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
### Pull Request checklist
|
||||||
|
|
||||||
|
#### All query authors
|
||||||
|
|
||||||
|
- [ ] A change note is added if necessary. See [the documentation](https://github.com/github/codeql/blob/main/docs/change-notes.md) in this repository.
|
||||||
|
- [ ] All new queries have appropriate `.qhelp`. See [the documentation](https://github.com/github/codeql/blob/main/docs/query-help-style-guide.md) in this repository.
|
||||||
|
- [ ] QL tests are added if necessary. See [Testing custom queries](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/testing-custom-queries) in the GitHub documentation.
|
||||||
|
- [ ] New and changed queries have correct query metadata. See [the documentation](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md) in this repository.
|
||||||
|
|
||||||
|
#### Internal query authors only
|
||||||
|
|
||||||
|
- [ ] Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to `.ql`, `.qll`, or `.qhelp` files. See [the documentation](https://github.com/github/codeql-team/blob/main/docs/best-practices/validating-autofix-for-query-changes.md) (internal access required).
|
||||||
|
- [ ] Changes are validated [at scale](https://github.com/github/codeql-dca/) (internal access required).
|
||||||
|
- [ ] Adding a new query? Consider also [adding the query to autofix](https://github.com/github/codeml-autofix/blob/main/docs/updating-query-support.md#adding-a-new-query-to-the-query-suite).
|
||||||
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: v1.2.1
|
||||||
|
openssl-version:
|
||||||
|
description: "what reference to checkout from openssl/openssl for Linux"
|
||||||
|
required: false
|
||||||
|
default: openssl-3.3.0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04, macos-12, windows-2019]
|
||||||
|
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:
|
||||||
|
|||||||
1
.github/workflows/check-change-note.yml
vendored
1
.github/workflows/check-change-note.yml
vendored
@@ -16,6 +16,7 @@ on:
|
|||||||
- "shared/**/*.qll"
|
- "shared/**/*.qll"
|
||||||
- "!**/experimental/**"
|
- "!**/experimental/**"
|
||||||
- "!ql/**"
|
- "!ql/**"
|
||||||
|
- "!rust/**"
|
||||||
- ".github/workflows/check-change-note.yml"
|
- ".github/workflows/check-change-note.yml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
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: |
|
||||||
|
|||||||
23
.github/workflows/check-overlay-annotations.yml
vendored
23
.github/workflows/check-overlay-annotations.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Check overlay annotations
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- 'rc/*'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- 'rc/*'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
sync:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
- name: Check overlay annotations
|
|
||||||
run: python config/add-overlay-annotations.py --check java
|
|
||||||
|
|
||||||
5
.github/workflows/check-qldoc.yml
vendored
5
.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
|
||||||
|
|
||||||
@@ -30,8 +30,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
EXIT_CODE=0
|
EXIT_CODE=0
|
||||||
# TODO: remove the shared exception from the regex when coverage of qlpacks without dbschemes is supported
|
# TODO: remove the shared exception from the regex when coverage of qlpacks without dbschemes is supported
|
||||||
# TODO: remove the actions exception once https://github.com/github/codeql-team/issues/3656 is fixed
|
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -Po '^(?!(shared))[a-z]*/ql/lib' || true; } | sort -u)"
|
||||||
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -Po '^(?!(shared|actions))[a-z]*/ql/lib' || true; } | sort -u)"
|
|
||||||
for pack_dir in ${changed_lib_packs}; do
|
for pack_dir in ${changed_lib_packs}; do
|
||||||
lang="${pack_dir%/ql/lib}"
|
lang="${pack_dir%/ql/lib}"
|
||||||
codeql generate library-doc-coverage --output="${RUNNER_TEMP}/${lang}-current.txt" --dir="${pack_dir}"
|
codeql generate library-doc-coverage --output="${RUNNER_TEMP}/${lang}-current.txt" --dir="${pack_dir}"
|
||||||
|
|||||||
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
|
||||||
|
|||||||
11
.github/workflows/codeql-analysis.yml
vendored
11
.github/workflows/codeql-analysis.yml
vendored
@@ -18,10 +18,6 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CodeQL-Build:
|
CodeQL-Build:
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
language: ['actions', 'csharp']
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@@ -34,16 +30,17 @@ 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: 8.0.101
|
||||||
|
|
||||||
- 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
|
||||||
uses: github/codeql-action/init@main
|
uses: github/codeql-action/init@main
|
||||||
|
# Override language selection by uncommenting this and choosing your languages
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: csharp
|
||||||
config-file: ./.github/codeql/codeql-config.yml
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
|||||||
49
.github/workflows/compile-queries.yml
vendored
49
.github/workflows/compile-queries.yml
vendored
@@ -7,54 +7,17 @@ on:
|
|||||||
- "rc/*"
|
- "rc/*"
|
||||||
- "codeql-cli-*"
|
- "codeql-cli-*"
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
|
||||||
- '**.ql'
|
|
||||||
- '**.qll'
|
|
||||||
- '**/qlpack.yml'
|
|
||||||
- '**.dbscheme'
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
detect-changes:
|
|
||||||
if: github.repository_owner == 'github'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
languages: ${{ steps.detect.outputs.languages }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
- name: Detect changed languages
|
|
||||||
id: detect
|
|
||||||
run: |
|
|
||||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
|
||||||
# For PRs, detect which languages have changes
|
|
||||||
changed_files=$(gh pr view ${{ github.event.pull_request.number }} --json files --jq '.files.[].path')
|
|
||||||
languages=()
|
|
||||||
for lang in actions cpp csharp go java javascript python ql ruby rust swift; do
|
|
||||||
if echo "$changed_files" | grep -qE "^($lang/|shared/)" ; then
|
|
||||||
languages+=("$lang")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "languages=$(jq -c -n '$ARGS.positional' --args "${languages[@]}")" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
# For pushes to main/rc branches, run all languages
|
|
||||||
echo 'languages=["actions","cpp","csharp","go","java","javascript","python","ql","ruby","rust","swift"]' >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
|
|
||||||
compile-queries:
|
compile-queries:
|
||||||
needs: detect-changes
|
if: github.repository_owner == 'github'
|
||||||
if: github.repository_owner == 'github' && needs.detect-changes.outputs.languages != '[]'
|
|
||||||
runs-on: ubuntu-latest-xl
|
runs-on: ubuntu-latest-xl
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
language: ${{ fromJson(needs.detect-changes.outputs.languages) }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Setup CodeQL
|
- name: Setup CodeQL
|
||||||
uses: ./.github/actions/fetch-codeql
|
uses: ./.github/actions/fetch-codeql
|
||||||
with:
|
with:
|
||||||
@@ -63,16 +26,16 @@ jobs:
|
|||||||
id: query-cache
|
id: query-cache
|
||||||
uses: ./.github/actions/cache-query-compilation
|
uses: ./.github/actions/cache-query-compilation
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.language }}-queries
|
key: all-queries
|
||||||
- name: check formatting
|
- name: check formatting
|
||||||
run: find shared ${{ matrix.language }}/ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
|
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
|
- name: compile queries - check-only
|
||||||
# run with --check-only if running in a PR (github.sha != main)
|
# run with --check-only if running in a PR (github.sha != main)
|
||||||
if : ${{ github.event_name == 'pull_request' }}
|
if : ${{ github.event_name == 'pull_request' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: codeql query compile -q -j0 ${{ matrix.language }}/ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500 --ram=56000
|
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
|
||||||
- name: compile queries - full
|
- name: compile queries - full
|
||||||
# do full compile if running on main - this populates the cache
|
# do full compile if running on main - this populates the cache
|
||||||
if : ${{ github.event_name != 'pull_request' }}
|
if : ${{ github.event_name != 'pull_request' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: codeql query compile -q -j0 ${{ matrix.language }}/ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500 --ram=56000
|
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
|
||||||
|
|||||||
12
.github/workflows/cpp-swift-analysis.yml
vendored
12
.github/workflows/cpp-swift-analysis.yml
vendored
@@ -19,7 +19,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
CodeQL-Build:
|
CodeQL-Build:
|
||||||
|
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -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
|
||||||
@@ -38,15 +38,17 @@ jobs:
|
|||||||
languages: cpp
|
languages: cpp
|
||||||
config-file: ./.github/codeql/codeql-config.yml
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: "[Ubuntu] Remove GCC 13 from runner image"
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y uuid-dev
|
sudo apt-get install -y --allow-downgrades libc6=2.35-* libc6-dev=2.35-* libstdc++6=12.3.0-* libgcc-s1=12.3.0-*
|
||||||
|
|
||||||
- name: "Build Swift extractor using Bazel"
|
- name: "Build Swift extractor using Bazel"
|
||||||
run: |
|
run: |
|
||||||
bazel clean --expunge
|
bazel clean --expunge
|
||||||
bazel run //swift:install --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results --spawn_strategy=local
|
bazel run //swift:create-extractor-pack --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results --spawn_strategy=local
|
||||||
bazel shutdown
|
bazel shutdown
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
|
|||||||
22
.github/workflows/csharp-qltest.yml
vendored
22
.github/workflows/csharp-qltest.yml
vendored
@@ -5,10 +5,8 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "csharp/**"
|
- "csharp/**"
|
||||||
- "shared/**"
|
- "shared/**"
|
||||||
- "misc/bazel/**"
|
|
||||||
- .github/actions/fetch-codeql/action.yml
|
- .github/actions/fetch-codeql/action.yml
|
||||||
- codeql-workspace.yml
|
- codeql-workspace.yml
|
||||||
- "MODULE.bazel"
|
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- "rc/*"
|
- "rc/*"
|
||||||
@@ -16,11 +14,9 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "csharp/**"
|
- "csharp/**"
|
||||||
- "shared/**"
|
- "shared/**"
|
||||||
- "misc/bazel/**"
|
|
||||||
- .github/workflows/csharp-qltest.yml
|
- .github/workflows/csharp-qltest.yml
|
||||||
- .github/actions/fetch-codeql/action.yml
|
- .github/actions/fetch-codeql/action.yml
|
||||||
- codeql-workspace.yml
|
- codeql-workspace.yml
|
||||||
- "MODULE.bazel"
|
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- "rc/*"
|
- "rc/*"
|
||||||
@@ -36,26 +32,26 @@ jobs:
|
|||||||
unit-tests:
|
unit-tests:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-2019]
|
||||||
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: 8.0.101
|
||||||
- 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=8.0.1 extractor/Semmle.Util.Tests
|
||||||
dotnet test -p:RuntimeFrameworkVersion=10.0.0 extractor/Semmle.Extraction.Tests
|
dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Extraction.Tests
|
||||||
dotnet test -p:RuntimeFrameworkVersion=10.0.0 autobuilder/Semmle.Autobuild.CSharp.Tests
|
dotnet test -p:RuntimeFrameworkVersion=8.0.1 autobuilder/Semmle.Autobuild.CSharp.Tests
|
||||||
dotnet test -p:RuntimeFrameworkVersion=10.0.0 autobuilder/Semmle.Autobuild.Cpp.Tests
|
dotnet test -p:RuntimeFrameworkVersion=8.0.1 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: |
|
||||||
@@ -66,6 +62,6 @@ jobs:
|
|||||||
# Update existing stubs in the repo with the freshly generated ones
|
# Update existing stubs in the repo with the freshly generated ones
|
||||||
mv "$STUBS_PATH/output/stubs/_frameworks" ql/test/resources/stubs/
|
mv "$STUBS_PATH/output/stubs/_frameworks" ql/test/resources/stubs/
|
||||||
git status
|
git status
|
||||||
codeql test run --threads=0 --search-path "${{ github.workspace }}" --check-databases --check-diff-informed --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries -- ql/test/library-tests/dataflow/flowsources/aspremote
|
codeql test run --threads=0 --search-path "${{ github.workspace }}" --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries -- ql/test/library-tests/dataflow/flowsources/aspremote
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|||||||
8
.github/workflows/csv-coverage-metrics.yml
vendored
8
.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
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
DATABASE="${{ runner.temp }}/java-database"
|
DATABASE="${{ runner.temp }}/java-database"
|
||||||
codeql database analyze --format=sarif-latest --output=metrics-java.sarif -- "$DATABASE" ./java/ql/src/Metrics/Summaries/FrameworkCoverage.ql
|
codeql database analyze --format=sarif-latest --output=metrics-java.sarif -- "$DATABASE" ./java/ql/src/Metrics/Summaries/FrameworkCoverage.ql
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: metrics-java.sarif
|
name: metrics-java.sarif
|
||||||
path: metrics-java.sarif
|
path: metrics-java.sarif
|
||||||
@@ -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
|
||||||
@@ -64,7 +64,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
DATABASE="${{ runner.temp }}/csharp-database"
|
DATABASE="${{ runner.temp }}/csharp-database"
|
||||||
codeql database analyze --format=sarif-latest --output=metrics-csharp.sarif -- "$DATABASE" ./csharp/ql/src/Metrics/Summaries/FrameworkCoverage.ql
|
codeql database analyze --format=sarif-latest --output=metrics-csharp.sarif -- "$DATABASE" ./csharp/ql/src/Metrics/Summaries/FrameworkCoverage.ql
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: metrics-csharp.sarif
|
name: metrics-csharp.sarif
|
||||||
path: metrics-csharp.sarif
|
path: metrics-csharp.sarif
|
||||||
|
|||||||
14
.github/workflows/csv-coverage-pr-artifacts.yml
vendored
14
.github/workflows/csv-coverage-pr-artifacts.yml
vendored
@@ -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
|
||||||
@@ -71,21 +71,21 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python base/misc/scripts/library-coverage/compare-folders.py out_base out_merge comparison.md
|
python base/misc/scripts/library-coverage/compare-folders.py out_base out_merge comparison.md
|
||||||
- name: Upload CSV package list
|
- name: Upload CSV package list
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: csv-framework-coverage-merge
|
name: csv-framework-coverage-merge
|
||||||
path: |
|
path: |
|
||||||
out_merge/framework-coverage-*.csv
|
out_merge/framework-coverage-*.csv
|
||||||
out_merge/framework-coverage-*.rst
|
out_merge/framework-coverage-*.rst
|
||||||
- name: Upload CSV package list
|
- name: Upload CSV package list
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: csv-framework-coverage-base
|
name: csv-framework-coverage-base
|
||||||
path: |
|
path: |
|
||||||
out_base/framework-coverage-*.csv
|
out_base/framework-coverage-*.csv
|
||||||
out_base/framework-coverage-*.rst
|
out_base/framework-coverage-*.rst
|
||||||
- name: Upload comparison results
|
- name: Upload comparison results
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: comparison
|
name: comparison
|
||||||
path: |
|
path: |
|
||||||
@@ -97,7 +97,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
- name: Upload PR number
|
- name: Upload PR number
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: pr
|
name: pr
|
||||||
path: pr/
|
path: pr/
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
- name: Upload comment ID (if it exists)
|
- name: Upload comment ID (if it exists)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: comment
|
name: comment
|
||||||
path: comment/
|
path: comment/
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python script/misc/scripts/library-coverage/generate-timeseries.py codeqlModels
|
python script/misc/scripts/library-coverage/generate-timeseries.py codeqlModels
|
||||||
- name: Upload timeseries CSV
|
- name: Upload timeseries CSV
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: framework-coverage-timeseries
|
name: framework-coverage-timeseries
|
||||||
path: framework-coverage-timeseries-*.csv
|
path: framework-coverage-timeseries-*.csv
|
||||||
|
|||||||
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
|
||||||
|
|||||||
8
.github/workflows/csv-coverage.yml
vendored
8
.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 }}
|
||||||
@@ -34,12 +34,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python script/misc/scripts/library-coverage/generate-report.py ci codeqlModels script
|
python script/misc/scripts/library-coverage/generate-report.py ci codeqlModels script
|
||||||
- name: Upload CSV package list
|
- name: Upload CSV package list
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: framework-coverage-csv
|
name: framework-coverage-csv
|
||||||
path: framework-coverage-*.csv
|
path: framework-coverage-*.csv
|
||||||
- name: Upload RST package list
|
- name: Upload RST package list
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: framework-coverage-rst
|
name: framework-coverage-rst
|
||||||
path: framework-coverage-*.rst
|
path: framework-coverage-*.rst
|
||||||
|
|||||||
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/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:
|
||||||
|
if: github.repository_owner == 'github'
|
||||||
|
name: Test Windows
|
||||||
|
runs-on: windows-latest-xl
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run tests
|
||||||
|
uses: ./go/actions/test
|
||||||
13
.github/workflows/go-tests.yml
vendored
13
.github/workflows/go-tests.yml
vendored
@@ -1,9 +1,18 @@
|
|||||||
name: "Go: Run Tests"
|
name: "Go: Run Tests"
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "go/**"
|
||||||
|
- "shared/**"
|
||||||
|
- .github/workflows/go-tests.yml
|
||||||
|
- .github/actions/**
|
||||||
|
- codeql-workspace.yml
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "rc/*"
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "go/**"
|
- "go/**"
|
||||||
- "!go/documentation/**"
|
|
||||||
- "shared/**"
|
- "shared/**"
|
||||||
- .github/workflows/go-tests.yml
|
- .github/workflows/go-tests.yml
|
||||||
- .github/actions/**
|
- .github/actions/**
|
||||||
@@ -22,7 +31,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:
|
||||||
|
|||||||
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`
|
||||||
|
|||||||
22
.github/workflows/mad_modelDiff.yml
vendored
22
.github/workflows/mad_modelDiff.yml
vendored
@@ -28,30 +28,24 @@ 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
|
||||||
- uses: ./codeql-main/.github/actions/fetch-codeql
|
- uses: ./codeql-main/.github/actions/fetch-codeql
|
||||||
# compute the shortname of the project that does not contain any special (disk) characters
|
|
||||||
- run: |
|
|
||||||
echo "SHORTNAME=${SLUG//[^a-zA-Z0-9_]/}" >> $GITHUB_OUTPUT
|
|
||||||
env:
|
|
||||||
SLUG: ${{ matrix.slug }}
|
|
||||||
id: shortname
|
|
||||||
- name: Download database
|
- name: Download database
|
||||||
env:
|
env:
|
||||||
SLUG: ${{ matrix.slug }}
|
SLUG: ${{ matrix.slug }}
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
SHORTNAME: ${{ steps.shortname.outputs.SHORTNAME }}
|
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
mkdir lib-dbs
|
mkdir lib-dbs
|
||||||
|
SHORTNAME=${SLUG//[^a-zA-Z0-9_]/}
|
||||||
gh api -H "Accept: application/zip" "/repos/${SLUG}/code-scanning/codeql/databases/java" > "$SHORTNAME.zip"
|
gh api -H "Accept: application/zip" "/repos/${SLUG}/code-scanning/codeql/databases/java" > "$SHORTNAME.zip"
|
||||||
unzip -q -d "${SHORTNAME}-db" "${SHORTNAME}.zip"
|
unzip -q -d "${SHORTNAME}-db" "${SHORTNAME}.zip"
|
||||||
mkdir "lib-dbs/$SHORTNAME/"
|
mkdir "lib-dbs/$SHORTNAME/"
|
||||||
@@ -68,7 +62,7 @@ jobs:
|
|||||||
DATABASE=$2
|
DATABASE=$2
|
||||||
cd codeql-$QL_VARIANT
|
cd codeql-$QL_VARIANT
|
||||||
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 java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE $SHORTNAME/$QL_VARIANT
|
||||||
mkdir -p $MODELS/$SHORTNAME
|
mkdir -p $MODELS/$SHORTNAME
|
||||||
mv java/ql/lib/ext/generated/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME
|
mv java/ql/lib/ext/generated/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME
|
||||||
cd ..
|
cd ..
|
||||||
@@ -99,14 +93,14 @@ jobs:
|
|||||||
name="diff_${basename/.model.yml/""}"
|
name="diff_${basename/.model.yml/""}"
|
||||||
(diff -w -u $m $t | diff2html -i stdin -F $MODELS/$name.html) || true
|
(diff -w -u $m $t | diff2html -i stdin -F $MODELS/$name.html) || true
|
||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: models-${{ steps.shortname.outputs.SHORTNAME }}
|
name: models
|
||||||
path: tmp-models/**/**/*.model.yml
|
path: tmp-models/**/**/*.model.yml
|
||||||
retention-days: 20
|
retention-days: 20
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: diffs-${{ steps.shortname.outputs.SHORTNAME }}
|
name: diffs
|
||||||
path: tmp-models/*.html
|
path: tmp-models/*.html
|
||||||
# An html file is only produced if the generated models differ.
|
# An html file is only produced if the generated models differ.
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|||||||
6
.github/workflows/mad_regenerate-models.yml
vendored
6
.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 }}
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
find java -name "*.model.yml" -print0 | xargs -0 git add
|
find java -name "*.model.yml" -print0 | xargs -0 git add
|
||||||
git status
|
git status
|
||||||
git diff --cached > models.patch
|
git diff --cached > models.patch
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: patch
|
name: patch
|
||||||
path: models.patch
|
path: models.patch
|
||||||
|
|||||||
7
.github/workflows/post-pr-comment.yml
vendored
7
.github/workflows/post-pr-comment.yml
vendored
@@ -17,11 +17,8 @@ jobs:
|
|||||||
post_comment:
|
post_comment:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifact
|
||||||
run: |
|
run: gh run download "${WORKFLOW_RUN_ID}" --repo "${GITHUB_REPOSITORY}" --name "comment"
|
||||||
gh run download "${WORKFLOW_RUN_ID}" --repo "${GITHUB_REPOSITORY}" --name "comment-pr-number"
|
|
||||||
gh run download "${WORKFLOW_RUN_ID}" --repo "${GITHUB_REPOSITORY}" --name "comment-body"
|
|
||||||
gh run download "${WORKFLOW_RUN_ID}" --repo "${GITHUB_REPOSITORY}" --name "comment-id"
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }}
|
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }}
|
||||||
|
|||||||
35
.github/workflows/python-tooling.yml
vendored
35
.github/workflows/python-tooling.yml
vendored
@@ -1,35 +0,0 @@
|
|||||||
name: Python tooling
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "misc/bazel/**"
|
|
||||||
- "misc/codegen/**"
|
|
||||||
- "misc/scripts/models-as-data/bulk_generate_mad.py"
|
|
||||||
- "*.bazel*"
|
|
||||||
- .github/workflows/codegen.yml
|
|
||||||
- .pre-commit-config.yaml
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- rc/*
|
|
||||||
- codeql-cli-*
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-python-tooling:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.12'
|
|
||||||
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
|
|
||||||
name: Check that python code is properly formatted
|
|
||||||
with:
|
|
||||||
extra_args: black --all-files
|
|
||||||
- name: Run codegen tests
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
bazel test //misc/codegen/...
|
|
||||||
14
.github/workflows/qhelp-pr-preview.yml
vendored
14
.github/workflows/qhelp-pr-preview.yml
vendored
@@ -36,14 +36,14 @@ jobs:
|
|||||||
- run: echo "${PR_NUMBER}" > pr_number.txt
|
- run: echo "${PR_NUMBER}" > pr_number.txt
|
||||||
env:
|
env:
|
||||||
PR_NUMBER: ${{ github.event.number }}
|
PR_NUMBER: ${{ github.event.number }}
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: comment-pr-number
|
name: comment
|
||||||
path: pr_number.txt
|
path: pr_number.txt
|
||||||
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
|
||||||
@@ -78,9 +78,9 @@ jobs:
|
|||||||
exit "${EXIT_CODE}"
|
exit "${EXIT_CODE}"
|
||||||
|
|
||||||
- if: ${{ !cancelled() }}
|
- if: ${{ !cancelled() }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: comment-body
|
name: comment
|
||||||
path: comment_body.txt
|
path: comment_body.txt
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
@@ -94,9 +94,9 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
PR_NUMBER: ${{ github.event.number }}
|
PR_NUMBER: ${{ github.event.number }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: comment-id
|
name: comment
|
||||||
path: comment_id.txt
|
path: comment_id.txt
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|||||||
6
.github/workflows/ql-for-ql-build.yml
vendored
6
.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
|
||||||
@@ -75,7 +75,7 @@ jobs:
|
|||||||
sarif_file: ql-for-ql.sarif
|
sarif_file: ql-for-ql.sarif
|
||||||
category: ql-for-ql
|
category: ql-for-ql
|
||||||
- name: Sarif as artifact
|
- name: Sarif as artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ql-for-ql.sarif
|
name: ql-for-ql.sarif
|
||||||
path: ql-for-ql.sarif
|
path: ql-for-ql.sarif
|
||||||
@@ -84,7 +84,7 @@ jobs:
|
|||||||
mkdir split-sarif
|
mkdir split-sarif
|
||||||
node ./ql/scripts/split-sarif.js ql-for-ql.sarif split-sarif
|
node ./ql/scripts/split-sarif.js ql-for-ql.sarif split-sarif
|
||||||
- name: Upload langs as artifacts
|
- name: Upload langs as artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ql-for-ql-langs
|
name: ql-for-ql-langs
|
||||||
path: split-sarif
|
path: split-sarif
|
||||||
|
|||||||
14
.github/workflows/ql-for-ql-dataset_measure.yml
vendored
14
.github/workflows/ql-for-ql-dataset_measure.yml
vendored
@@ -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,14 +46,14 @@ 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
|
||||||
- name: Create database
|
- name: Create database
|
||||||
run: |
|
run: |
|
||||||
"${CODEQL}" database create \
|
"${CODEQL}" database create \
|
||||||
--search-path "${{ github.workspace }}" \
|
--search-path "${{ github.workspace }}"
|
||||||
--threads 4 \
|
--threads 4 \
|
||||||
--language ql --source-root "${{ github.workspace }}/repo" \
|
--language ql --source-root "${{ github.workspace }}/repo" \
|
||||||
"${{ runner.temp }}/database"
|
"${{ runner.temp }}/database"
|
||||||
@@ -65,7 +65,7 @@ jobs:
|
|||||||
"${CODEQL}" dataset measure --threads 4 --output "stats/${{ matrix.repo }}/stats.xml" "${{ runner.temp }}/database/db-ql"
|
"${CODEQL}" dataset measure --threads 4 --output "stats/${{ matrix.repo }}/stats.xml" "${{ runner.temp }}/database/db-ql"
|
||||||
env:
|
env:
|
||||||
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
|
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: measurements
|
name: measurements
|
||||||
path: stats
|
path: stats
|
||||||
@@ -75,15 +75,15 @@ 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@v3
|
||||||
with:
|
with:
|
||||||
name: measurements
|
name: measurements
|
||||||
path: stats
|
path: stats
|
||||||
- run: |
|
- run: |
|
||||||
python -m pip install --user lxml
|
python -m pip install --user lxml
|
||||||
find stats -name 'stats.xml' -print0 | sort -z | xargs -0 python ruby/scripts/merge_stats.py --output ql/ql/src/ql.dbscheme.stats --normalise ql_tokeninfo
|
find stats -name 'stats.xml' -print0 | sort -z | xargs -0 python ruby/scripts/merge_stats.py --output ql/ql/src/ql.dbscheme.stats --normalise ql_tokeninfo
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ql.dbscheme.stats
|
name: ql.dbscheme.stats
|
||||||
path: ql/ql/src/ql.dbscheme.stats
|
path: ql/ql/src/ql.dbscheme.stats
|
||||||
|
|||||||
6
.github/workflows/ql-for-ql-tests.yml
vendored
6
.github/workflows/ql-for-ql-tests.yml
vendored
@@ -24,7 +24,7 @@ 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
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
ql/target
|
ql/target
|
||||||
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-qltest-cargo-${{ hashFiles('ql/rust-toolchain.toml', 'ql/**/Cargo.lock') }}
|
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-qltest-cargo-${{ hashFiles('ql/rust-toolchain.toml', 'ql/**/Cargo.lock') }}
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: cd ql; cargo fmt -- --check
|
run: cd ql; cargo fmt --all -- --check
|
||||||
- name: Build extractor
|
- name: Build extractor
|
||||||
run: |
|
run: |
|
||||||
cd ql;
|
cd ql;
|
||||||
@@ -64,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: |
|
||||||
|
|||||||
6
.github/workflows/query-list.yml
vendored
6
.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,13 +31,13 @@ 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: |
|
||||||
python codeql/misc/scripts/generate-code-scanning-query-list.py > code-scanning-query-list.csv
|
python codeql/misc/scripts/generate-code-scanning-query-list.py > code-scanning-query-list.csv
|
||||||
- name: Upload code scanning query list
|
- name: Upload code scanning query list
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: code-scanning-query-list
|
name: code-scanning-query-list
|
||||||
path: code-scanning-query-list.csv
|
path: code-scanning-query-list.csv
|
||||||
|
|||||||
34
.github/workflows/ruby-build.yml
vendored
34
.github/workflows/ruby-build.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
|||||||
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: |
|
||||||
@@ -79,7 +79,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-rust-cargo-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/**/Cargo.lock') }}
|
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-rust-cargo-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/**/Cargo.lock') }}
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
||||||
run: cd extractor && cargo fmt -- --check
|
run: cd extractor && cargo fmt --all -- --check
|
||||||
- name: Build
|
- name: Build
|
||||||
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
if: steps.cache-extractor.outputs.cache-hit != 'true'
|
||||||
run: cd extractor && cargo build --verbose
|
run: cd extractor && cargo build --verbose
|
||||||
@@ -92,17 +92,17 @@ jobs:
|
|||||||
- name: Generate dbscheme
|
- name: Generate dbscheme
|
||||||
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
|
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
|
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
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
with:
|
with:
|
||||||
name: ruby.dbscheme
|
name: ruby.dbscheme
|
||||||
path: ruby/ql/lib/ruby.dbscheme
|
path: ruby/ql/lib/ruby.dbscheme
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
with:
|
with:
|
||||||
name: TreeSitter.qll
|
name: TreeSitter.qll
|
||||||
path: ruby/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
path: ruby/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: extractor-${{ matrix.os }}
|
name: extractor-${{ matrix.os }}
|
||||||
path: |
|
path: |
|
||||||
@@ -113,7 +113,7 @@ jobs:
|
|||||||
if: github.repository_owner == 'github'
|
if: github.repository_owner == 'github'
|
||||||
runs-on: ubuntu-latest-xl
|
runs-on: ubuntu-latest-xl
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Fetch CodeQL
|
- name: Fetch CodeQL
|
||||||
uses: ./.github/actions/fetch-codeql
|
uses: ./.github/actions/fetch-codeql
|
||||||
- name: Cache compilation cache
|
- name: Cache compilation cache
|
||||||
@@ -134,7 +134,7 @@ jobs:
|
|||||||
PACK_FOLDER=$(readlink -f "$PACKS"/codeql/ruby-queries/*)
|
PACK_FOLDER=$(readlink -f "$PACKS"/codeql/ruby-queries/*)
|
||||||
codeql generate query-help --format=sarifv2.1.0 --output="${PACK_FOLDER}/rules.sarif" ql/src
|
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}/{}" \;)
|
(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
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: codeql-ruby-queries
|
name: codeql-ruby-queries
|
||||||
path: |
|
path: |
|
||||||
@@ -146,20 +146,20 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build, compile-queries]
|
needs: [build, compile-queries]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ruby.dbscheme
|
name: ruby.dbscheme
|
||||||
path: ruby/ruby
|
path: ruby/ruby
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: extractor-ubuntu-latest
|
name: extractor-ubuntu-latest
|
||||||
path: ruby/linux64
|
path: ruby/linux64
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: extractor-windows-latest
|
name: extractor-windows-latest
|
||||||
path: ruby/win64
|
path: ruby/win64
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: extractor-macos-latest
|
name: extractor-macos-latest
|
||||||
path: ruby/osx64
|
path: ruby/osx64
|
||||||
@@ -172,13 +172,13 @@ jobs:
|
|||||||
cp win64/codeql-extractor-ruby.exe ruby/tools/win64/extractor.exe
|
cp win64/codeql-extractor-ruby.exe ruby/tools/win64/extractor.exe
|
||||||
chmod +x ruby/tools/{linux64,osx64}/extractor
|
chmod +x ruby/tools/{linux64,osx64}/extractor
|
||||||
zip -rq codeql-ruby.zip ruby
|
zip -rq codeql-ruby.zip ruby
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: codeql-ruby-pack
|
name: codeql-ruby-pack
|
||||||
path: ruby/codeql-ruby.zip
|
path: ruby/codeql-ruby.zip
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
include-hidden-files: true
|
include-hidden-files: true
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: codeql-ruby-queries
|
name: codeql-ruby-queries
|
||||||
path: ruby/qlpacks
|
path: ruby/qlpacks
|
||||||
@@ -190,7 +190,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
}' > .codeqlmanifest.json
|
}' > .codeqlmanifest.json
|
||||||
zip -rq codeql-ruby-bundle.zip .codeqlmanifest.json ruby qlpacks
|
zip -rq codeql-ruby-bundle.zip .codeqlmanifest.json ruby qlpacks
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: codeql-ruby-bundle
|
name: codeql-ruby-bundle
|
||||||
path: ruby/codeql-ruby-bundle.zip
|
path: ruby/codeql-ruby-bundle.zip
|
||||||
@@ -209,12 +209,12 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: [package]
|
needs: [package]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Fetch CodeQL
|
- name: Fetch CodeQL
|
||||||
uses: ./.github/actions/fetch-codeql
|
uses: ./.github/actions/fetch-codeql
|
||||||
|
|
||||||
- name: Download Ruby bundle
|
- name: Download Ruby bundle
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: codeql-ruby-bundle
|
name: codeql-ruby-bundle
|
||||||
path: ${{ runner.temp }}
|
path: ${{ runner.temp }}
|
||||||
|
|||||||
15
.github/workflows/ruby-dataset-measure.yml
vendored
15
.github/workflows/ruby-dataset-measure.yml
vendored
@@ -30,14 +30,14 @@ jobs:
|
|||||||
repo: [rails/rails, discourse/discourse, spree/spree, ruby/ruby]
|
repo: [rails/rails, discourse/discourse, spree/spree, ruby/ruby]
|
||||||
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: ./ruby/actions/create-extractor-pack
|
- uses: ./ruby/actions/create-extractor-pack
|
||||||
|
|
||||||
- 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
|
||||||
@@ -52,9 +52,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p "stats/${{ matrix.repo }}"
|
mkdir -p "stats/${{ matrix.repo }}"
|
||||||
codeql dataset measure --threads 4 --output "stats/${{ matrix.repo }}/stats.xml" "${{ runner.temp }}/database/db-ruby"
|
codeql dataset measure --threads 4 --output "stats/${{ matrix.repo }}/stats.xml" "${{ runner.temp }}/database/db-ruby"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: measurements-${{ hashFiles('stats/**') }}
|
name: measurements
|
||||||
path: stats
|
path: stats
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
@@ -62,14 +62,15 @@ 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@v3
|
||||||
with:
|
with:
|
||||||
|
name: measurements
|
||||||
path: stats
|
path: stats
|
||||||
- run: |
|
- run: |
|
||||||
python -m pip install --user lxml
|
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
|
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
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ruby.dbscheme.stats
|
name: ruby.dbscheme.stats
|
||||||
path: ruby/ql/lib/ruby.dbscheme.stats
|
path: ruby/ql/lib/ruby.dbscheme.stats
|
||||||
|
|||||||
40
.github/workflows/ruby-qltest-rtjo.yml
vendored
40
.github/workflows/ruby-qltest-rtjo.yml
vendored
@@ -1,40 +0,0 @@
|
|||||||
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@v5
|
|
||||||
- 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 }}
|
|
||||||
6
.github/workflows/ruby-qltest.yml
vendored
6
.github/workflows/ruby-qltest.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
qlupgrade:
|
qlupgrade:
|
||||||
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
|
||||||
- name: Check DB upgrade scripts
|
- name: Check DB upgrade scripts
|
||||||
run: |
|
run: |
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- uses: ./.github/actions/fetch-codeql
|
- uses: ./.github/actions/fetch-codeql
|
||||||
- uses: ./ruby/actions/create-extractor-pack
|
- uses: ./ruby/actions/create-extractor-pack
|
||||||
- name: Cache compilation cache
|
- name: Cache compilation cache
|
||||||
@@ -68,6 +68,6 @@ jobs:
|
|||||||
key: ruby-qltest
|
key: ruby-qltest
|
||||||
- name: Run QL tests
|
- name: Run QL tests
|
||||||
run: |
|
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 }}"
|
codeql test run --threads=0 --ram 50000 --search-path "${{ github.workspace }}" --check-databases --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:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|||||||
64
.github/workflows/rust-analysis.yml
vendored
64
.github/workflows/rust-analysis.yml
vendored
@@ -1,64 +0,0 @@
|
|||||||
name: "Code scanning - Rust"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- 'rc/*'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- 'rc/*'
|
|
||||||
paths:
|
|
||||||
- '**/*.rs'
|
|
||||||
- '**/Cargo.toml'
|
|
||||||
- '.github/codeql/codeql-config.yml'
|
|
||||||
- '.github/workflows/rust-analysis.yml'
|
|
||||||
schedule:
|
|
||||||
- cron: '0 9 * * 1'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CODEQL_ENABLE_EXPERIMENTAL_FEATURES: "true"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analyze:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
language: [ 'rust' ]
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
pull-requests: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
|
|
||||||
- name: Query latest nightly CodeQL bundle
|
|
||||||
shell: bash
|
|
||||||
id: codeql
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
run: |
|
|
||||||
REPO=dsp-testing/codeql-cli-nightlies
|
|
||||||
TAG=$(
|
|
||||||
gh release list -R $REPO -L1 --exclude-drafts --json tagName -q ".[] | .tagName"
|
|
||||||
)
|
|
||||||
echo "nightly_bundle=https://github.com/$REPO/releases/download/$TAG/codeql-bundle-linux64.tar.zst" \
|
|
||||||
| tee -a "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@main
|
|
||||||
with:
|
|
||||||
tools: ${{ steps.codeql.outputs.nightly_bundle }}
|
|
||||||
languages: ${{ matrix.language }}
|
|
||||||
config-file: ./.github/codeql/codeql-config.yml
|
|
||||||
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@main
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@main
|
|
||||||
36
.github/workflows/rust.yml
vendored
36
.github/workflows/rust.yml
vendored
@@ -23,53 +23,31 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rust-ast-generator:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: rust/ast-generator
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
- name: Inject sources
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
bazel run //rust/ast-generator:inject-sources
|
|
||||||
- name: Format
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cargo fmt --check
|
|
||||||
- name: Compilation
|
|
||||||
shell: bash
|
|
||||||
run: cargo check
|
|
||||||
- name: Clippy
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cargo clippy --no-deps -- -D warnings
|
|
||||||
rust-code:
|
rust-code:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: rust/extractor
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
- name: Format
|
- name: Format
|
||||||
|
working-directory: rust/extractor
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cargo fmt --check
|
cargo fmt --check
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
|
working-directory: rust/extractor
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cargo check
|
run: cargo check
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
|
working-directory: rust/extractor
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cargo clippy --no-deps -- -D warnings
|
cargo clippy --fix
|
||||||
|
git diff --exit-code
|
||||||
rust-codegen:
|
rust-codegen:
|
||||||
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
|
||||||
|
|||||||
95
.github/workflows/swift.yml
vendored
95
.github/workflows/swift.yml
vendored
@@ -18,50 +18,78 @@ on:
|
|||||||
- main
|
- main
|
||||||
- rc/*
|
- rc/*
|
||||||
- codeql-cli-*
|
- codeql-cli-*
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "swift/**"
|
||||||
|
- "misc/bazel/**"
|
||||||
|
- "misc/codegen/**"
|
||||||
|
- "shared/**"
|
||||||
|
- "*.bazel*"
|
||||||
|
- .github/workflows/swift.yml
|
||||||
|
- .github/actions/**
|
||||||
|
- codeql-workspace.yml
|
||||||
|
- .pre-commit-config.yaml
|
||||||
|
- "!**/*.md"
|
||||||
|
- "!**/*.qhelp"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- rc/*
|
||||||
|
- codeql-cli-*
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
working-directory: swift
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
# not using a matrix as you cannot depend on a specific job in a matrix, and we want to start linux checks
|
||||||
|
# without waiting for the macOS build
|
||||||
|
build-and-test-macos:
|
||||||
if: github.repository_owner == 'github'
|
if: github.repository_owner == 'github'
|
||||||
strategy:
|
runs-on: macos-12-xl
|
||||||
matrix:
|
|
||||||
runner: [ubuntu-latest, macos-15-xlarge]
|
|
||||||
fail-fast: false
|
|
||||||
runs-on: ${{ matrix.runner }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Setup (Linux)
|
- uses: ./swift/actions/build-and-test
|
||||||
if: runner.os == 'Linux'
|
build-and-test-linux:
|
||||||
run: |
|
if: github.repository_owner == 'github'
|
||||||
sudo apt-get update
|
runs-on: ubuntu-latest-xl
|
||||||
sudo apt-get install -y uuid-dev zlib1g-dev
|
steps:
|
||||||
- name: Build Swift extractor
|
- uses: actions/checkout@v4
|
||||||
shell: bash
|
- uses: ./swift/actions/build-and-test
|
||||||
run: |
|
qltests-linux:
|
||||||
bazel run :install
|
if: github.repository_owner == 'github'
|
||||||
- name: Run Swift tests
|
needs: build-and-test-linux
|
||||||
shell: bash
|
runs-on: ubuntu-latest-xl
|
||||||
run: |
|
steps:
|
||||||
bazel test ... --test_tag_filters=-override --test_output=errors
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./swift/actions/run-ql-tests
|
||||||
|
qltests-macos:
|
||||||
|
if: ${{ github.repository_owner == 'github' && github.event_name == 'pull_request' }}
|
||||||
|
needs: build-and-test-macos
|
||||||
|
runs-on: macos-12-xl
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./swift/actions/run-ql-tests
|
||||||
clang-format:
|
clang-format:
|
||||||
|
if : ${{ github.event_name == 'pull_request' }}
|
||||||
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:
|
||||||
extra_args: clang-format --all-files
|
extra_args: clang-format --all-files
|
||||||
codegen:
|
codegen:
|
||||||
|
if : ${{ github.event_name == 'pull_request' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
|
- uses: bazelbuild/setup-bazelisk@v2
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version-file: 'swift/.python-version'
|
||||||
|
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
|
||||||
|
name: Check that python code is properly formatted
|
||||||
|
with:
|
||||||
|
extra_args: autopep8 --all-files
|
||||||
- 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
|
||||||
@@ -69,14 +97,15 @@ jobs:
|
|||||||
extra_args: swift-codegen --all-files
|
extra_args: swift-codegen --all-files
|
||||||
- name: Generate C++ files
|
- name: Generate C++ files
|
||||||
run: |
|
run: |
|
||||||
bazel run codegen -- --generate=trap,cpp --cpp-output=$PWD/generated-cpp-files
|
bazel run //swift/codegen:codegen -- --generate=trap,cpp --cpp-output=$PWD/generated-cpp-files
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: swift-generated-cpp-files
|
name: swift-generated-cpp-files
|
||||||
path: generated-cpp-files/**
|
path: generated-cpp-files/**
|
||||||
check-no-override:
|
database-upgrade-scripts:
|
||||||
|
if : ${{ github.event_name == 'pull_request' }}
|
||||||
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
|
- uses: ./.github/actions/fetch-codeql
|
||||||
run: bazel test ... --test_tag_filters=override --test_output=errors
|
- uses: ./swift/actions/database-upgrade-scripts
|
||||||
|
|||||||
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,20 +30,20 @@ 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 --all -- --check
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose
|
run: cargo test --verbose
|
||||||
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
|
||||||
|
|||||||
4
.github/workflows/validate-change-notes.yml
vendored
4
.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
|
||||||
@@ -31,4 +31,4 @@ jobs:
|
|||||||
- name: Fail if there are any errors with existing change notes
|
- name: Fail if there are any errors with existing change notes
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
codeql pack release --groups actions,cpp,csharp,go,java,javascript,python,ruby,shared,swift -examples,-test,-experimental
|
codeql pack release --groups cpp,csharp,java,javascript,python,ruby,-examples,-test,-experimental
|
||||||
|
|||||||
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
|
||||||
|
|||||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
# qltest projects and artifacts
|
# qltest projects and artifacts
|
||||||
*.actual
|
*.actual
|
||||||
*/ql/test*/**/*.testproj
|
*/ql/test/**/*.testproj
|
||||||
*/ql/test/**/go.sum
|
*/ql/test/**/go.sum
|
||||||
|
|
||||||
# Visual studio temporaries, except a file used by QL4VS
|
# Visual studio temporaries, except a file used by QL4VS
|
||||||
@@ -62,7 +62,6 @@ node_modules/
|
|||||||
|
|
||||||
# Temporary folders for working with generated models
|
# Temporary folders for working with generated models
|
||||||
.model-temp
|
.model-temp
|
||||||
/mad-generation-build
|
|
||||||
|
|
||||||
# bazel-built in-tree extractor packs
|
# bazel-built in-tree extractor packs
|
||||||
/*/extractor-pack
|
/*/extractor-pack
|
||||||
@@ -72,10 +71,3 @@ node_modules/
|
|||||||
|
|
||||||
# cargo build directory
|
# cargo build directory
|
||||||
/target
|
/target
|
||||||
|
|
||||||
# some upgrade/downgrade checks create these files
|
|
||||||
**/upgrades/*/*.dbscheme.stats
|
|
||||||
**/downgrades/*/*.dbscheme.stats
|
|
||||||
|
|
||||||
# Mergetool files
|
|
||||||
*.orig
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
# See https://pre-commit.com for more information
|
# See https://pre-commit.com for more information
|
||||||
# See https://pre-commit.com/hooks.html for more hooks
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
default_language_version:
|
|
||||||
python: python3.12
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v3.2.0
|
rev: v3.2.0
|
||||||
@@ -9,18 +7,18 @@ repos:
|
|||||||
- 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: /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
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/pre-commit/mirrors-autopep8
|
||||||
rev: 25.1.0
|
rev: v2.0.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: autopep8
|
||||||
files: ^(misc/codegen/.*|misc/scripts/models-as-data/.*)\.py$
|
files: ^misc/codegen/.*\.py
|
||||||
|
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
@@ -74,7 +72,7 @@ repos:
|
|||||||
|
|
||||||
- id: rust-codegen
|
- id: rust-codegen
|
||||||
name: Run Rust checked in code generation
|
name: Run Rust checked in code generation
|
||||||
files: ^misc/codegen/|^rust/(prefix\.dbscheme|schema/|codegen/|.*/generated/|ql/lib/(rust\.dbscheme$|codeql/rust/elements)|\.generated.list|ast-generator/)
|
files: ^misc/codegen/|^rust/(schema.py$|codegen/|.*/generated/|ql/lib/(rust\.dbscheme$|codeql/rust/elements)|\.generated.list)
|
||||||
language: system
|
language: system
|
||||||
entry: bazel run //rust/codegen -- --quiet
|
entry: bazel run //rust/codegen -- --quiet
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"omnisharp.autoStart": false,
|
"omnisharp.autoStart": false,
|
||||||
"cmake.sourceDirectory": "${workspaceFolder}/swift",
|
"cmake.sourceDirectory": "${workspaceFolder}/swift",
|
||||||
"cmake.buildDirectory": "${workspaceFolder}/bazel-cmake-build",
|
"cmake.buildDirectory": "${workspaceFolder}/bazel-cmake-build"
|
||||||
"editor.suggest.matchOnWordStartOnly": false
|
|
||||||
}
|
}
|
||||||
|
|||||||
98
.vscode/tasks.json
vendored
98
.vscode/tasks.json
vendored
@@ -38,104 +38,6 @@
|
|||||||
"command": "${config:python.pythonPath}",
|
"command": "${config:python.pythonPath}",
|
||||||
},
|
},
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Create query change note",
|
|
||||||
"type": "process",
|
|
||||||
"command": "python3",
|
|
||||||
"args": [
|
|
||||||
"misc/scripts/create-change-note.py",
|
|
||||||
"${input:language}",
|
|
||||||
"src",
|
|
||||||
"${input:name}",
|
|
||||||
"${input:categoryQuery}"
|
|
||||||
],
|
|
||||||
"options": {
|
|
||||||
"env": {
|
|
||||||
"EDITOR": "code -r",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "never",
|
|
||||||
"close": true
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Create library change note",
|
|
||||||
"type": "process",
|
|
||||||
"command": "python3",
|
|
||||||
"args": [
|
|
||||||
"misc/scripts/create-change-note.py",
|
|
||||||
"${input:language}",
|
|
||||||
"lib",
|
|
||||||
"${input:name}",
|
|
||||||
"${input:categoryLibrary}"
|
|
||||||
],
|
|
||||||
"options": {
|
|
||||||
"env": {
|
|
||||||
"EDITOR": "code -r"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "never",
|
|
||||||
"close": true
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"type": "pickString",
|
|
||||||
"id": "language",
|
|
||||||
"description": "Language",
|
|
||||||
"options":
|
|
||||||
[
|
|
||||||
"actions",
|
|
||||||
"go",
|
|
||||||
"java",
|
|
||||||
"javascript",
|
|
||||||
"cpp",
|
|
||||||
"csharp",
|
|
||||||
"python",
|
|
||||||
"ruby",
|
|
||||||
"rust",
|
|
||||||
"swift",
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "promptString",
|
|
||||||
"id": "name",
|
|
||||||
"description": "Short name (kebab-case)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "pickString",
|
|
||||||
"id": "categoryQuery",
|
|
||||||
"description": "Category (query change)",
|
|
||||||
"options":
|
|
||||||
[
|
|
||||||
"breaking",
|
|
||||||
"deprecated",
|
|
||||||
"newQuery",
|
|
||||||
"queryMetadata",
|
|
||||||
"majorAnalysis",
|
|
||||||
"minorAnalysis",
|
|
||||||
"fix",
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "pickString",
|
|
||||||
"id": "categoryLibrary",
|
|
||||||
"description": "Category (library change)",
|
|
||||||
"options":
|
|
||||||
[
|
|
||||||
"breaking",
|
|
||||||
"deprecated",
|
|
||||||
"feature",
|
|
||||||
"majorAnalysis",
|
|
||||||
"minorAnalysis",
|
|
||||||
"fix",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1 @@
|
|||||||
exports_files([
|
exports_files(["LICENSE"])
|
||||||
"LICENSE",
|
|
||||||
"Cargo.lock",
|
|
||||||
"Cargo.toml",
|
|
||||||
])
|
|
||||||
|
|||||||
36
CODEOWNERS
36
CODEOWNERS
@@ -1,47 +1,29 @@
|
|||||||
# 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
|
|
||||||
/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/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
|
||||||
|
|
||||||
# Experimental CodeQL cryptography
|
|
||||||
**/experimental/**/quantum/ @github/ps-codeql
|
|
||||||
/shared/quantum/ @github/ps-codeql
|
|
||||||
|
|
||||||
# CodeQL tools and associated docs
|
# CodeQL tools and associated docs
|
||||||
/docs/codeql/codeql-cli/ @github/codeql-cli-reviewers
|
/docs/codeql/codeql-cli/ @github/codeql-cli-reviewers
|
||||||
/docs/codeql/codeql-for-visual-studio-code/ @github/codeql-vscode-reviewers
|
/docs/codeql/codeql-for-visual-studio-code/ @github/codeql-vscode-reviewers
|
||||||
/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)
|
||||||
|
WORKSPACE.bazel @github/codeql-ci-reviewers
|
||||||
MODULE.bazel @github/codeql-ci-reviewers
|
MODULE.bazel @github/codeql-ci-reviewers
|
||||||
.bazelversion @github/codeql-ci-reviewers
|
.bazelversion @github/codeql-ci-reviewers
|
||||||
.bazelrc @github/codeql-ci-reviewers
|
.bazelrc @github/codeql-ci-reviewers
|
||||||
@@ -56,12 +38,8 @@ MODULE.bazel @github/codeql-ci-reviewers
|
|||||||
/.github/workflows/go-* @github/codeql-go
|
/.github/workflows/go-* @github/codeql-go
|
||||||
/.github/workflows/ql-for-ql-* @github/codeql-ql-for-ql-reviewers
|
/.github/workflows/ql-for-ql-* @github/codeql-ql-for-ql-reviewers
|
||||||
/.github/workflows/ruby-* @github/codeql-ruby
|
/.github/workflows/ruby-* @github/codeql-ruby
|
||||||
/.github/workflows/rust.yml @github/codeql-rust
|
|
||||||
/.github/workflows/swift.yml @github/codeql-swift
|
/.github/workflows/swift.yml @github/codeql-swift
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
/misc/scripts/accept-expected-changes-from-ci.py @RasmusWL
|
/misc/scripts/accept-expected-changes-from-ci.py @RasmusWL
|
||||||
/misc/scripts/generate-code-scanning-query-list.py @RasmusWL
|
/misc/scripts/generate-code-scanning-query-list.py @RasmusWL
|
||||||
|
|
||||||
# .devcontainer
|
|
||||||
/.devcontainer/ @github/codeql-ci-reviewers
|
|
||||||
|
|||||||
2088
Cargo.lock
generated
2088
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -8,5 +8,9 @@ members = [
|
|||||||
"rust/extractor",
|
"rust/extractor",
|
||||||
"rust/extractor/macros",
|
"rust/extractor/macros",
|
||||||
"rust/ast-generator",
|
"rust/ast-generator",
|
||||||
"rust/autobuild",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[patch.crates-io]
|
||||||
|
# patch for build script bug preventing bazel build
|
||||||
|
# see https://github.com/rust-lang/rustc_apfloat/pull/17
|
||||||
|
rustc_apfloat = { git = "https://github.com/redsun82/rustc_apfloat.git", rev = "096d585100636bc2e9f09d7eefec38c5b334d47b" }
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2006-2025 GitHub, Inc.
|
Copyright (c) 2006-2020 GitHub, Inc.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
255
MODULE.bazel
255
MODULE.bazel
@@ -14,165 +14,61 @@ 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.10")
|
||||||
bazel_dep(name = "rules_go", version = "0.56.1")
|
bazel_dep(name = "rules_go", version = "0.50.0")
|
||||||
bazel_dep(name = "rules_pkg", version = "1.0.1")
|
bazel_dep(name = "rules_pkg", version = "1.0.1")
|
||||||
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
|
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
|
||||||
bazel_dep(name = "rules_python", version = "0.40.0")
|
bazel_dep(name = "rules_python", version = "0.35.0")
|
||||||
bazel_dep(name = "rules_shell", version = "0.5.0")
|
bazel_dep(name = "bazel_skylib", version = "1.6.1")
|
||||||
bazel_dep(name = "bazel_skylib", version = "1.8.1")
|
bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "absl")
|
||||||
bazel_dep(name = "abseil-cpp", version = "20240116.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.1.3-codeql.1")
|
bazel_dep(name = "rules_kotlin", version = "2.0.0-codeql.1")
|
||||||
bazel_dep(name = "gazelle", version = "0.40.0")
|
bazel_dep(name = "gazelle", version = "0.38.0")
|
||||||
bazel_dep(name = "rules_dotnet", version = "0.21.5-codeql.1")
|
bazel_dep(name = "rules_dotnet", version = "0.15.1")
|
||||||
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
|
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
|
||||||
bazel_dep(name = "rules_rust", version = "0.66.0")
|
bazel_dep(name = "rules_rust", version = "0.52.2")
|
||||||
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)
|
||||||
|
|
||||||
# Keep edition and version approximately in sync with internal repo.
|
# crate_py but shortened due to Windows file path considerations
|
||||||
# the versions there are canonical, the versions here are used for CI in github/codeql, as well as for the vendoring of dependencies.
|
cp = use_extension(
|
||||||
RUST_EDITION = "2024"
|
"@rules_rust//crate_universe:extension.bzl",
|
||||||
|
"crate",
|
||||||
# run buildutils-internal/scripts/fill-rust-sha256s.py when updating (internal repo)
|
isolate = True,
|
||||||
# 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
|
cp.from_cargo(
|
||||||
# required in this repo
|
name = "py_deps",
|
||||||
RUST_VERSION = "nightly/2025-08-01"
|
cargo_lockfile = "//python/extractor/tsg-python:Cargo.lock",
|
||||||
|
manifests = [
|
||||||
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
|
"//python/extractor/tsg-python:Cargo.toml",
|
||||||
rust.toolchain(
|
"//python/extractor/tsg-python/tsp:Cargo.toml",
|
||||||
edition = RUST_EDITION,
|
|
||||||
# We need those extra target triples so that we can build universal binaries on macos
|
|
||||||
extra_target_triples = [
|
|
||||||
"x86_64-apple-darwin",
|
|
||||||
"aarch64-apple-darwin",
|
|
||||||
],
|
],
|
||||||
# generated by buildutils-internal/scripts/fill-rust-sha256s.py (internal repo)
|
|
||||||
sha256s = {
|
|
||||||
"2025-08-01/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz": "9bbeaf5d3fc7247d31463a9083aa251c995cc50662c8219e7a2254d76a72a9a4",
|
|
||||||
"2025-08-01/rustc-nightly-x86_64-apple-darwin.tar.xz": "c9ea539a8eff0d5d162701f99f9e1aabe14dd0dfb420d62362817a5d09219de7",
|
|
||||||
"2025-08-01/rustc-nightly-aarch64-apple-darwin.tar.xz": "ae83feebbc39cfd982e4ecc8297731fe79c185173aee138467b334c5404b3773",
|
|
||||||
"2025-08-01/rustc-nightly-x86_64-pc-windows-msvc.tar.xz": "9f170c30d802a349be60cf52ec46260802093cb1013ad667fc0d528b7b10152f",
|
|
||||||
"2025-08-01/clippy-nightly-x86_64-unknown-linux-gnu.tar.xz": "9ae5f3cd8f557c4f6df522597c69d14398cf604cfaed2b83e767c4b77a7eaaf6",
|
|
||||||
"2025-08-01/clippy-nightly-x86_64-apple-darwin.tar.xz": "983cb9ee0b6b968188e04ab2d33743d54764b2681ce565e1b3f2b9135c696a3e",
|
|
||||||
"2025-08-01/clippy-nightly-aarch64-apple-darwin.tar.xz": "ed2219dbc49d088225e1b7c5c4390fa295066e071fddaa2714018f6bb39ddbf0",
|
|
||||||
"2025-08-01/clippy-nightly-x86_64-pc-windows-msvc.tar.xz": "911f40ab5cbdd686f40e00965271fe47c4805513a308ed01f30eafb25b448a50",
|
|
||||||
"2025-08-01/cargo-nightly-x86_64-unknown-linux-gnu.tar.xz": "106463c284e48e4904c717471eeec2be5cc83a9d2cae8d6e948b52438cad2e69",
|
|
||||||
"2025-08-01/cargo-nightly-x86_64-apple-darwin.tar.xz": "6ad35c40efc41a8c531ea43235058347b6902d98a9693bf0aed7fc16d5590cef",
|
|
||||||
"2025-08-01/cargo-nightly-aarch64-apple-darwin.tar.xz": "dd28c365e9d298abc3154c797720ad36a0058f131265c9978b4c8e4e37012c8a",
|
|
||||||
"2025-08-01/cargo-nightly-x86_64-pc-windows-msvc.tar.xz": "7b431286e12d6b3834b038f078389a00cac73f351e8c3152b2504a3c06420b3b",
|
|
||||||
"2025-08-01/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz": "e342e305d7927cc288d386983b2bc253cfad3776b113386e903d0b302648ef47",
|
|
||||||
"2025-08-01/llvm-tools-nightly-x86_64-apple-darwin.tar.xz": "e44dd3506524d85c37b3a54bcc91d01378fd2c590b2db5c5974d12f05c1b84d1",
|
|
||||||
"2025-08-01/llvm-tools-nightly-aarch64-apple-darwin.tar.xz": "0c1b5f46dd81be4a9227b10283a0fcaa39c14fea7e81aea6fd6d9887ff6cdc41",
|
|
||||||
"2025-08-01/llvm-tools-nightly-x86_64-pc-windows-msvc.tar.xz": "423e5fd11406adccbc31b8456ceb7375ce055cdf45e90d2c3babeb2d7f58383f",
|
|
||||||
"2025-08-01/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz": "3c0ceb46a252647a1d4c7116d9ccae684fa5e42aaf3296419febd2c962c3b41d",
|
|
||||||
"2025-08-01/rust-std-nightly-x86_64-apple-darwin.tar.xz": "3be416003cab10f767390a753d1d16ae4d26c7421c03c98992cf1943e5b0efe8",
|
|
||||||
"2025-08-01/rust-std-nightly-aarch64-apple-darwin.tar.xz": "4046ac0ef951cb056b5028a399124f60999fa37792eab69d008d8d7965f389b4",
|
|
||||||
"2025-08-01/rust-std-nightly-x86_64-pc-windows-msvc.tar.xz": "191ed9d8603c3a4fe5a7bbbc2feb72049078dae2df3d3b7d5dedf3abbf823e6e",
|
|
||||||
},
|
|
||||||
versions = [RUST_VERSION],
|
|
||||||
)
|
)
|
||||||
use_repo(rust, "rust_toolchains")
|
use_repo(cp, "py_deps")
|
||||||
|
|
||||||
register_toolchains("@rust_toolchains//:all")
|
# deps for ruby+rust, but shortened due to windows file paths
|
||||||
|
r = use_extension(
|
||||||
# deps for python extractor
|
"@rules_rust//crate_universe:extension.bzl",
|
||||||
# keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh`
|
"crate",
|
||||||
py_deps = use_extension("//misc/bazel/3rdparty:py_deps_extension.bzl", "p")
|
isolate = True,
|
||||||
use_repo(
|
|
||||||
py_deps,
|
|
||||||
"vendor_py__anyhow-1.0.95",
|
|
||||||
"vendor_py__cc-1.2.14",
|
|
||||||
"vendor_py__clap-4.5.30",
|
|
||||||
"vendor_py__regex-1.11.1",
|
|
||||||
"vendor_py__tree-sitter-0.24.7",
|
|
||||||
"vendor_py__tree-sitter-graph-0.12.0",
|
|
||||||
)
|
)
|
||||||
|
r.from_cargo(
|
||||||
# deps for ruby+rust
|
name = "r",
|
||||||
# keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh`
|
cargo_lockfile = "//:Cargo.lock",
|
||||||
tree_sitter_extractors_deps = use_extension("//misc/bazel/3rdparty:tree_sitter_extractors_extension.bzl", "r")
|
manifests = [
|
||||||
use_repo(
|
"//:Cargo.toml",
|
||||||
tree_sitter_extractors_deps,
|
"//ruby/extractor:Cargo.toml",
|
||||||
"vendor_ts__anyhow-1.0.100",
|
"//rust/extractor:Cargo.toml",
|
||||||
"vendor_ts__argfile-0.2.1",
|
"//rust/extractor/macros:Cargo.toml",
|
||||||
"vendor_ts__chalk-ir-0.104.0",
|
"//rust/ast-generator:Cargo.toml",
|
||||||
"vendor_ts__chrono-0.4.42",
|
"//shared/tree-sitter-extractor:Cargo.toml",
|
||||||
"vendor_ts__clap-4.5.48",
|
|
||||||
"vendor_ts__dunce-1.0.5",
|
|
||||||
"vendor_ts__either-1.15.0",
|
|
||||||
"vendor_ts__encoding-0.2.33",
|
|
||||||
"vendor_ts__figment-0.10.19",
|
|
||||||
"vendor_ts__flate2-1.1.2",
|
|
||||||
"vendor_ts__glob-0.3.3",
|
|
||||||
"vendor_ts__globset-0.4.16",
|
|
||||||
"vendor_ts__itertools-0.14.0",
|
|
||||||
"vendor_ts__lazy_static-1.5.0",
|
|
||||||
"vendor_ts__mustache-0.9.0",
|
|
||||||
"vendor_ts__num-traits-0.2.19",
|
|
||||||
"vendor_ts__num_cpus-1.17.0",
|
|
||||||
"vendor_ts__proc-macro2-1.0.101",
|
|
||||||
"vendor_ts__quote-1.0.41",
|
|
||||||
"vendor_ts__ra_ap_base_db-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_cfg-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_hir-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_hir_def-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_hir_expand-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_hir_ty-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_ide_db-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_intern-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_load-cargo-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_parser-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_paths-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_project_model-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_span-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_stdx-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_syntax-0.0.301",
|
|
||||||
"vendor_ts__ra_ap_vfs-0.0.301",
|
|
||||||
"vendor_ts__rand-0.9.2",
|
|
||||||
"vendor_ts__rayon-1.11.0",
|
|
||||||
"vendor_ts__regex-1.11.3",
|
|
||||||
"vendor_ts__serde-1.0.228",
|
|
||||||
"vendor_ts__serde_json-1.0.145",
|
|
||||||
"vendor_ts__serde_with-3.14.1",
|
|
||||||
"vendor_ts__syn-2.0.106",
|
|
||||||
"vendor_ts__toml-0.9.7",
|
|
||||||
"vendor_ts__tracing-0.1.41",
|
|
||||||
"vendor_ts__tracing-flame-0.2.0",
|
|
||||||
"vendor_ts__tracing-subscriber-0.3.20",
|
|
||||||
"vendor_ts__tree-sitter-0.25.9",
|
|
||||||
"vendor_ts__tree-sitter-embedded-template-0.25.0",
|
|
||||||
"vendor_ts__tree-sitter-json-0.24.8",
|
|
||||||
"vendor_ts__tree-sitter-ql-0.23.1",
|
|
||||||
"vendor_ts__tree-sitter-ruby-0.23.1",
|
|
||||||
"vendor_ts__triomphe-0.1.14",
|
|
||||||
"vendor_ts__ungrammar-1.16.1",
|
|
||||||
"vendor_ts__zstd-0.13.3",
|
|
||||||
)
|
|
||||||
|
|
||||||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
||||||
|
|
||||||
# rust-analyzer sources needed by the rust ast-generator (see `rust/ast-generator/README.md`)
|
|
||||||
RUST_ANALYZER_SRC_TAG = "2025-01-07"
|
|
||||||
|
|
||||||
http_archive(
|
|
||||||
name = "rust-analyzer-src",
|
|
||||||
build_file = "//rust/ast-generator:BUILD.rust-analyzer-src.bazel",
|
|
||||||
integrity = "sha256-eo8mIaUafZL8LOM65bDIIIXw1rNQ/P/x5RK/XUtgo5g=",
|
|
||||||
patch_args = ["-p1"],
|
|
||||||
patches = [
|
|
||||||
"//rust/ast-generator:patches/rust-analyzer.patch",
|
|
||||||
],
|
],
|
||||||
strip_prefix = "rust-analyzer-%s" % RUST_ANALYZER_SRC_TAG,
|
|
||||||
url = "https://github.com/rust-lang/rust-analyzer/archive/refs/tags/%s.tar.gz" % RUST_ANALYZER_SRC_TAG,
|
|
||||||
)
|
)
|
||||||
|
use_repo(r, tree_sitter_extractors_deps = "r")
|
||||||
|
|
||||||
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 = "8.0.101")
|
||||||
use_repo(dotnet, "dotnet_toolchains")
|
use_repo(dotnet, "dotnet_toolchains")
|
||||||
|
|
||||||
register_toolchains("@dotnet_toolchains//:all")
|
register_toolchains("@dotnet_toolchains//:all")
|
||||||
@@ -183,7 +79,7 @@ use_repo(csharp_main_extension, "paket.main")
|
|||||||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
||||||
pip.parse(
|
pip.parse(
|
||||||
hub_name = "codegen_deps",
|
hub_name = "codegen_deps",
|
||||||
python_version = "3.12",
|
python_version = "3.11",
|
||||||
requirements_lock = "//misc/codegen:requirements_lock.txt",
|
requirements_lock = "//misc/codegen:requirements_lock.txt",
|
||||||
)
|
)
|
||||||
use_repo(pip, "codegen_deps")
|
use_repo(pip, "codegen_deps")
|
||||||
@@ -195,12 +91,10 @@ use_repo(
|
|||||||
swift_deps,
|
swift_deps,
|
||||||
"binlog",
|
"binlog",
|
||||||
"picosha2",
|
"picosha2",
|
||||||
"swift-prebuilt-linux",
|
"swift_prebuilt_darwin_x86_64",
|
||||||
"swift-prebuilt-linux-download-only",
|
"swift_prebuilt_linux",
|
||||||
"swift-prebuilt-macos",
|
"swift_toolchain_linux",
|
||||||
"swift-prebuilt-macos-download-only",
|
"swift_toolchain_macos",
|
||||||
"swift-resource-dir-linux",
|
|
||||||
"swift-resource-dir-macos",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
|
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
|
||||||
@@ -221,6 +115,10 @@ use_repo(
|
|||||||
kotlin_extractor_deps,
|
kotlin_extractor_deps,
|
||||||
"codeql_kotlin_defaults",
|
"codeql_kotlin_defaults",
|
||||||
"codeql_kotlin_embeddable",
|
"codeql_kotlin_embeddable",
|
||||||
|
"kotlin-compiler-1.5.0",
|
||||||
|
"kotlin-compiler-1.5.10",
|
||||||
|
"kotlin-compiler-1.5.20",
|
||||||
|
"kotlin-compiler-1.5.30",
|
||||||
"kotlin-compiler-1.6.0",
|
"kotlin-compiler-1.6.0",
|
||||||
"kotlin-compiler-1.6.20",
|
"kotlin-compiler-1.6.20",
|
||||||
"kotlin-compiler-1.7.0",
|
"kotlin-compiler-1.7.0",
|
||||||
@@ -231,9 +129,10 @@ use_repo(
|
|||||||
"kotlin-compiler-2.0.0-RC1",
|
"kotlin-compiler-2.0.0-RC1",
|
||||||
"kotlin-compiler-2.0.20-Beta2",
|
"kotlin-compiler-2.0.20-Beta2",
|
||||||
"kotlin-compiler-2.1.0-Beta1",
|
"kotlin-compiler-2.1.0-Beta1",
|
||||||
"kotlin-compiler-2.1.20-Beta1",
|
"kotlin-compiler-embeddable-1.5.0",
|
||||||
"kotlin-compiler-2.2.0-Beta1",
|
"kotlin-compiler-embeddable-1.5.10",
|
||||||
"kotlin-compiler-2.2.20-Beta2",
|
"kotlin-compiler-embeddable-1.5.20",
|
||||||
|
"kotlin-compiler-embeddable-1.5.30",
|
||||||
"kotlin-compiler-embeddable-1.6.0",
|
"kotlin-compiler-embeddable-1.6.0",
|
||||||
"kotlin-compiler-embeddable-1.6.20",
|
"kotlin-compiler-embeddable-1.6.20",
|
||||||
"kotlin-compiler-embeddable-1.7.0",
|
"kotlin-compiler-embeddable-1.7.0",
|
||||||
@@ -244,9 +143,10 @@ use_repo(
|
|||||||
"kotlin-compiler-embeddable-2.0.0-RC1",
|
"kotlin-compiler-embeddable-2.0.0-RC1",
|
||||||
"kotlin-compiler-embeddable-2.0.20-Beta2",
|
"kotlin-compiler-embeddable-2.0.20-Beta2",
|
||||||
"kotlin-compiler-embeddable-2.1.0-Beta1",
|
"kotlin-compiler-embeddable-2.1.0-Beta1",
|
||||||
"kotlin-compiler-embeddable-2.1.20-Beta1",
|
"kotlin-stdlib-1.5.0",
|
||||||
"kotlin-compiler-embeddable-2.2.0-Beta1",
|
"kotlin-stdlib-1.5.10",
|
||||||
"kotlin-compiler-embeddable-2.2.20-Beta2",
|
"kotlin-stdlib-1.5.20",
|
||||||
|
"kotlin-stdlib-1.5.30",
|
||||||
"kotlin-stdlib-1.6.0",
|
"kotlin-stdlib-1.6.0",
|
||||||
"kotlin-stdlib-1.6.20",
|
"kotlin-stdlib-1.6.20",
|
||||||
"kotlin-stdlib-1.7.0",
|
"kotlin-stdlib-1.7.0",
|
||||||
@@ -257,28 +157,43 @@ use_repo(
|
|||||||
"kotlin-stdlib-2.0.0-RC1",
|
"kotlin-stdlib-2.0.0-RC1",
|
||||||
"kotlin-stdlib-2.0.20-Beta2",
|
"kotlin-stdlib-2.0.20-Beta2",
|
||||||
"kotlin-stdlib-2.1.0-Beta1",
|
"kotlin-stdlib-2.1.0-Beta1",
|
||||||
"kotlin-stdlib-2.1.20-Beta1",
|
|
||||||
"kotlin-stdlib-2.2.0-Beta1",
|
|
||||||
"kotlin-stdlib-2.2.20-Beta2",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
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.25.0")
|
go_sdk.download(version = "1.23.1")
|
||||||
|
|
||||||
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, "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_files = use_repo_rule("//misc/bazel:lfs.bzl", "lfs_files")
|
||||||
|
|
||||||
# go to https://github.com/GoogleChrome/ripunzip/releases to find latest version and corresponding sha256s
|
lfs_files(
|
||||||
ripunzip_archive(
|
name = "ripunzip-linux",
|
||||||
name = "ripunzip",
|
srcs = ["//misc/ripunzip:ripunzip-linux"],
|
||||||
sha256_linux = "71482d7a7e4ea9176d5596161c49250c34b136b157c45f632b1111323fbfc0de",
|
executable = True,
|
||||||
sha256_macos_arm = "604194ab13f0aba3972995d995f11002b8fc285c8170401fcd46655065df20c9",
|
)
|
||||||
sha256_macos_intel = "65367b94fd579d93d46f2d2595cc4c9a60cfcf497e3c824f9d1a7b80fa8bd38a",
|
|
||||||
sha256_windows = "ac3874075def2b9e5074a3b5945005ab082cc6e689e1de658da8965bc23e643e",
|
lfs_files(
|
||||||
version = "2.0.4",
|
name = "ripunzip-windows",
|
||||||
|
srcs = ["//misc/ripunzip:ripunzip-windows.exe"],
|
||||||
|
executable = True,
|
||||||
|
)
|
||||||
|
|
||||||
|
lfs_files(
|
||||||
|
name = "ripunzip-macos",
|
||||||
|
srcs = ["//misc/ripunzip:ripunzip-macos"],
|
||||||
|
executable = True,
|
||||||
|
)
|
||||||
|
|
||||||
|
lfs_files(
|
||||||
|
name = "swift-resource-dir-linux",
|
||||||
|
srcs = ["//swift/third_party/resource-dir:resource-dir-linux.zip"],
|
||||||
|
)
|
||||||
|
|
||||||
|
lfs_files(
|
||||||
|
name = "swift-resource-dir-macos",
|
||||||
|
srcs = ["//swift/third_party/resource-dir:resource-dir-macos.zip"],
|
||||||
)
|
)
|
||||||
|
|
||||||
register_toolchains(
|
register_toolchains(
|
||||||
|
|||||||
2
WORKSPACE.bazel
Normal file
2
WORKSPACE.bazel
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# please use MODULE.bazel to add dependencies
|
||||||
|
# this empty file is required by internal repositories, don't remove it
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
load("//misc/bazel:pkg.bzl", "codeql_pack")
|
|
||||||
|
|
||||||
package(default_visibility = ["//visibility:public"])
|
|
||||||
|
|
||||||
codeql_pack(
|
|
||||||
name = "actions",
|
|
||||||
srcs = ["//actions/extractor"],
|
|
||||||
experimental = True,
|
|
||||||
)
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
load("//misc/bazel:pkg.bzl", "codeql_pkg_files", "strip_prefix")
|
|
||||||
|
|
||||||
codeql_pkg_files(
|
|
||||||
name = "extractor",
|
|
||||||
srcs = [
|
|
||||||
"codeql-extractor.yml",
|
|
||||||
"//:LICENSE",
|
|
||||||
],
|
|
||||||
exes = glob(["tools/**"]),
|
|
||||||
strip_prefix = strip_prefix.from_pkg(),
|
|
||||||
visibility = ["//actions:__pkg__"],
|
|
||||||
)
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
name: "actions"
|
|
||||||
display_name: "GitHub Actions"
|
|
||||||
version: 0.0.1
|
|
||||||
column_kind: "utf16"
|
|
||||||
unicode_newlines: true
|
|
||||||
build_modes:
|
|
||||||
- none
|
|
||||||
default_queries:
|
|
||||||
- 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: []
|
|
||||||
scc_languages:
|
|
||||||
- YAML
|
|
||||||
file_types:
|
|
||||||
- name: workflow
|
|
||||||
display_name: GitHub Actions workflow files
|
|
||||||
extensions:
|
|
||||||
- .yml
|
|
||||||
- .yaml
|
|
||||||
forwarded_extractor_name: javascript
|
|
||||||
options:
|
|
||||||
trap:
|
|
||||||
title: TRAP options
|
|
||||||
description: Options about how the extractor handles TRAP files
|
|
||||||
type: object
|
|
||||||
visibility: 3
|
|
||||||
properties:
|
|
||||||
cache:
|
|
||||||
title: TRAP cache options
|
|
||||||
description: Options about how the extractor handles its TRAP cache
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
dir:
|
|
||||||
title: TRAP cache directory
|
|
||||||
description: The directory of the TRAP cache to use
|
|
||||||
type: string
|
|
||||||
bound:
|
|
||||||
title: TRAP cache bound
|
|
||||||
description: A soft limit (in MB) on the size of the TRAP cache
|
|
||||||
type: string
|
|
||||||
pattern: "[0-9]+"
|
|
||||||
write:
|
|
||||||
title: TRAP cache writeable
|
|
||||||
description: Whether to write to the TRAP cache as well as reading it
|
|
||||||
type: string
|
|
||||||
pattern: "(true|TRUE|false|FALSE)"
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
# Note: We're adding the `reusable_workflows` subdirectories to proactively
|
|
||||||
# record workflows that were called cross-repo, check them out locally,
|
|
||||||
# and enable an interprocedural analysis across the workflow files.
|
|
||||||
# These workflows follow the convention `.github/reusable_workflows/<nwo>/*.ya?ml`
|
|
||||||
$DefaultPathFilters = @(
|
|
||||||
'exclude:**/*',
|
|
||||||
'include:.github/workflows/*.yml',
|
|
||||||
'include:.github/workflows/*.yaml',
|
|
||||||
'include:.github/reusable_workflows/**/*.yml',
|
|
||||||
'include:.github/reusable_workflows/**/*.yaml',
|
|
||||||
'include:**/action.yml',
|
|
||||||
'include:**/action.yaml'
|
|
||||||
)
|
|
||||||
|
|
||||||
if ($null -ne $env:LGTM_INDEX_FILTERS) {
|
|
||||||
Write-Output 'LGTM_INDEX_FILTERS set. Using the default filters together with the user-provided filters, and passing through to the JavaScript extractor.'
|
|
||||||
# Begin with the default path inclusions only,
|
|
||||||
# followed by the user-provided filters.
|
|
||||||
# If the user provided `paths`, those patterns override the default inclusions
|
|
||||||
# (because `LGTM_INDEX_FILTERS` will begin with `exclude:**/*`).
|
|
||||||
# If the user provided `paths-ignore`, those patterns are excluded.
|
|
||||||
$PathFilters = ($DefaultPathFilters -join "`n") + "`n" + $env:LGTM_INDEX_FILTERS
|
|
||||||
$env:LGTM_INDEX_FILTERS = $PathFilters
|
|
||||||
} else {
|
|
||||||
Write-Output 'LGTM_INDEX_FILTERS not set. Using the default filters, and passing through to the JavaScript extractor.'
|
|
||||||
$env:LGTM_INDEX_FILTERS = $DefaultPathFilters -join "`n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Find the JavaScript extractor directory via `codeql resolve extractor`.
|
|
||||||
$CodeQL = Join-Path $env:CODEQL_DIST 'codeql.exe'
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT = &"$CodeQL" resolve extractor --language javascript
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
throw 'Failed to resolve JavaScript extractor.'
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Output "Found JavaScript extractor at '${env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}'."
|
|
||||||
|
|
||||||
# Run the JavaScript autobuilder.
|
|
||||||
$JavaScriptAutoBuild = Join-Path $env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT 'tools\autobuild.cmd'
|
|
||||||
Write-Output "Running JavaScript autobuilder at '${JavaScriptAutoBuild}'."
|
|
||||||
|
|
||||||
# Copy the values of the Actions extractor environment variables to the JavaScript extractor environment variables.
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_DIAGNOSTIC_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_LOG_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_LOG_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_SCRATCH_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_SCRATCH_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_SOURCE_ARCHIVE_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE = $env:CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE
|
|
||||||
|
|
||||||
&"$JavaScriptAutoBuild"
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
throw "JavaScript autobuilder failed."
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
@echo off
|
|
||||||
rem All of the work is done in the PowerShell script
|
|
||||||
echo "Running PowerShell script at '%~dp0autobuild-impl.ps1'"
|
|
||||||
powershell.exe -File "%~dp0autobuild-impl.ps1"
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
# Note: We're adding the `reusable_workflows` subdirectories to proactively
|
|
||||||
# record workflows that were called cross-repo, check them out locally,
|
|
||||||
# and enable an interprocedural analysis across the workflow files.
|
|
||||||
# These workflows follow the convention `.github/reusable_workflows/<nwo>/*.ya?ml`
|
|
||||||
DEFAULT_PATH_FILTERS=$(cat << END
|
|
||||||
exclude:**/*
|
|
||||||
include:.github/workflows/*.yml
|
|
||||||
include:.github/workflows/*.yaml
|
|
||||||
include:.github/reusable_workflows/**/*.yml
|
|
||||||
include:.github/reusable_workflows/**/*.yaml
|
|
||||||
include:**/action.yml
|
|
||||||
include:**/action.yaml
|
|
||||||
END
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ -n "${LGTM_INDEX_FILTERS:-}" ]; then
|
|
||||||
echo "LGTM_INDEX_FILTERS set. Using the default filters together with the user-provided filters, and passing through to the JavaScript extractor."
|
|
||||||
# Begin with the default path inclusions only,
|
|
||||||
# followed by the user-provided filters.
|
|
||||||
# If the user provided `paths`, those patterns override the default inclusions
|
|
||||||
# (because `LGTM_INDEX_FILTERS` will begin with `exclude:**/*`).
|
|
||||||
# If the user provided `paths-ignore`, those patterns are excluded.
|
|
||||||
PATH_FILTERS="$(cat << END
|
|
||||||
${DEFAULT_PATH_FILTERS}
|
|
||||||
${LGTM_INDEX_FILTERS}
|
|
||||||
END
|
|
||||||
)"
|
|
||||||
LGTM_INDEX_FILTERS="${PATH_FILTERS}"
|
|
||||||
export LGTM_INDEX_FILTERS
|
|
||||||
else
|
|
||||||
echo "LGTM_INDEX_FILTERS not set. Using the default filters, and passing through to the JavaScript extractor."
|
|
||||||
LGTM_INDEX_FILTERS="${DEFAULT_PATH_FILTERS}"
|
|
||||||
export LGTM_INDEX_FILTERS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Find the JavaScript extractor directory via `codeql resolve extractor`.
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_ROOT="$("${CODEQL_DIST}/codeql" resolve extractor --language javascript)"
|
|
||||||
export CODEQL_EXTRACTOR_JAVASCRIPT_ROOT
|
|
||||||
|
|
||||||
echo "Found JavaScript extractor at '${CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}'."
|
|
||||||
|
|
||||||
# Run the JavaScript autobuilder
|
|
||||||
JAVASCRIPT_AUTO_BUILD="${CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}/tools/autobuild.sh"
|
|
||||||
echo "Running JavaScript autobuilder at '${JAVASCRIPT_AUTO_BUILD}'."
|
|
||||||
|
|
||||||
# Copy the values of the Actions extractor environment variables to the JavaScript extractor environment variables.
|
|
||||||
env CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR="${CODEQL_EXTRACTOR_ACTIONS_DIAGNOSTIC_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_LOG_DIR="${CODEQL_EXTRACTOR_ACTIONS_LOG_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_SCRATCH_DIR="${CODEQL_EXTRACTOR_ACTIONS_SCRATCH_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR="${CODEQL_EXTRACTOR_ACTIONS_SOURCE_ARCHIVE_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR="${CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE="${CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE}" \
|
|
||||||
"${JAVASCRIPT_AUTO_BUILD}"
|
|
||||||
@@ -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}$")
|
|
||||||
select uses, "This 'uses' step has a pinned SHA version."
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
extensions:
|
|
||||||
- addsTo:
|
|
||||||
pack: codeql/actions-all
|
|
||||||
extensible: immutableActionsDataModel
|
|
||||||
data:
|
|
||||||
- ["actions/checkout"]
|
|
||||||
- ["actions/cache"]
|
|
||||||
- ["actions/setup-node"]
|
|
||||||
- ["actions/upload-artifact"]
|
|
||||||
- ["actions/setup-python"]
|
|
||||||
- ["actions/download-artifact"]
|
|
||||||
- ["actions/github-script"]
|
|
||||||
- ["actions/setup-java"]
|
|
||||||
- ["actions/setup-go"]
|
|
||||||
- ["actions/upload-pages-artifact"]
|
|
||||||
- ["actions/deploy-pages"]
|
|
||||||
- ["actions/setup-dotnet"]
|
|
||||||
- ["actions/stale"]
|
|
||||||
- ["actions/labeler"]
|
|
||||||
- ["actions/create-github-app-token"]
|
|
||||||
- ["actions/configure-pages"]
|
|
||||||
- ["github/codeql-action/analyze"]
|
|
||||||
- ["github/codeql-action/autobuild"]
|
|
||||||
- ["github/codeql-action/init"]
|
|
||||||
- ["github/codeql-action/resolve-environment"]
|
|
||||||
- ["github/codeql-action/start-proxy"]
|
|
||||||
- ["github/codeql-action/upload-sarif"]
|
|
||||||
- ["octokit/request-action"]
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Model pack containing the list of known immutable actions. The Immutable Actions feature is not
|
|
||||||
# yet released, so this pack will only be used within GitHub. Once the feature is available to
|
|
||||||
# customers, we will move the contents of this pack back into the standard library pack.
|
|
||||||
name: codeql/immutable-actions-list
|
|
||||||
version: 0.0.1-dev
|
|
||||||
library: true
|
|
||||||
warnOnImplicitThis: true
|
|
||||||
extensionTargets:
|
|
||||||
# We expect to need this model pack even after GA of Actions analysis, so make it compatible with
|
|
||||||
# all future prereleases plus 1.x.x. We should be able to remove this back before we need to
|
|
||||||
# bump the major version to 2.
|
|
||||||
codeql/actions-all: ">=0.4.3 <2.0.0"
|
|
||||||
dataExtensions:
|
|
||||||
- ext/**/*.yml
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import actions
|
|
||||||
|
|
||||||
from AstNode n
|
|
||||||
where n instanceof Workflow or n instanceof CompositeAction
|
|
||||||
select n
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
| src/.github/action.yaml:1:1:11:32 | name: ' ... action' |
|
|
||||||
| src/.github/actions/action-name/action.yml:1:1:11:32 | name: ' ... action' |
|
|
||||||
| src/.github/workflows/workflow.yml:1:1:12:33 | name: A workflow |
|
|
||||||
| src/action.yml:1:1:11:32 | name: ' ... action' |
|
|
||||||
| src/excluded/action.yml:1:1:11:32 | name: ' ... action' |
|
|
||||||
| src/included/action.yml:1:1:11:32 | name: ' ... action' |
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
| src/included/action.yml:1:1:11:32 | name: ' ... action' |
|
|
||||||
| src/included/unreachable-workflow.yml:1:1:12:33 | name: A ... orkflow |
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
| src/.github/action.yaml:1:1:11:32 | name: ' ... action' |
|
|
||||||
| src/.github/actions/action-name/action.yml:1:1:11:32 | name: ' ... action' |
|
|
||||||
| src/.github/workflows/workflow.yml:1:1:12:33 | name: A workflow |
|
|
||||||
| src/action.yml:1:1:11:32 | name: ' ... action' |
|
|
||||||
| src/included/action.yml:1:1:11:32 | name: ' ... action' |
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
| src/included/action.yml:1:1:11:32 | name: ' ... action' |
|
|
||||||
| src/included/unreachable-workflow.yml:1:1:12:33 | name: A ... orkflow |
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import actions
|
|
||||||
|
|
||||||
from AstNode n
|
|
||||||
where n instanceof Workflow or n instanceof CompositeAction
|
|
||||||
select n
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
paths:
|
|
||||||
- 'included'
|
|
||||||
paths-ignore:
|
|
||||||
- 'excluded'
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
paths-ignore:
|
|
||||||
- 'excluded'
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
paths:
|
|
||||||
- 'included'
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
src/.github/action.yaml
|
|
||||||
src/.github/actions/action-name/action.yml
|
|
||||||
src/.github/workflows/workflow.yml
|
|
||||||
src/action.yml
|
|
||||||
src/excluded/action.yml
|
|
||||||
src/included/action.yml
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
src/included/action.yml
|
|
||||||
src/included/not-an-action.yml
|
|
||||||
src/included/unreachable-workflow.yml
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
src/.github/action.yaml
|
|
||||||
src/.github/actions/action-name/action.yml
|
|
||||||
src/.github/workflows/workflow.yml
|
|
||||||
src/action.yml
|
|
||||||
src/included/action.yml
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
src/included/action.yml
|
|
||||||
src/included/not-an-action.yml
|
|
||||||
src/included/unreachable-workflow.yml
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
name: 'A composite action'
|
|
||||||
description: 'Do something'
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Print
|
|
||||||
run: echo "Hello world"
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
name: 'A composite action'
|
|
||||||
description: 'Do something'
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Print
|
|
||||||
run: echo "Hello world"
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
name: An unreachable workflow
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
job:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
name: A workflow
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
job:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user