Skip to content

Commit 8031c3f

Browse files
committed
Merge branch 'main' into clrtxt9
2 parents 02b1774 + ef227a4 commit 8031c3f

File tree

271 files changed

+137541
-3119
lines changed

Some content is hidden

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

271 files changed

+137541
-3119
lines changed

.gitattributes

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,9 @@
5050
*.pdb -text
5151

5252
java/ql/test/stubs/**/*.java linguist-generated=true
53-
java/ql/test/experimental/stubs/**/*.java linguist-generated=true
53+
java/ql/test/experimental/stubs/**/*.java linguist-generated=true
54+
55+
# Generated test files - these are synced from the standard JavaScript libraries using
56+
# `javascript/ql/experimental/adaptivethreatmodeling/test/update_endpoint_test_files.py`.
57+
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.js linguist-generated=true -merge
58+
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.ts linguist-generated=true -merge

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ jobs:
2727
pull-requests: read
2828

2929
steps:
30+
- name: Setup dotnet
31+
uses: actions/setup-dotnet@v1
32+
with:
33+
dotnet-version: 6.0.101
34+
3035
- name: Checkout repository
3136
uses: actions/checkout@v2
3237

@@ -51,7 +56,7 @@ jobs:
5156
# uses a compiled language
5257

5358
- run: |
54-
dotnet build csharp
59+
dotnet build csharp /p:UseSharedCompilation=false
5560
5661
- name: Perform CodeQL Analysis
5762
uses: github/codeql-action/analyze@main

.github/workflows/js-ml-tests.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: JS ML-powered queries tests
2+
3+
on:
4+
push:
5+
paths:
6+
- "javascript/ql/experimental/adaptivethreatmodeling/**"
7+
- .github/workflows/js-ml-tests.yml
8+
branches:
9+
- main
10+
- "rc/*"
11+
pull_request:
12+
paths:
13+
- "javascript/ql/experimental/adaptivethreatmodeling/**"
14+
- .github/workflows/js-ml-tests.yml
15+
16+
defaults:
17+
run:
18+
working-directory: javascript/ql/experimental/adaptivethreatmodeling
19+
20+
jobs:
21+
qlformat:
22+
name: Check QL formatting
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- uses: ./.github/actions/fetch-codeql
28+
29+
- name: Check QL formatting
30+
run: |
31+
find . "(" -name "*.ql" -or -name "*.qll" ")" -print0 | \
32+
xargs -0 codeql query format --check-only
33+
34+
qlcompile:
35+
name: Check QL compilation
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v2
39+
40+
- uses: ./.github/actions/fetch-codeql
41+
42+
- name: Check QL compilation
43+
run: |
44+
codeql query compile \
45+
--check-only \
46+
--ram 5120 \
47+
--additional-packs "${{ github.workspace }}" \
48+
--threads=0 \
49+
-- \
50+
lib modelbuilding src
51+
52+
qltest:
53+
name: Run QL tests
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v2
57+
58+
- uses: ./.github/actions/fetch-codeql
59+
60+
- name: Run QL tests
61+
run: |
62+
codeql test run \
63+
--threads=0 \
64+
--ram 5120 \
65+
--additional-packs "${{ github.workspace }}" \
66+
-- \
67+
test

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,11 @@ jobs:
189189
uses: github/codeql-action/analyze@erik-krogh/ql
190190
with:
191191
category: "ql-for-ql-${{ matrix.folder }}"
192+
- name: Copy sarif file to CWD
193+
run: cp ../results/ql.sarif ./${{ matrix.folder }}.sarif
194+
- name: Sarif as artifact
195+
uses: actions/upload-artifact@v2
196+
with:
197+
name: ${{ matrix.folder }}.sarif
198+
path: ${{ matrix.folder }}.sarif
192199

cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/Semmle.Autobuild.Cpp.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net5.0</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
77
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
88
<Nullable>enable</Nullable>

cpp/autobuilder/Semmle.Autobuild.Cpp/Semmle.Autobuild.Cpp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<AssemblyName>Semmle.Autobuild.Cpp</AssemblyName>
66
<RootNamespace>Semmle.Autobuild.Cpp</RootNamespace>
77
<ApplicationIcon />

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ class DataFlowCallOption extends TDataFlowCallOption {
12901290
}
12911291
}
12921292

1293-
/** Content tagged with the type of a containing object. */
1293+
/** A `Content` tagged with the type of a containing object. */
12941294
class TypedContent extends MkTypedContent {
12951295
private Content c;
12961296
private DataFlowType t;

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,12 +592,14 @@ predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo) {
592592
* Holds if data flows from `source` to `sink` in zero or more local
593593
* (intra-procedural) steps.
594594
*/
595+
pragma[inline]
595596
predicate localFlow(Node source, Node sink) { localFlowStep*(source, sink) }
596597

597598
/**
598599
* Holds if data can flow from `e1` to `e2` in zero or more
599600
* local (intra-procedural) steps.
600601
*/
602+
pragma[inline]
601603
predicate localExprFlow(Expr e1, Expr e2) { localFlow(exprNode(e1), exprNode(e2)) }
602604

603605
/**

cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,14 @@ predicate localAdditionalTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeT
124124
* Holds if taint may propagate from `source` to `sink` in zero or more local
125125
* (intra-procedural) steps.
126126
*/
127+
pragma[inline]
127128
predicate localTaint(DataFlow::Node source, DataFlow::Node sink) { localTaintStep*(source, sink) }
128129

129130
/**
130131
* Holds if taint can flow from `e1` to `e2` in zero or more
131132
* local (intra-procedural) steps.
132133
*/
134+
pragma[inline]
133135
predicate localExprTaint(Expr e1, Expr e2) {
134136
localTaint(DataFlow::exprNode(e1), DataFlow::exprNode(e2))
135137
}

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ class DataFlowCallOption extends TDataFlowCallOption {
12901290
}
12911291
}
12921292

1293-
/** Content tagged with the type of a containing object. */
1293+
/** A `Content` tagged with the type of a containing object. */
12941294
class TypedContent extends MkTypedContent {
12951295
private Content c;
12961296
private DataFlowType t;

0 commit comments

Comments
 (0)