Skip to content

Commit 7797211

Browse files
committed
Merge branch 'main' into unsafeRbCmd
2 parents 0220f0a + fd5f678 commit 7797211

File tree

1,487 files changed

+21680
-58004
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,487 files changed

+21680
-58004
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Swift: Build and test Xcode autobuilder"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "swift/xcode-autobuilder/**"
7+
- "misc/bazel/**"
8+
- "*.bazel*"
9+
- .github/workflows/swift-autobuilder.yml
10+
branches:
11+
- main
12+
13+
jobs:
14+
autobuilder:
15+
runs-on: macos-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: bazelbuild/setup-bazelisk@v2
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version-file: 'swift/.python-version'
22+
- name: Build the Xcode autobuilder
23+
run: |
24+
bazel build //swift/xcode-autobuilder
25+
- name: Test the Xcode autobuilder
26+
run: |
27+
bazel test //swift/xcode-autobuilder/tests

.github/workflows/swift-codegen.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- .github/actions/fetch-codeql/action.yml
1111
branches:
1212
- main
13+
defaults:
14+
run:
15+
working-directory: swift
1316

1417
jobs:
1518
codegen:
@@ -18,7 +21,9 @@ jobs:
1821
- uses: actions/checkout@v3
1922
- uses: ./.github/actions/fetch-codeql
2023
- uses: bazelbuild/setup-bazelisk@v2
21-
- uses: actions/setup-python@v3
24+
- uses: actions/setup-python@v4
25+
with:
26+
python-version-file: 'swift/.python-version'
2227
- uses: pre-commit/[email protected]
2328
name: Check that python code is properly formatted
2429
with:

.github/workflows/swift-integration-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ jobs:
2828
- uses: actions/checkout@v3
2929
- uses: ./.github/actions/fetch-codeql
3030
- uses: bazelbuild/setup-bazelisk@v2
31-
- uses: actions/setup-python@v3
31+
- uses: actions/setup-python@v4
32+
with:
33+
python-version-file: 'swift/.python-version'
3234
- name: Build Swift extractor
3335
run: |
3436
bazel run //swift:create-extractor-pack

.github/workflows/swift-qltest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
- uses: actions/checkout@v3
3434
- uses: ./.github/actions/fetch-codeql
3535
- uses: bazelbuild/setup-bazelisk@v2
36+
- uses: actions/setup-python@v4
37+
with:
38+
python-version-file: 'swift/.python-version'
3639
- name: Build Swift extractor
3740
run: |
3841
bazel run //swift:create-extractor-pack

CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
/java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll @github/codeql-java @github/codeql-go
2121

2222
# CodeQL tools and associated docs
23-
/docs/codeql-cli/ @github/codeql-cli-reviewers
24-
/docs/codeql-for-visual-studio-code/ @github/codeql-vscode-reviewers
25-
/docs/ql-language-reference/ @github/codeql-frontend-reviewers
23+
/docs/codeql/codeql-cli/ @github/codeql-cli-reviewers
24+
/docs/codeql/codeql-for-visual-studio-code/ @github/codeql-vscode-reviewers
25+
/docs/codeql/ql-language-reference/ @github/codeql-frontend-reviewers
2626
/docs/query-*-style-guide.md @github/codeql-analysis-reviewers
2727

2828
# QL for QL reviewers

config/identical-files.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
"python/ql/lib/semmle/python/dataflow/new/internal/tainttracking3/TaintTrackingImpl.qll",
7171
"python/ql/lib/semmle/python/dataflow/new/internal/tainttracking4/TaintTrackingImpl.qll",
7272
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
73-
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttrackingforregexp/TaintTrackingImpl.qll",
7473
"swift/ql/lib/codeql/swift/dataflow/internal/tainttracking1/TaintTrackingImpl.qll"
7574
],
7675
"DataFlow Java/C++/C#/Python Consistency checks": [

cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -838,13 +838,13 @@ private module Stage1 implements StageSig {
838838
* by `revFlow`.
839839
*/
840840
pragma[nomagic]
841-
predicate revFlowIsReadAndStored(Content c, Configuration conf) {
841+
additional predicate revFlowIsReadAndStored(Content c, Configuration conf) {
842842
revFlowConsCand(c, conf) and
843843
revFlowStore(c, _, _, conf)
844844
}
845845

846846
pragma[nomagic]
847-
predicate viableReturnPosOutNodeCandFwd1(
847+
additional predicate viableReturnPosOutNodeCandFwd1(
848848
DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config
849849
) {
850850
fwdFlowReturnPosition(pos, _, config) and
@@ -860,7 +860,7 @@ private module Stage1 implements StageSig {
860860
}
861861

862862
pragma[nomagic]
863-
predicate viableParamArgNodeCandFwd1(
863+
additional predicate viableParamArgNodeCandFwd1(
864864
DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config
865865
) {
866866
viableParamArgEx(call, p, arg) and
@@ -907,7 +907,7 @@ private module Stage1 implements StageSig {
907907
)
908908
}
909909

910-
predicate revFlowState(FlowState state, Configuration config) {
910+
additional predicate revFlowState(FlowState state, Configuration config) {
911911
exists(NodeEx node |
912912
sinkNode(node, state, config) and
913913
revFlow(node, _, pragma[only_bind_into](config)) and
@@ -999,7 +999,7 @@ private module Stage1 implements StageSig {
999999
)
10001000
}
10011001

1002-
predicate stats(
1002+
additional predicate stats(
10031003
boolean fwd, int nodes, int fields, int conscand, int states, int tuples, Configuration config
10041004
) {
10051005
fwd = true and
@@ -1260,7 +1260,7 @@ private module MkStage<StageSig PrevStage> {
12601260
* argument.
12611261
*/
12621262
pragma[nomagic]
1263-
predicate fwdFlow(
1263+
additional predicate fwdFlow(
12641264
NodeEx node, FlowState state, Cc cc, ApOption argAp, Ap ap, Configuration config
12651265
) {
12661266
fwdFlow0(node, state, cc, argAp, ap, config) and
@@ -1484,7 +1484,7 @@ private module MkStage<StageSig PrevStage> {
14841484
* the access path of the returned value.
14851485
*/
14861486
pragma[nomagic]
1487-
predicate revFlow(
1487+
additional predicate revFlow(
14881488
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
14891489
) {
14901490
revFlow0(node, state, toReturn, returnAp, ap, config) and
@@ -1662,7 +1662,7 @@ private module MkStage<StageSig PrevStage> {
16621662
)
16631663
}
16641664

1665-
predicate revFlow(NodeEx node, FlowState state, Configuration config) {
1665+
additional predicate revFlow(NodeEx node, FlowState state, Configuration config) {
16661666
revFlow(node, state, _, _, _, config)
16671667
}
16681668

@@ -1675,11 +1675,13 @@ private module MkStage<StageSig PrevStage> {
16751675

16761676
// use an alias as a workaround for bad functionality-induced joins
16771677
pragma[nomagic]
1678-
predicate revFlowAlias(NodeEx node, Configuration config) { revFlow(node, _, _, _, _, config) }
1678+
additional predicate revFlowAlias(NodeEx node, Configuration config) {
1679+
revFlow(node, _, _, _, _, config)
1680+
}
16791681

16801682
// use an alias as a workaround for bad functionality-induced joins
16811683
pragma[nomagic]
1682-
predicate revFlowAlias(NodeEx node, FlowState state, Ap ap, Configuration config) {
1684+
additional predicate revFlowAlias(NodeEx node, FlowState state, Ap ap, Configuration config) {
16831685
revFlow(node, state, ap, config)
16841686
}
16851687

@@ -1700,7 +1702,7 @@ private module MkStage<StageSig PrevStage> {
17001702
)
17011703
}
17021704

1703-
predicate consCand(TypedContent tc, Ap ap, Configuration config) {
1705+
additional predicate consCand(TypedContent tc, Ap ap, Configuration config) {
17041706
revConsCand(tc, ap, config) and
17051707
validAp(ap, config)
17061708
}
@@ -1742,7 +1744,7 @@ private module MkStage<StageSig PrevStage> {
17421744
)
17431745
}
17441746

1745-
predicate stats(
1747+
additional predicate stats(
17461748
boolean fwd, int nodes, int fields, int conscand, int states, int tuples, Configuration config
17471749
) {
17481750
fwd = true and

cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -838,13 +838,13 @@ private module Stage1 implements StageSig {
838838
* by `revFlow`.
839839
*/
840840
pragma[nomagic]
841-
predicate revFlowIsReadAndStored(Content c, Configuration conf) {
841+
additional predicate revFlowIsReadAndStored(Content c, Configuration conf) {
842842
revFlowConsCand(c, conf) and
843843
revFlowStore(c, _, _, conf)
844844
}
845845

846846
pragma[nomagic]
847-
predicate viableReturnPosOutNodeCandFwd1(
847+
additional predicate viableReturnPosOutNodeCandFwd1(
848848
DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config
849849
) {
850850
fwdFlowReturnPosition(pos, _, config) and
@@ -860,7 +860,7 @@ private module Stage1 implements StageSig {
860860
}
861861

862862
pragma[nomagic]
863-
predicate viableParamArgNodeCandFwd1(
863+
additional predicate viableParamArgNodeCandFwd1(
864864
DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config
865865
) {
866866
viableParamArgEx(call, p, arg) and
@@ -907,7 +907,7 @@ private module Stage1 implements StageSig {
907907
)
908908
}
909909

910-
predicate revFlowState(FlowState state, Configuration config) {
910+
additional predicate revFlowState(FlowState state, Configuration config) {
911911
exists(NodeEx node |
912912
sinkNode(node, state, config) and
913913
revFlow(node, _, pragma[only_bind_into](config)) and
@@ -999,7 +999,7 @@ private module Stage1 implements StageSig {
999999
)
10001000
}
10011001

1002-
predicate stats(
1002+
additional predicate stats(
10031003
boolean fwd, int nodes, int fields, int conscand, int states, int tuples, Configuration config
10041004
) {
10051005
fwd = true and
@@ -1260,7 +1260,7 @@ private module MkStage<StageSig PrevStage> {
12601260
* argument.
12611261
*/
12621262
pragma[nomagic]
1263-
predicate fwdFlow(
1263+
additional predicate fwdFlow(
12641264
NodeEx node, FlowState state, Cc cc, ApOption argAp, Ap ap, Configuration config
12651265
) {
12661266
fwdFlow0(node, state, cc, argAp, ap, config) and
@@ -1484,7 +1484,7 @@ private module MkStage<StageSig PrevStage> {
14841484
* the access path of the returned value.
14851485
*/
14861486
pragma[nomagic]
1487-
predicate revFlow(
1487+
additional predicate revFlow(
14881488
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
14891489
) {
14901490
revFlow0(node, state, toReturn, returnAp, ap, config) and
@@ -1662,7 +1662,7 @@ private module MkStage<StageSig PrevStage> {
16621662
)
16631663
}
16641664

1665-
predicate revFlow(NodeEx node, FlowState state, Configuration config) {
1665+
additional predicate revFlow(NodeEx node, FlowState state, Configuration config) {
16661666
revFlow(node, state, _, _, _, config)
16671667
}
16681668

@@ -1675,11 +1675,13 @@ private module MkStage<StageSig PrevStage> {
16751675

16761676
// use an alias as a workaround for bad functionality-induced joins
16771677
pragma[nomagic]
1678-
predicate revFlowAlias(NodeEx node, Configuration config) { revFlow(node, _, _, _, _, config) }
1678+
additional predicate revFlowAlias(NodeEx node, Configuration config) {
1679+
revFlow(node, _, _, _, _, config)
1680+
}
16791681

16801682
// use an alias as a workaround for bad functionality-induced joins
16811683
pragma[nomagic]
1682-
predicate revFlowAlias(NodeEx node, FlowState state, Ap ap, Configuration config) {
1684+
additional predicate revFlowAlias(NodeEx node, FlowState state, Ap ap, Configuration config) {
16831685
revFlow(node, state, ap, config)
16841686
}
16851687

@@ -1700,7 +1702,7 @@ private module MkStage<StageSig PrevStage> {
17001702
)
17011703
}
17021704

1703-
predicate consCand(TypedContent tc, Ap ap, Configuration config) {
1705+
additional predicate consCand(TypedContent tc, Ap ap, Configuration config) {
17041706
revConsCand(tc, ap, config) and
17051707
validAp(ap, config)
17061708
}
@@ -1742,7 +1744,7 @@ private module MkStage<StageSig PrevStage> {
17421744
)
17431745
}
17441746

1745-
predicate stats(
1747+
additional predicate stats(
17461748
boolean fwd, int nodes, int fields, int conscand, int states, int tuples, Configuration config
17471749
) {
17481750
fwd = true and

0 commit comments

Comments
 (0)