Skip to content

Commit d389012

Browse files
committed
Merge branch 'main' into redundantImport
2 parents 881e5e1 + 3737248 commit d389012

File tree

889 files changed

+9725
-2998
lines changed

Some content is hidden

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

889 files changed

+9725
-2998
lines changed

.github/labeler.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ Python:
2121
Ruby:
2222
- ruby/**/*
2323
- change-notes/**/*ruby*
24+
25+
Swift:
26+
- swift/**/*
27+
- change-notes/**/*swift*
2428

2529
documentation:
2630
- "**/*.qhelp"
2731
- "**/*.md"
2832
- docs/**/*
2933

3034
"QL-for-QL":
31-
- ql/**/*
35+
- ql/**/*

.github/workflows/check-qldoc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
shell: bash
3131
run: |
3232
EXIT_CODE=0
33-
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -o '^[a-z]*/ql/lib' || true; } | sort -u)"
33+
# TODO: remove the swift exception from the regex when we fix generated QLdoc
34+
changed_lib_packs="$(git diff --name-only --diff-filter=ACMRT HEAD^ HEAD | { grep -Po '^(?!swift)[a-z]*/ql/lib' || true; } | sort -u)"
3435
for pack_dir in ${changed_lib_packs}; do
3536
lang="${pack_dir%/ql/lib}"
3637
gh codeql generate library-doc-coverage --output="${RUNNER_TEMP}/${lang}-current.txt" --dir="${pack_dir}"

.github/workflows/ql-for-ql-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
runs-on: ubuntu-latest
141141
strategy:
142142
matrix:
143-
folder: [cpp, csharp, java, javascript, python, ql, ruby]
143+
folder: [cpp, csharp, java, javascript, python, ql, ruby, swift]
144144

145145
needs:
146146
- package

.github/workflows/swift-codegen.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Swift: Check code generation"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "swift/**"
7+
- .github/workflows/swift-codegen.yml
8+
branches:
9+
- main
10+
11+
jobs:
12+
codegen:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-python@v3
17+
with:
18+
python-version: '~3.7'
19+
cache: 'pip'
20+
- uses: ./.github/actions/fetch-codeql
21+
- uses: bazelbuild/setup-bazelisk@v2
22+
- name: Check code generation
23+
run: |
24+
pip install -r swift/codegen/requirements.txt
25+
bazel run //swift/codegen
26+
git add swift
27+
git diff --exit-code --stat HEAD

.github/workflows/swift-qltest.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,7 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@v2
3030
- 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
31+
- uses: bazelbuild/setup-bazelisk@v2
4332
- name: Build Swift extractor
4433
run: |
4534
bazel run //swift:create-extractor-pack
@@ -48,4 +37,3 @@ jobs:
4837
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
4938
env:
5039
GITHUB_TOKEN: ${{ github.token }}
51-

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636

3737
- id: swift-codegen
3838
name: Run Swift checked in code generation
39-
files: ^swift/(codegen/|.*/generated/|ql/lib/swift\.dbscheme$)
39+
files: ^swift/(codegen/|.*/generated/|ql/lib/(swift\.dbscheme$|codeql/swift/elements))
4040
language: system
4141
entry: bazel run //swift/codegen
4242
pass_filenames: false

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
We welcome contributions to our CodeQL libraries and queries. Got an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).
44

5-
There is lots of useful documentation to help you write queries, ranging from information about query file structure to tutorials for specific target languages. For more information on the documentation available, see [CodeQL queries](https://help.semmle.com/QL/learn-ql/writing-queries/writing-queries.html) on [help.semmle.com](https://help.semmle.com).
5+
There is lots of useful documentation to help you write queries, ranging from information about query file structure to tutorials for specific target languages. For more information on the documentation available, see [CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries) on [codeql.github.com](https://codeql.github.com).
66

77
## Change notes
88

@@ -40,7 +40,7 @@ If you have an idea for a query that you would like to share with other CodeQL u
4040

4141
3. **Formatting**
4242

43-
- The queries and libraries must be autoformatted, for example using the "Format Document" command in [CodeQL for Visual Studio Code](https://help.semmle.com/codeql/codeql-for-vscode/procedures/about-codeql-for-vscode.html).
43+
- The queries and libraries must be autoformatted, for example using the "Format Document" command in [CodeQL for Visual Studio Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code).
4444

4545
If you prefer, you can either:
4646
1. install the [pre-commit framework](https://pre-commit.com/) and install the configured hooks on this repo via `pre-commit install`, or

cpp/ql/lib/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 0.1.0
2+
3+
### Breaking Changes
4+
5+
* The recently added flow-state versions of `isBarrierIn`, `isBarrierOut`, `isSanitizerIn`, and `isSanitizerOut` in the data flow and taint tracking libraries have been removed.
6+
7+
### New Features
8+
9+
* A new library `semmle.code.cpp.security.PrivateData` has been added. The new library heuristically detects variables and functions dealing with sensitive private data, such as e-mail addresses and credit card numbers.
10+
11+
### Minor Analysis Improvements
12+
13+
* The `semmle.code.cpp.security.SensitiveExprs` library has been enhanced with some additional rules for detecting credentials.
14+
115
## 0.0.13
216

317
## 0.0.12

cpp/ql/lib/change-notes/2022-03-28-private-data.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

cpp/ql/lib/change-notes/2022-03-31-sensitive-exprs.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)