Skip to content

Commit 3b10a2d

Browse files
authored
Merge branch 'main' into rails/render_locals_shared
2 parents 8ae9931 + 55550e7 commit 3b10a2d

File tree

199 files changed

+174961
-4726
lines changed

Some content is hidden

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

199 files changed

+174961
-4726
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ There is [extensive documentation](https://codeql.github.com/docs/) on getting s
1010

1111
We welcome contributions to our standard library and standard checks. Do you have an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Before you do, though, please take the time to read our [contributing guidelines](CONTRIBUTING.md). You can also consult our [style guides](https://github.com/github/codeql/tree/main/docs) to learn how to format your code for consistency and clarity, how to write query metadata, and how to write query help documentation for your query.
1212

13+
For information on contributing to CodeQL documentation, see the "[contributing guide](docs/codeql/CONTRIBUTING.md)" for docs.
14+
1315
## License
1416

1517
The code in this repository is licensed under the [MIT License](LICENSE) by [GitHub](https://github.com).

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

37
### Breaking Changes
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.5.1
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.5.0
2+
lastReleaseVersion: 0.5.1

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

cpp/ql/src/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.5.1
2+
3+
### Minor Analysis Improvements
4+
5+
* The `cpp/no-space-for-terminator` and `cpp/uncontrolled-allocation-size` queries have been enhanced with heuristic detection of allocations. These queries now find more results.
6+
17
## 0.5.0
28

39
### Minor Analysis Improvements
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
---
2-
category: minorAnalysis
3-
---
1+
## 0.5.1
2+
3+
### Minor Analysis Improvements
4+
45
* The `cpp/no-space-for-terminator` and `cpp/uncontrolled-allocation-size` queries have been enhanced with heuristic detection of allocations. These queries now find more results.

cpp/ql/src/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.5.0
2+
lastReleaseVersion: 0.5.1

cpp/ql/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/cpp-queries
2-
version: 0.5.1-dev
2+
version: 0.5.2-dev
33
groups:
44
- cpp
55
- queries

csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.4.1
2+
3+
No user-facing changes.
4+
15
## 1.4.0
26

37
No user-facing changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.4.1
2+
3+
No user-facing changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 1.4.0
2+
lastReleaseVersion: 1.4.1

csharp/ql/campaigns/Solorigate/lib/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/csharp-solorigate-all
2-
version: 1.4.1-dev
2+
version: 1.4.2-dev
33
groups:
44
- csharp
55
- solorigate

csharp/ql/campaigns/Solorigate/src/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.4.1
2+
3+
No user-facing changes.
4+
15
## 1.4.0
26

37
No user-facing changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.4.1
2+
3+
No user-facing changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 1.4.0
2+
lastReleaseVersion: 1.4.1

csharp/ql/campaigns/Solorigate/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/csharp-solorigate-queries
2-
version: 1.4.1-dev
2+
version: 1.4.2-dev
33
groups:
44
- csharp
55
- solorigate

csharp/ql/lib/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 0.5.1
2+
3+
### Major Analysis Improvements
4+
5+
* Added library support for generic attributes (also for CIL extracted attributes).
6+
* `cil.ConstructedType::getName` was changed to include printing of the type arguments.
7+
8+
### Minor Analysis Improvements
9+
10+
* Attributes on methods in CIL are now extracted (Bugfix).
11+
* Support for `static virtual` and `static abstract` interface members.
12+
* Support for *operators* in interface definitions.
13+
* C# 11: Added support for the unsigned right shift `>>>` and unsigned right shift assignment `>>>=` operators.
14+
* Query id's have been aligned such that they are prefixed with `cs` instead of `csharp`.
15+
116
## 0.5.0
217

318
### Minor Analysis Improvements

csharp/ql/lib/change-notes/2023-01-03-genericattributes.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

csharp/ql/lib/change-notes/2023-01-03-queryids.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

csharp/ql/lib/change-notes/2023-01-11-unsigned-right-shift.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

csharp/ql/lib/change-notes/2023-01-16-virtualizable-operators.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

csharp/ql/lib/change-notes/2023-01-18-cilmethodattributes.md

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## 0.5.1
2+
3+
### Major Analysis Improvements
4+
5+
* Added library support for generic attributes (also for CIL extracted attributes).
6+
* `cil.ConstructedType::getName` was changed to include printing of the type arguments.
7+
8+
### Minor Analysis Improvements
9+
10+
* Attributes on methods in CIL are now extracted (Bugfix).
11+
* Support for `static virtual` and `static abstract` interface members.
12+
* Support for *operators* in interface definitions.
13+
* C# 11: Added support for the unsigned right shift `>>>` and unsigned right shift assignment `>>>=` operators.
14+
* Query id's have been aligned such that they are prefixed with `cs` instead of `csharp`.

csharp/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.5.0
2+
lastReleaseVersion: 0.5.1

csharp/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/csharp-all
2-
version: 0.5.1-dev
2+
version: 0.5.2-dev
33
groups: csharp
44
dbscheme: semmlecode.csharp.dbscheme
55
extractor: csharp

csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ module Public {
3939
)
4040
or
4141
exists(ReturnKind rk | this = TReturnSummaryComponent(rk) and result = "return (" + rk + ")")
42+
or
43+
exists(SummaryComponent::SyntheticGlobal sg |
44+
this = TSyntheticGlobalSummaryComponent(sg) and
45+
result = "synthetic global (" + sg + ")"
46+
)
4247
}
4348
}
4449

@@ -159,41 +164,41 @@ module Public {
159164
SummaryComponentStack return(ReturnKind rk) { result = singleton(SummaryComponent::return(rk)) }
160165
}
161166

162-
private predicate noComponentSpecificCsv(SummaryComponent sc) {
163-
not exists(getComponentSpecificCsv(sc))
167+
private predicate noComponentSpecific(SummaryComponent sc) {
168+
not exists(getComponentSpecific(sc))
164169
}
165170

166171
/** Gets a textual representation of this component used for flow summaries. */
167-
private string getComponentCsv(SummaryComponent sc) {
168-
result = getComponentSpecificCsv(sc)
172+
private string getComponent(SummaryComponent sc) {
173+
result = getComponentSpecific(sc)
169174
or
170-
noComponentSpecificCsv(sc) and
175+
noComponentSpecific(sc) and
171176
(
172177
exists(ArgumentPosition pos |
173178
sc = TParameterSummaryComponent(pos) and
174-
result = "Parameter[" + getArgumentPositionCsv(pos) + "]"
179+
result = "Parameter[" + getArgumentPosition(pos) + "]"
175180
)
176181
or
177182
exists(ParameterPosition pos |
178183
sc = TArgumentSummaryComponent(pos) and
179-
result = "Argument[" + getParameterPositionCsv(pos) + "]"
184+
result = "Argument[" + getParameterPosition(pos) + "]"
180185
)
181186
or
182187
sc = TReturnSummaryComponent(getReturnValueKind()) and result = "ReturnValue"
183188
)
184189
}
185190

186191
/** Gets a textual representation of this stack used for flow summaries. */
187-
string getComponentStackCsv(SummaryComponentStack stack) {
192+
string getComponentStack(SummaryComponentStack stack) {
188193
exists(SummaryComponent head, SummaryComponentStack tail |
189194
head = stack.head() and
190195
tail = stack.tail() and
191-
result = getComponentStackCsv(tail) + "." + getComponentCsv(head)
196+
result = getComponentStack(tail) + "." + getComponent(head)
192197
)
193198
or
194199
exists(SummaryComponent c |
195200
stack = TSingletonSummaryComponentStack(c) and
196-
result = getComponentCsv(c)
201+
result = getComponent(c)
197202
)
198203
}
199204

@@ -1217,8 +1222,8 @@ module Private {
12171222
c.relevantSummary(input, output, preservesValue) and
12181223
csv =
12191224
c.getCallableCsv() // Callable information
1220-
+ getComponentStackCsv(input) + ";" // input
1221-
+ getComponentStackCsv(output) + ";" // output
1225+
+ getComponentStack(input) + ";" // input
1226+
+ getComponentStack(output) + ";" // output
12221227
+ renderKind(preservesValue) + ";" // kind
12231228
+ renderProvenance(c) // provenance
12241229
)

csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ SummaryComponent interpretComponentSpecific(AccessPathToken c) {
178178
}
179179

180180
/** Gets the textual representation of the content in the format used for flow summaries. */
181-
private string getContentSpecificCsv(Content c) {
181+
private string getContentSpecific(Content c) {
182182
c = TElementContent() and result = "Element"
183183
or
184184
exists(Field f | c = TFieldContent(f) and result = "Field[" + f.getQualifiedName() + "]")
@@ -189,8 +189,8 @@ private string getContentSpecificCsv(Content c) {
189189
}
190190

191191
/** Gets the textual representation of a summary component in the format used for flow summaries. */
192-
string getComponentSpecificCsv(SummaryComponent sc) {
193-
exists(Content c | sc = TContentSummaryComponent(c) and result = getContentSpecificCsv(c))
192+
string getComponentSpecific(SummaryComponent sc) {
193+
exists(Content c | sc = TContentSummaryComponent(c) and result = getContentSpecific(c))
194194
or
195195
sc = TWithoutContentSummaryComponent(_) and result = "WithoutElement"
196196
or
@@ -204,15 +204,15 @@ string getComponentSpecificCsv(SummaryComponent sc) {
204204
}
205205

206206
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
207-
string getParameterPositionCsv(ParameterPosition pos) {
207+
string getParameterPosition(ParameterPosition pos) {
208208
result = pos.getPosition().toString()
209209
or
210210
pos.isThisParameter() and
211211
result = "this"
212212
}
213213

214214
/** Gets the textual representation of an argument position in the format used for flow summaries. */
215-
string getArgumentPositionCsv(ArgumentPosition pos) {
215+
string getArgumentPosition(ArgumentPosition pos) {
216216
result = pos.getPosition().toString()
217217
or
218218
pos.isQualifier() and

csharp/ql/src/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.1
2+
3+
No user-facing changes.
4+
15
## 0.5.0
26

37
### New Queries
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.5.1
2+
3+
No user-facing changes.

csharp/ql/src/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.5.0
2+
lastReleaseVersion: 0.5.1

csharp/ql/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/csharp-queries
2-
version: 0.5.1-dev
2+
version: 0.5.2-dev
33
groups:
44
- csharp
55
- queries

docs/codeql/CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Contributing to CodeQL docs
2+
3+
We welcome contributions to our CodeQL docs. Want to improve existing docs or add new information you think would be helpful? Then please go ahead and open a pull request!
4+
5+
## Contributing to CodeQL docs on `codeql.github.com`
6+
7+
To make changes to the documentation on [codeql.github.com](https://codeql.github.com/docs/codeql-overview/), you can make changes to the documentation files using the GitHub UI, a codespace, or a local text editor, and then open a pull request for review. For more information about the format and structure of the CodeQL documentation on [codeql.github.com](https://codeql.github.com/docs/codeql-overview/), please see the [README](docs/codeql/README.rst).
8+
9+
## Contributing to CodeQL CLI docs on `docs.github.com`
10+
11+
We are in the process of moving all documentation about the CodeQL CLI from [github/codeql](docs/codeql) to the public [github/docs](https://github.com/github/docs) repository so that this documentation is published on the [GitHub Docs](https://docs.github.com/en/code-security/code-scanning) site. This includes all articles that are currently published under "[Using the CodeQL CLI](https://codeql.github.com/docs/codeql-cli/using-the-codeql-cli/)" and "[CodeQL CLI reference](https://codeql.github.com/docs/codeql-cli/codeql-cli-reference/)" categories on the CodeQL microsite. This will make it easier for code scanning users to find information about using CodeQL to query their codebases.
12+
13+
**Note**: For a brief time, we will have source files for CodeQL CLI documentation in two locations. During this period we will not accept changes to the old files in the `codeql` repository, only to the new files in the `docs` repository.
14+
15+
To contribute to these docs, which are located in the [`code-scanning`](https://github.com/github/docs/tree/main/content/code-security/code-scanning) directory, please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file in the `docs` repository.
16+
17+
18+

docs/codeql/README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ see https://docutils.sourceforge.io/rst.html.
1212

1313
For more information on Sphinx, see https://www.sphinx-doc.org.
1414

15+
For information on contributing to CodeQL documentation, see the `contributing guide </CONTRIBUTING.md>`__.
16+
1517
Project structure
1618
*****************
1719

go/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.1
2+
3+
No user-facing changes.
4+
15
## 0.4.0
26

37
### Breaking Changes
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.4.1
2+
3+
No user-facing changes.

go/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.0
2+
lastReleaseVersion: 0.4.1

go/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/go-all
2-
version: 0.4.1-dev
2+
version: 0.4.2-dev
33
groups: go
44
dbscheme: go.dbscheme
55
extractor: go

0 commit comments

Comments
 (0)