Skip to content

Commit bb6969a

Browse files
committed
Merge branch 'main' into promote-xxe
2 parents 517444b + 3d109a4 commit bb6969a

File tree

307 files changed

+6388
-16068
lines changed

Some content is hidden

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

307 files changed

+6388
-16068
lines changed

.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build --copt="-std=c++17"
2+
3+
try-import %workspace%/local.bazelrc

.bazelversion

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

.github/actions/fetch-codeql/action.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@ description: Fetches the latest version of CodeQL
33
runs:
44
using: composite
55
steps:
6+
- name: Select platform - Linux
7+
if: runner.os == 'Linux'
8+
shell: bash
9+
run: echo "GA_CODEQL_CLI_PLATFORM=linux64" >> $GITHUB_ENV
10+
11+
- name: Select platform - MacOS
12+
if: runner.os == 'MacOS'
13+
shell: bash
14+
run: echo "GA_CODEQL_CLI_PLATFORM=osx64" >> $GITHUB_ENV
15+
616
- name: Fetch CodeQL
717
shell: bash
818
run: |
919
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | grep -v beta | sort --version-sort | tail -1)
10-
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
11-
unzip -q -d "${RUNNER_TEMP}" codeql-linux64.zip
20+
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-$GA_CODEQL_CLI_PLATFORM.zip "$LATEST"
21+
unzip -q -d "${RUNNER_TEMP}" codeql-$GA_CODEQL_CLI_PLATFORM.zip
1222
echo "${RUNNER_TEMP}/codeql" >> "${GITHUB_PATH}"
1323
env:
1424
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/swift-qltest.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "Swift: Run QL Tests"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "swift/**"
7+
- .github/workflows/swift-qltest.yml
8+
branches:
9+
- main
10+
defaults:
11+
run:
12+
working-directory: swift
13+
14+
jobs:
15+
qlformat:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: ./.github/actions/fetch-codeql
20+
- name: Check QL formatting
21+
run: find ql "(" -name "*.ql" -or -name "*.qll" ")" -print0 | xargs -0 codeql query format --check-only
22+
qltest:
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
os : [ubuntu-20.04, macos-latest]
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: ./.github/actions/fetch-codeql
31+
- name: Install bazelisk - Linux
32+
if: runner.os == 'Linux'
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y wget
36+
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64
37+
mv bazelisk-linux-amd64 /usr/local/bin/bazel
38+
chmod +x /usr/local/bin/bazel
39+
- name: Install bazelisk - macOS
40+
if: runner.os == 'MacOS'
41+
run: |
42+
brew install bazelisk
43+
- name: Build Swift extractor
44+
run: |
45+
bazel run //swift:create-extractor-pack
46+
- name: Run QL tests
47+
run: |
48+
codeql test run --threads=0 --ram 5000 --search-path "${{ github.workspace }}/swift/extractor-pack" --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition ql/test
49+
env:
50+
GITHUB_TOKEN: ${{ github.token }}
51+

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,8 @@ csharp/extractor/Semmle.Extraction.CSharp.Driver/Properties/launchSettings.json
3131
# Compiled class file
3232
*.class
3333

34-
# links create by bazel
34+
# links created by bazel
3535
/bazel-*
36+
37+
# CLion project files
38+
/.clwb

BUILD.bazel

Whitespace-only changes.

CODEOWNERS

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@
55
/python/ @github/codeql-python
66
/ruby/ @github/codeql-ruby
77

8-
# Make @xcorail (GitHub Security Lab) a code owner for experimental queries so he gets pinged when we promote a query out of experimental
9-
/cpp/**/experimental/**/* @github/codeql-c-analysis @xcorail
10-
/csharp/**/experimental/**/* @github/codeql-csharp @xcorail
11-
/java/**/experimental/**/* @github/codeql-java @xcorail
12-
/javascript/**/experimental/**/* @github/codeql-javascript @xcorail
13-
/python/**/experimental/**/* @github/codeql-python @xcorail
14-
/ruby/**/experimental/**/* @github/codeql-ruby @xcorail
15-
168
# ML-powered queries
179
/javascript/ql/experimental/adaptivethreatmodeling/ @github/codeql-ml-powered-queries-reviewers
1810

WORKSPACE.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
# Please notice that any bazel targets and definitions in this repository are currently experimental
22
# and for internal use only.
3+
4+
workspace(name = "codeql")
5+
6+
load("//misc/bazel:workspace.bzl", "codeql_workspace")
7+
8+
codeql_workspace()
9+
10+
load("//misc/bazel:workspace_deps.bzl", "codeql_workspace_deps")
11+
12+
codeql_workspace_deps()

config/identical-files.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@
383383
"csharp/ql/test/TestUtilities/InlineExpectationsTest.qll",
384384
"java/ql/test/TestUtilities/InlineExpectationsTest.qll",
385385
"python/ql/test/TestUtilities/InlineExpectationsTest.qll",
386-
"ruby/ql/test/TestUtilities/InlineExpectationsTest.qll"
386+
"ruby/ql/test/TestUtilities/InlineExpectationsTest.qll",
387+
"ql/ql/test/TestUtilities/InlineExpectationsTest.qll"
387388
],
388389
"C++ ExternalAPIs": [
389390
"cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll",

cpp/ql/lib/CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
## 0.0.13
2+
3+
## 0.0.12
4+
5+
### Breaking Changes
6+
7+
* The flow state variants of `isBarrier` and `isAdditionalFlowStep` are no longer exposed in the taint tracking library. The `isSanitizer` and `isAdditionalTaintStep` predicates should be used instead.
8+
9+
### Deprecated APIs
10+
11+
* Many classes/predicates/modules that had upper-case acronyms have been renamed to follow our style-guide.
12+
The old name still exists as a deprecated alias.
13+
14+
### New Features
15+
16+
* The data flow and taint tracking libraries have been extended with versions of `isBarrierIn`, `isBarrierOut`, and `isBarrierGuard`, respectively `isSanitizerIn`, `isSanitizerOut`, and `isSanitizerGuard`, that support flow states.
17+
18+
### Minor Analysis Improvements
19+
20+
* `DefaultOptions::exits` now holds for C11 functions with the `_Noreturn` or `noreturn` specifier.
21+
* `hasImplicitCopyConstructor` and `hasImplicitCopyAssignmentOperator` now correctly handle implicitly-deleted operators in templates.
22+
* All deprecated predicates/classes/modules that have been deprecated for over a year have been deleted.
23+
124
## 0.0.11
225

326
### Minor Analysis Improvements

0 commit comments

Comments
 (0)