Skip to content

Commit 104298e

Browse files
committed
Merge branch 'master' into models5
2 parents c18e0aa + 71665a0 commit 104298e

File tree

102 files changed

+7178
-5736
lines changed

Some content is hidden

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

102 files changed

+7178
-5736
lines changed

.github/codeql/codeql-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: "CodeQL config"
2+
3+
queries:
4+
- uses: security-and-quality

.github/workflows/codeql-analysis.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 9 * * 1'
8+
9+
jobs:
10+
CodeQL-Build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
with:
18+
# We must fetch at least the immediate parents so that if this is
19+
# a pull request then we can checkout the head.
20+
fetch-depth: 2
21+
22+
# If this run was triggered by a pull request event, then checkout
23+
# the head of the pull request instead of the merge commit.
24+
- run: git checkout HEAD^2
25+
if: ${{ github.event_name == 'pull_request' }}
26+
27+
# Initializes the CodeQL tools for scanning.
28+
- name: Initialize CodeQL
29+
uses: github/codeql-action/init@v1
30+
# Override language selection by uncommenting this and choosing your languages
31+
with:
32+
languages: csharp
33+
config-file: ./.github/codeql/codeql-config.yml
34+
35+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
36+
# If this step fails, then you should remove it and run the build manually (see below)
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v1
39+
40+
# ℹ️ Command-line programs to run using the OS shell.
41+
# 📚 https://git.io/JvXDl
42+
43+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
44+
# and modify them (or add more) to build your code if your project
45+
# uses a compiled language
46+
47+
#- run: |
48+
# make bootstrap
49+
# make release
50+
51+
- name: Perform CodeQL Analysis
52+
uses: github/codeql-action/analyze@v1

config/identical-files.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,18 @@
9696
"cpp/ql/src/semmle/code/cpp/ir/implementation/UseSoundEscapeAnalysis.qll",
9797
"csharp/ql/src/experimental/ir/implementation/UseSoundEscapeAnalysis.qll"
9898
],
99+
"IR IRFunctionBase": [
100+
"cpp/ql/src/semmle/code/cpp/ir/implementation/internal/IRFunctionBase.qll",
101+
"csharp/ql/src/experimental/ir/implementation/internal/IRFunctionBase.qll"
102+
],
99103
"IR Operand Tag": [
100104
"cpp/ql/src/semmle/code/cpp/ir/implementation/internal/OperandTag.qll",
101105
"csharp/ql/src/experimental/ir/implementation/internal/OperandTag.qll"
102106
],
107+
"IR TInstruction":[
108+
"cpp/ql/src/semmle/code/cpp/ir/implementation/internal/TInstruction.qll",
109+
"csharp/ql/src/experimental/ir/implementation/internal/TInstruction.qll"
110+
],
103111
"IR TIRVariable":[
104112
"cpp/ql/src/semmle/code/cpp/ir/implementation/internal/TIRVariable.qll",
105113
"csharp/ql/src/experimental/ir/implementation/internal/TIRVariable.qll"
@@ -177,6 +185,11 @@
177185
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll",
178186
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/IRBlockImports.qll"
179187
],
188+
"C++ IR IRFunctionImports": [
189+
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal/IRFunctionImports.qll",
190+
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/IRFunctionImports.qll",
191+
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/IRFunctionImports.qll"
192+
],
180193
"C++ IR IRVariableImports": [
181194
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal/IRVariableImports.qll",
182195
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/IRVariableImports.qll",
@@ -287,6 +300,10 @@
287300
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRBlockImports.qll",
288301
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll"
289302
],
303+
"C# IR IRFunctionImports": [
304+
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRFunctionImports.qll",
305+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRFunctionImports.qll"
306+
],
290307
"C# IR IRVariableImports": [
291308
"csharp/ql/src/experimental/ir/implementation/raw/internal/IRVariableImports.qll",
292309
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRVariableImports.qll"

cpp/ql/src/Likely Bugs/RedundantNullCheckSimple.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import semmle.code.cpp.ir.ValueNumbering
2323
class NullInstruction extends ConstantValueInstruction {
2424
NullInstruction() {
2525
this.getValue() = "0" and
26-
this.getResultType().getUnspecifiedType() instanceof PointerType
26+
this.getResultIRType() instanceof IRAddressType
2727
}
2828
}
2929

@@ -44,8 +44,8 @@ predicate explicitNullTestOfInstruction(Instruction checked, Instruction bool) {
4444
bool =
4545
any(ConvertInstruction convert |
4646
checked = convert.getUnary() and
47-
convert.getResultType() instanceof BoolType and
48-
checked.getResultType() instanceof PointerType
47+
convert.getResultIRType() instanceof IRBooleanType and
48+
checked.getResultIRType() instanceof IRAddressType
4949
)
5050
}
5151

cpp/ql/src/codeql-suites/cpp-security-extended.qls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
- qlpack: codeql-cpp
33
- apply: security-extended-selectors.yml
44
from: codeql-suite-helpers
5-
- apply: codeql-suites/excluded-slow-queries.yml
5+
- apply: codeql-suites/exclude-slow-queries.yml
66
from: codeql-cpp

0 commit comments

Comments
 (0)