Skip to content

Commit 3dec222

Browse files
committed
Merge remote-tracking branch 'origin/main' into jorgectf/python/jwt-queries
2 parents 7069f45 + c9b50f3 commit 3dec222

File tree

7,506 files changed

+780362
-277153
lines changed

Some content is hidden

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

7,506 files changed

+780362
-277153
lines changed

.codeqlmanifest.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
{ "provide": [ "*/ql/src/qlpack.yml",
1+
{ "provide": [ "ruby/.codeqlmanifest.json",
2+
"*/ql/src/qlpack.yml",
3+
"*/ql/lib/qlpack.yml",
24
"*/ql/test/qlpack.yml",
35
"cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml",
46
"*/ql/examples/qlpack.yml",
57
"*/upgrades/qlpack.yml",
8+
"javascript/ql/experimental/adaptivethreatmodeling/lib/qlpack.yml",
9+
"javascript/ql/experimental/adaptivethreatmodeling/src/qlpack.yml",
610
"misc/legacy-support/*/qlpack.yml",
711
"misc/suite-helpers/qlpack.yml" ] }

.devcontainer/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
22
"extensions": [
3+
"rust-lang.rust",
4+
"bungcip.better-toml",
35
"github.vscode-codeql",
46
"slevesque.vscode-zipexplorer"
57
],
68
"settings": {
9+
"files.watcherExclude": {
10+
"**/target/**": true
11+
},
712
"codeQL.runningQueries.memory": 2048
813
}
914
}

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,6 @@
4848
*.gif -text
4949
*.dll -text
5050
*.pdb -text
51+
52+
java/ql/test/stubs/**/*.java linguist-generated=true
53+
java/ql/test/experimental/stubs/**/*.java linguist-generated=true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Fetch CodeQL
2+
description: Fetches the latest version of CodeQL
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Fetch CodeQL
7+
shell: bash
8+
run: |
9+
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 codeql-linux64.zip
12+
echo "${{ github.workspace }}/codeql" >> $GITHUB_PATH
13+
env:
14+
GITHUB_TOKEN: ${{ github.token }}

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "ruby/node-types"
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "cargo"
8+
directory: "ruby/generator"
9+
schedule:
10+
interval: "daily"
11+
- package-ecosystem: "cargo"
12+
directory: "ruby/extractor"
13+
schedule:
14+
interval: "daily"
15+
- package-ecosystem: "cargo"
16+
directory: "ruby/autobuilder"
17+
schedule:
18+
interval: "daily"

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Python:
1818
- python/**/*
1919
- change-notes/**/*python*
2020

21+
Ruby:
22+
- ruby/**/*
23+
- change-notes/**/*ruby*
24+
2125
documentation:
2226
- "**/*.qhelp"
2327
- "**/*.md"

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- 'rc/*'
1212
paths:
1313
- 'csharp/**'
14+
- '.github/codeql/**'
15+
- '.github/workflows/codeql-analysis.yml'
1416
schedule:
1517
- cron: '0 9 * * 1'
1618

@@ -38,8 +40,8 @@ jobs:
3840

3941
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4042
# If this step fails, then you should remove it and run the build manually (see below)
41-
- name: Autobuild
42-
uses: github/codeql-action/autobuild@main
43+
#- name: Autobuild
44+
# uses: github/codeql-action/autobuild@main
4345

4446
# ℹ️ Command-line programs to run using the OS shell.
4547
# 📚 https://git.io/JvXDl
@@ -48,9 +50,8 @@ jobs:
4850
# and modify them (or add more) to build your code if your project
4951
# uses a compiled language
5052

51-
#- run: |
52-
# make bootstrap
53-
# make release
53+
- run: |
54+
dotnet build csharp
5455
5556
- name: Perform CodeQL Analysis
5657
uses: github/codeql-action/analyze@main

.github/workflows/csv-coverage-pr-artifacts.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- '.github/workflows/csv-coverage-pr-comment.yml'
77
- '*/ql/src/**/*.ql'
88
- '*/ql/src/**/*.qll'
9+
- '*/ql/lib/**/*.ql'
10+
- '*/ql/lib/**/*.qll'
911
- 'misc/scripts/library-coverage/*.py'
1012
# input data files
1113
- '*/documentation/library-coverage/cwe-sink.csv'
@@ -32,8 +34,12 @@ jobs:
3234
- name: Clone self (github/codeql) - BASE
3335
uses: actions/checkout@v2
3436
with:
35-
ref: ${{ github.event.pull_request.base.sha }}
37+
fetch-depth: 2
3638
path: base
39+
- run: |
40+
git checkout HEAD^1
41+
git log -1 --format='%H'
42+
working-directory: base
3743
- name: Set up Python 3.8
3844
uses: actions/setup-python@v2
3945
with:
@@ -45,19 +51,23 @@ jobs:
4551
gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip"
4652
- name: Unzip CodeQL CLI
4753
run: unzip -d codeql-cli codeql-linux64.zip
48-
- name: Generate CSV files on merge and base of the PR
54+
- name: Generate CSV files on merge commit of the PR
4955
run: |
50-
echo "Running generator on ${{github.sha}}"
56+
echo "Running generator on merge"
5157
PATH="$PATH:codeql-cli/codeql" python merge/misc/scripts/library-coverage/generate-report.py ci merge merge
5258
mkdir out_merge
5359
cp framework-coverage-*.csv out_merge/
5460
cp framework-coverage-*.rst out_merge/
55-
56-
echo "Running generator on ${{github.event.pull_request.base.sha}}"
61+
- name: Generate CSV files on base commit of the PR
62+
run: |
63+
echo "Running generator on base"
5764
PATH="$PATH:codeql-cli/codeql" python base/misc/scripts/library-coverage/generate-report.py ci base base
5865
mkdir out_base
5966
cp framework-coverage-*.csv out_base/
6067
cp framework-coverage-*.rst out_base/
68+
- name: Generate diff of coverage reports
69+
run: |
70+
python base/misc/scripts/library-coverage/compare-folders.py out_base out_merge comparison.md
6171
- name: Upload CSV package list
6272
uses: actions/upload-artifact@v2
6373
with:
@@ -72,6 +82,12 @@ jobs:
7282
path: |
7383
out_base/framework-coverage-*.csv
7484
out_base/framework-coverage-*.rst
85+
- name: Upload comparison results
86+
uses: actions/upload-artifact@v2
87+
with:
88+
name: comparison
89+
path: |
90+
comparison.md
7591
- name: Save PR number
7692
run: |
7793
mkdir -p pr

.github/workflows/csv-coverage-pr-comment.yml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,9 @@ jobs:
2626
with:
2727
python-version: 3.8
2828

29-
# download artifacts from the PR job:
30-
31-
- name: Download artifact - MERGE
29+
- name: Check coverage difference file and comment
3230
env:
3331
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3432
RUN_ID: ${{ github.event.workflow_run.id }}
3533
run: |
36-
gh run download --name "csv-framework-coverage-merge" --dir "out_merge" "$RUN_ID"
37-
38-
- name: Download artifact - BASE
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
RUN_ID: ${{ github.event.workflow_run.id }}
42-
run: |
43-
gh run download --name "csv-framework-coverage-base" --dir "out_base" "$RUN_ID"
44-
45-
- name: Download artifact - PR
46-
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
RUN_ID: ${{ github.event.workflow_run.id }}
49-
run: |
50-
gh run download --name "pr" --dir "pr" "$RUN_ID"
51-
52-
- name: Check coverage files
53-
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
RUN_ID: ${{ github.event.workflow_run.id }}
56-
run: |
57-
PR=$(cat "pr/NR")
58-
python misc/scripts/library-coverage/compare-files-comment-pr.py \
59-
out_base out_merge comparison.md "$GITHUB_REPOSITORY" "$PR" "$RUN_ID"
60-
- name: Upload comparison results
61-
uses: actions/upload-artifact@v2
62-
with:
63-
name: comparison
64-
path: |
65-
comparison.md
34+
python misc/scripts/library-coverage/comment-pr.py "$GITHUB_REPOSITORY" "$RUN_ID"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Update framework coverage reports
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
8+
jobs:
9+
update:
10+
name: Update framework coverage report
11+
if: github.repository == 'github/codeql'
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Dump GitHub context
16+
env:
17+
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
18+
run: echo "$GITHUB_CONTEXT"
19+
- name: Clone self (github/codeql)
20+
uses: actions/checkout@v2
21+
with:
22+
path: ql
23+
fetch-depth: 0
24+
- name: Set up Python 3.8
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.8
28+
- name: Download CodeQL CLI
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: |
32+
gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip"
33+
- name: Unzip CodeQL CLI
34+
run: unzip -d codeql-cli codeql-linux64.zip
35+
36+
- name: Generate coverage files
37+
run: |
38+
PATH="$PATH:codeql-cli/codeql" python ql/misc/scripts/library-coverage/generate-report.py ci ql ql
39+
40+
- name: Create pull request with changes
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
run: |
44+
python ql/misc/scripts/library-coverage/create-pr.py ql "$GITHUB_REPOSITORY"

0 commit comments

Comments
 (0)