Skip to content

Commit e05bb7f

Browse files
committed
Merge branch 'main' into format
2 parents 640f894 + b3a3957 commit e05bb7f

File tree

622 files changed

+48349
-10736
lines changed

Some content is hidden

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

622 files changed

+48349
-10736
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/atm-check-query-suite.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
atm-check-query-suite:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-latest-xl
1717

1818
steps:
1919
- uses: actions/checkout@v3
@@ -23,6 +23,12 @@ jobs:
2323
with:
2424
channel: release
2525

26+
- name: Cache compilation cache
27+
id: query-cache
28+
uses: ./.github/actions/cache-query-compilation
29+
with:
30+
key: atm-suite
31+
2632
- name: Install ATM model
2733
run: |
2834
set -exu
@@ -50,10 +56,13 @@ jobs:
5056
echo "SARIF_PATH=${SARIF_PATH}" >> "${GITHUB_ENV}"
5157
5258
codeql database analyze \
59+
--threads=0 \
60+
--ram 50000 \
5361
--format sarif-latest \
5462
--output "${SARIF_PATH}" \
5563
--sarif-group-rules-by-pack \
5664
-vv \
65+
--compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" \
5766
-- \
5867
"${DB_PATH}" \
5968
"${QUERY_PACK}/${QUERY_SUITE}"

.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.'

config/identical-files.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,6 @@
531531
"ruby/ql/lib/codeql/ruby/internal/ConceptsShared.qll",
532532
"javascript/ql/lib/semmle/javascript/internal/ConceptsShared.qll"
533533
],
534-
"Hostname Regexp queries": [
535-
"javascript/ql/src/Security/CWE-020/HostnameRegexpShared.qll",
536-
"python/ql/src/Security/CWE-020/HostnameRegexpShared.qll",
537-
"ruby/ql/src/queries/security/cwe-020/HostnameRegexpShared.qll"
538-
],
539534
"ApiGraphModels": [
540535
"javascript/ql/lib/semmle/javascript/frameworks/data/internal/ApiGraphModels.qll",
541536
"ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModels.qll",

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.4.6
2+
3+
No user-facing changes.
4+
15
## 0.4.5
26

37
No user-facing changes.
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 `ArgvSource` flow source now uses the second parameter of `main` as its source instead of the uses of this parameter.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.4.6
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.4.5
2+
lastReleaseVersion: 0.4.6

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.4.6-dev
2+
version: 0.5.0-dev
33
groups: cpp
44
dbscheme: semmlecode.cpp.dbscheme
55
extractor: cpp

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/InstructionTag.qll

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,19 @@ newtype TInstructionTag =
7272
AsmInputTag(int elementIndex) { exists(AsmStmt asm | exists(asm.getChild(elementIndex))) } or
7373
ThisAddressTag() or
7474
ThisLoadTag() or
75-
StructuredBindingAccessTag()
75+
StructuredBindingAccessTag() or
76+
// The next three cases handle generation of the constants -1, 0 and 1 for __except handling.
77+
TryExceptGenerateNegativeOne() or
78+
TryExceptGenerateZero() or
79+
TryExceptGenerateOne() or
80+
// The next three cases handle generation of comparisons for __except handling.
81+
TryExceptCompareNegativeOne() or
82+
TryExceptCompareZero() or
83+
TryExceptCompareOne() or
84+
// The next three cases handle generation of branching for __except handling.
85+
TryExceptCompareNegativeOneBranch() or
86+
TryExceptCompareZeroBranch() or
87+
TryExceptCompareOneBranch()
7688

7789
class InstructionTag extends TInstructionTag {
7890
final string toString() { result = "Tag" }
@@ -224,4 +236,22 @@ string getInstructionTagId(TInstructionTag tag) {
224236
tag = ThisLoadTag() and result = "ThisLoad"
225237
or
226238
tag = StructuredBindingAccessTag() and result = "StructuredBindingAccess"
239+
or
240+
tag = TryExceptCompareNegativeOne() and result = "TryExceptCompareNegativeOne"
241+
or
242+
tag = TryExceptCompareZero() and result = "TryExceptCompareZero"
243+
or
244+
tag = TryExceptCompareOne() and result = "TryExceptCompareOne"
245+
or
246+
tag = TryExceptGenerateNegativeOne() and result = "TryExceptGenerateNegativeOne"
247+
or
248+
tag = TryExceptGenerateZero() and result = "TryExceptGenerateNegativeOne"
249+
or
250+
tag = TryExceptGenerateOne() and result = "TryExceptGenerateOne"
251+
or
252+
tag = TryExceptCompareNegativeOneBranch() and result = "TryExceptCompareNegativeOneBranch"
253+
or
254+
tag = TryExceptCompareZeroBranch() and result = "TryExceptCompareZeroBranch"
255+
or
256+
tag = TryExceptCompareOneBranch() and result = "TryExceptCompareOneBranch"
227257
}

0 commit comments

Comments
 (0)