Skip to content

Commit 6914e9a

Browse files
committed
Merge branch 'main' into atorralba/ql/omittable-exists
2 parents ecf5686 + 466f246 commit 6914e9a

File tree

1,039 files changed

+60139
-28017
lines changed

Some content is hidden

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

1,039 files changed

+60139
-28017
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,19 @@ runs:
2323
run: |
2424
MERGE_BASE=$(git cat-file commit $GITHUB_SHA | grep '^parent ' | head -1 | cut -f 2 -d " ")
2525
echo "merge_base=$MERGE_BASE" >> $GITHUB_ENV
26-
- name: Restore read-only cache (PR)
26+
- name: Restore cache (PR)
2727
if: ${{ github.event_name == 'pull_request' }}
28-
uses: erik-krogh/actions-cache@a88d0603fe5fb5606db9f002dfcadeb32b5f84c6
28+
uses: actions/cache/restore@v3
2929
with:
3030
path: '**/.cache'
31-
read-only: true
3231
key: codeql-compile-${{ inputs.key }}-pr-${{ github.sha }}
3332
restore-keys: |
3433
codeql-compile-${{ inputs.key }}-${{ github.base_ref }}-${{ env.merge_base }}
3534
codeql-compile-${{ inputs.key }}-${{ github.base_ref }}-
3635
codeql-compile-${{ inputs.key }}-main-
37-
- name: Fill cache (push)
36+
- name: Fill cache (only branch push)
3837
if: ${{ github.event_name != 'pull_request' }}
39-
uses: erik-krogh/actions-cache@a88d0603fe5fb5606db9f002dfcadeb32b5f84c6
38+
uses: actions/cache@v3
4039
with:
4140
path: '**/.cache'
4241
key: codeql-compile-${{ inputs.key }}-${{ github.ref_name }}-${{ github.sha }} # just fill on main

