Skip to content

Commit be7d668

Browse files
committed
Merge branch 'main' into import-refined
2 parents 11000fd + 927c322 commit be7d668

File tree

781 files changed

+34729
-4302
lines changed

Some content is hidden

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

781 files changed

+34729
-4302
lines changed

.github/actions/cache-query-compilation/action.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inputs:
99
outputs:
1010
cache-dir:
1111
description: "The directory where the cache was stored"
12-
value: ${{ steps.fill-compilation-dir.outputs.compdir }}
12+
value: ${{ steps.output-compilation-dir.outputs.compdir }}
1313

1414
runs:
1515
using: composite
@@ -27,7 +27,9 @@ runs:
2727
if: ${{ github.event_name == 'pull_request' }}
2828
uses: actions/cache/restore@v3
2929
with:
30-
path: '**/.cache'
30+
path: |
31+
**/.cache
32+
~/.codeql/compile-cache
3133
key: codeql-compile-${{ inputs.key }}-pr-${{ github.sha }}
3234
restore-keys: |
3335
codeql-compile-${{ inputs.key }}-${{ github.base_ref }}-${{ env.merge_base }}
@@ -37,12 +39,22 @@ runs:
3739
if: ${{ github.event_name != 'pull_request' }}
3840
uses: actions/cache@v3
3941
with:
40-
path: '**/.cache'
42+
path: |
43+
**/.cache
44+
~/.codeql/compile-cache
4145
key: codeql-compile-${{ inputs.key }}-${{ github.ref_name }}-${{ github.sha }} # just fill on main
4246
restore-keys: | # restore the latest cache if the exact cache is unavailable, to speed up compilation.
4347
codeql-compile-${{ inputs.key }}-${{ github.ref_name }}-
4448
codeql-compile-${{ inputs.key }}-main-
49+
- name: Output-compilationdir
50+
id: output-compilation-dir
51+
shell: bash
52+
run: |
53+
echo "compdir=${COMBINED_CACHE_DIR}" >> $GITHUB_OUTPUT
54+
env:
55+
COMBINED_CACHE_DIR: ${{ runner.temp }}/compilation-dir
4556
- name: Fill compilation cache directory
57+
id: fill-compilation-dir
4658
uses: actions/github-script@v6
4759
env:
4860
COMBINED_CACHE_DIR: ${{ runner.temp }}/compilation-dir
@@ -58,6 +70,7 @@ runs:
5870
5971
const fs = require("fs");
6072
const path = require("path");
73+
const os = require("os");
6174
6275
// the first argv is the cache folder to create.
6376
const COMBINED_CACHE_DIR = process.env.COMBINED_CACHE_DIR;
@@ -97,6 +110,17 @@ runs:
97110
console.log(`Found .cache dir at ${dir}`);
98111
}
99112
113+
const globalCacheDir = path.join(os.homedir(), ".codeql", "compile-cache");
114+
if (fs.existsSync(globalCacheDir)) {
115+
console.log("Found global home dir: " + globalCacheDir);
116+
cacheDirs.push(globalCacheDir);
117+
}
118+
119+
if (cacheDirs.length === 0) {
120+
console.log("No cache dirs found");
121+
return;
122+
}
123+
100124
// mkdir -p ${COMBINED_CACHE_DIR}
101125
fs.mkdirSync(COMBINED_CACHE_DIR, { recursive: true });
102126

.github/workflows/compile-queries.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ jobs:
2424
with:
2525
key: all-queries
2626
- name: check formatting
27-
run: find */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 codeql query format --check-only
27+
run: find */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
2828
- name: compile queries - check-only
2929
# run with --check-only if running in a PR (github.sha != main)
3030
if : ${{ github.event_name == 'pull_request' }}
3131
shell: bash
32-
run: codeql query compile -j0 */ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
32+
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
3333
- name: compile queries - full
3434
# do full compile if running on main - this populates the cache
3535
if : ${{ github.event_name != 'pull_request' }}
3636
shell: bash
37-
run: codeql query compile -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
37+
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
steps:
1616
### Build the queries ###
1717
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
1820
- name: Find codeql
1921
id: find-codeql
2022
uses: github/codeql-action/init@v2
@@ -27,7 +29,9 @@ jobs:
2729
id: cache-extractor
2830
uses: actions/cache@v3
2931
with:
30-
path: ql/extractor-pack/
32+
path: |
33+
ql/extractor-pack/
34+
ql/target/release/buramu
3135
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-extractor-${{ hashFiles('ql/**/Cargo.lock') }}-${{ hashFiles('ql/**/*.rs') }}
3236
- name: Cache cargo
3337
if: steps.cache-extractor.outputs.cache-hit != 'true'
@@ -50,6 +54,7 @@ jobs:
5054
key: run-ql-for-ql
5155
- name: Make database and analyze
5256
run: |
57+
./ql/target/release/buramu | tee deprecated.blame # Add a blame file for the extractor to parse.
5358
${CODEQL} database create -l=ql --search-path ql/extractor-pack ${DB}
5459
${CODEQL} database analyze -j0 --format=sarif-latest --output=ql-for-ql.sarif ${DB} ql/ql/src/codeql-suites/ql-code-scanning.qls --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
5560
env:
@@ -58,6 +63,7 @@ jobs:
5863
LGTM_INDEX_FILTERS: |
5964
exclude:ql/ql/test
6065
exclude:*/ql/lib/upgrades/
66+
exclude:java/ql/integration-tests
6167
- name: Upload sarif to code-scanning
6268
uses: github/codeql-action/upload-sarif@v2
6369
with:

.github/workflows/swift.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
paths:
66
- "swift/**"
77
- "misc/bazel/**"
8+
- "misc/codegen/**"
89
- "*.bazel*"
910
- .github/workflows/swift.yml
1011
- .github/actions/**
@@ -19,6 +20,7 @@ on:
1920
paths:
2021
- "swift/**"
2122
- "misc/bazel/**"
23+
- "misc/codegen/**"
2224
- "*.bazel*"
2325
- .github/workflows/swift.yml
2426
- .github/actions/**

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ repos:
5353
name: Run Swift code generation unit tests
5454
files: ^swift/codegen/.*\.py$
5555
language: system
56-
entry: bazel test //swift/codegen/test
56+
entry: bazel test //misc/codegen/test
5757
pass_filenames: false

CODEOWNERS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
/csharp/ @github/codeql-csharp
33
/go/ @github/codeql-go
44
/java/ @github/codeql-java
5-
/javascript/ @github/codeql-javascript
6-
/python/ @github/codeql-python
7-
/ruby/ @github/codeql-ruby
5+
/javascript/ @github/codeql-dynamic
6+
/python/ @github/codeql-dynamic
7+
/ruby/ @github/codeql-dynamic
88
/swift/ @github/codeql-swift
9+
/misc/codegen/ @github/codeql-swift
910
/java/kotlin-extractor/ @github/codeql-kotlin
1011
/java/kotlin-explorer/ @github/codeql-kotlin
1112

cpp/ql/lib/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.3
2+
3+
No user-facing changes.
4+
15
## 0.5.2
26

37
No user-facing changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.5.3
2+
3+
No user-facing changes.

cpp/ql/lib/codeql-pack.release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 0.5.2
2+
lastReleaseVersion: 0.5.3

cpp/ql/lib/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/cpp-all
2-
version: 0.5.3-dev
2+
version: 0.5.4-dev
33
groups: cpp
44
dbscheme: semmlecode.cpp.dbscheme
55
extractor: cpp

0 commit comments

Comments
 (0)