Skip to content

Commit 676327d

Browse files
committed
Merge branch 'main' into erb
2 parents 012fb28 + b209cac commit 676327d

File tree

378 files changed

+62606
-57828
lines changed

Some content is hidden

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

378 files changed

+62606
-57828
lines changed

.github/workflows/compile-queries.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,25 @@ name: "Compile all queries using the latest stable CodeQL CLI"
22

33
on:
44
push:
5-
branches: [main] # makes sure the cache gets populated
6-
pull_request:
7-
branches:
5+
branches: # makes sure the cache gets populated - running on the branches people tend to merge into.
86
- main
97
- "rc/*"
8+
- "codeql-cli-*"
9+
pull_request:
1010

1111
jobs:
1212
compile-queries:
1313
runs-on: ubuntu-latest-xl
1414

1515
steps:
1616
- uses: actions/checkout@v3
17-
with:
18-
fetch-depth: 0
1917
# calculate the merge-base with main, in a way that works both on PRs and pushes to main.
2018
- name: Calculate merge-base
2119
if: ${{ github.event_name == 'pull_request' }}
2220
env:
2321
BASE_BRANCH: ${{ github.base_ref }}
2422
run: |
25-
MERGE_BASE=$(git merge-base --fork-point origin/$BASE_BRANCH)
23+
MERGE_BASE=$(git cat-file commit $GITHUB_SHA | grep '^parent ' | head -1 | cut -f 2 -d " ")
2624
echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
2725
- name: Read CodeQL query compilation - PR
2826
if: ${{ github.event_name == 'pull_request' }}
@@ -31,14 +29,18 @@ jobs:
3129
path: '*/ql/src/.cache'
3230
key: codeql-compile-pr-${{ github.sha }} # deliberately not using the `compile-compile-main` keys here.
3331
restore-keys: |
34-
codeql-compile-main-${{ env.merge-base }}
32+
codeql-compile-${{ github.base_ref }}-${{ env.merge-base }}
33+
codeql-compile-${{ github.base_ref }}-
3534
codeql-compile-main-
3635
- name: Fill CodeQL query compilation cache - main
3736
if: ${{ github.event_name != 'pull_request' }}
3837
uses: actions/cache@v3
3938
with:
4039
path: '*/ql/src/.cache'
41-
key: codeql-compile-main-${{ github.sha }} # just fill on main
40+
key: codeql-compile-${{ github.ref_name }}-${{ github.sha }} # just fill on main
41+
restore-keys: | # restore from another random commit, to speed up compilation.
42+
codeql-compile-${{ github.ref_name }}-
43+
codeql-compile-main-
4244
- name: Setup CodeQL
4345
uses: ./.github/actions/fetch-codeql
4446
with:

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
- uses: actions/checkout@v3
2525
- name: Find codeql
2626
id: find-codeql
27-
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
27+
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
2828
with:
2929
languages: javascript # does not matter
3030
- name: Get CodeQL version
3131
id: get-codeql-version
3232
run: |
33-
echo "::set-output name=version::$("${CODEQL}" --version | head -n 1 | rev | cut -d " " -f 1 | rev)"
33+
echo "version=$("${CODEQL}" --version | head -n 1 | rev | cut -d " " -f 1 | rev)" >> $GITHUB_OUTPUT
3434
shell: bash
3535
env:
3636
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
@@ -133,7 +133,7 @@ jobs:
133133
env:
134134
CONF: ./ql-for-ql-config.yml
135135
- name: Initialize CodeQL
136-
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
136+
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
137137
with:
138138
languages: ql
139139
db-location: ${{ runner.temp }}/db
@@ -145,7 +145,7 @@ jobs:
145145
PACK: ${{ runner.temp }}/pack
146146

147147
- name: Perform CodeQL Analysis
148-
uses: github/codeql-action/analyze@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
148+
uses: github/codeql-action/analyze@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
149149
with:
150150
category: "ql-for-ql"
151151
- 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@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
28+
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
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@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
25+
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
2626
with:
2727
languages: javascript # does not matter
2828
- uses: actions/cache@v3

cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,7 @@ module IRTest {
9595
override predicate isSink(DataFlow::Node sink) {
9696
exists(FunctionCall call |
9797
call.getTarget().getName() = "sink" and
98-
sink.asConvertedExpr() = call.getAnArgument()
99-
or
100-
call.getTarget().getName() = "sink" and
101-
sink.asExpr() = call.getAnArgument() and
102-
sink.asConvertedExpr() instanceof ReferenceDereferenceExpr
103-
)
104-
or
105-
exists(ReadSideEffectInstruction read |
106-
read.getSideEffectOperand() = sink.asOperand() and
107-
read.getPrimaryInstruction().(CallInstruction).getStaticCallTarget().hasName("sink")
98+
sink.asExpr() = call.getAnArgument()
10899
)
109100
}
110101

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* The `[Summary|Sink|Source]ModelCsv` classes have been deprecated and Models as Data models are defined as data extensions instead.

0 commit comments

Comments
 (0)