.github/workflows/check-change-note.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ jobs:
2626
run: |
2727
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq 'any(.[].filename ; test("/change-notes/.*[.]md$"))' |
2828
grep true -c
29+
- name: Fail if the change note filename doesn't match the expected format. The file name must be of the form 'YYYY-MM-DD.md' or 'YYYY-MM-DD-{title}.md', where '{title}' is arbitrary text.
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))] | all(test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$"))' |
34+
grep true -c

.github/workflows/close-stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/stale@v6
15+
- uses: actions/stale@v7
1616
with:
1717
repo-token: ${{ secrets.GITHUB_TOKEN }}
1818
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Comment or remove the `Stale` label in order to avoid having this issue closed in 7 days.'

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: ./.github/actions/find-latest-bundle
2828
- name: Find codeql
2929
id: find-codeql
30-
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
30+
uses: github/codeql-action/init@45955cb1830b640e2c1603ad72ad542a49d47b96
3131
with:
3232
languages: javascript # does not matter
3333
tools: ${{ steps.find-latest-bundle.outputs.url }}
@@ -137,20 +137,20 @@ jobs:
137137
env:
138138
CONF: ./ql-for-ql-config.yml
139139
- name: Initialize CodeQL
140-
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
140+
uses: github/codeql-action/init@45955cb1830b640e2c1603ad72ad542a49d47b96
141141
with:
142142
languages: ql
143143
db-location: ${{ runner.temp }}/db
144144
config-file: ./ql-for-ql-config.yml
145145
tools: ${{ steps.find-latest-bundle.outputs.url }}
146-
- name: Move pack cache
146+
- name: Move pack queries
147147
run: |
148-
cp -r ${PACK}/.cache ql/ql/src/.cache
148+
cp -r ${PACK}/queries ql/ql/src
149149
env:
150150
PACK: ${{ runner.temp }}/pack
151151

152152
- name: Perform CodeQL Analysis
153-
uses: github/codeql-action/analyze@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
153+
uses: github/codeql-action/analyze@45955cb1830b640e2c1603ad72ad542a49d47b96
154154
with:
155155
category: "ql-for-ql"
156156
- name: Copy sarif file to CWD

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Find codeql
2727
id: find-codeql
28-
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
28+
uses: github/codeql-action/init@45955cb1830b640e2c1603ad72ad542a49d47b96
2929
with:
3030
languages: javascript # does not matter
3131
- uses: actions/cache@v3

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v3
2323
- name: Find codeql
2424
id: find-codeql
25-
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
25+
uses: github/codeql-action/init@45955cb1830b640e2c1603ad72ad542a49d47b96
2626
with:
2727
languages: javascript # does not matter
2828
- uses: actions/cache@v3

.github/workflows/ruby-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ jobs:
115115
- name: Build Query Pack
116116
run: |
117117
rm -rf target/packs
118-
codeql pack create ../shared/ssa --output target/packs
119118
codeql pack create ../misc/suite-helpers --output target/packs
120119
codeql pack create ../shared/regex --output target/packs
120+
codeql pack create ../shared/ssa --output target/packs
121+
codeql pack create ../shared/tutorial --output target/packs
121122
codeql pack create ql/lib --output target/packs
122123
codeql pack create -j0 ql/src --output target/packs --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
123124
PACK_FOLDER=$(readlink -f target/packs/codeql/ruby-queries/*)

config/identical-files.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -402,16 +402,6 @@
402402
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/ControlFlowReachability.qll",
403403
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/ControlFlowReachability.qll"
404404
],
405-
"Inline Test Expectations": [
406-
"cpp/ql/test/TestUtilities/InlineExpectationsTest.qll",
407-
"csharp/ql/test/TestUtilities/InlineExpectationsTest.qll",
408-
"java/ql/test/TestUtilities/InlineExpectationsTest.qll",
409-
"python/ql/test/TestUtilities/InlineExpectationsTest.qll",
410-
"ruby/ql/test/TestUtilities/InlineExpectationsTest.qll",
411-
"ql/ql/test/TestUtilities/InlineExpectationsTest.qll",
412-
"go/ql/test/TestUtilities/InlineExpectationsTest.qll",
413-
"swift/ql/test/TestUtilities/InlineExpectationsTest.qll"
414-
],
415405
"C++ ExternalAPIs": [
416406
"cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll",
417407
"cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll"
@@ -505,14 +495,6 @@
505495
"python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll",
506496
"ruby/ql/lib/codeql/ruby/typetracking/TypeTracker.qll"
507497
],
508-
"CodeQL Tutorial": [
509-
"cpp/ql/lib/tutorial.qll",
510-
"csharp/ql/lib/tutorial.qll",
511-
"java/ql/lib/tutorial.qll",
512-
"javascript/ql/lib/tutorial.qll",
513-
"python/ql/lib/tutorial.qll",
514-
"ruby/ql/lib/tutorial.qll"
515-
],
516498
"AccessPathSyntax": [
517499
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/AccessPathSyntax.qll",
518500
"go/ql/lib/semmle/go/dataflow/internal/AccessPathSyntax.qll",

cpp/downgrades/23f7cbb88a4eb29f30c3490363dc201bc054c5ff/exprs.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ predicate isExprWithNewBuiltin(Expr expr) {
1313
from Expr expr, int kind, int kind_new, Location location
1414
where
1515
exprs(expr, kind, location) and
16-
if isExprWithNewBuiltin(expr) then kind_new = 0 else kind_new = kind
16+
if isExprWithNewBuiltin(expr) then kind_new = 1 else kind_new = kind
1717
select expr, kind_new, location

cpp/downgrades/73af5058c6899dcdb05754c27ca966aeb3a68c94/exprs.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ class Location extends @location_expr {
99
from Expr expr, int kind, int kind_new, Location location
1010
where
1111
exprs(expr, kind, location) and
12-
if expr instanceof @blockassignexpr then kind_new = 0 else kind_new = kind
12+
if expr instanceof @blockassignexpr then kind_new = 1 else kind_new = kind
1313
select expr, kind_new, location

0 commit comments

Comments
 (0)