Skip to content

Commit c516d69

Browse files
committed
Merge remote-tracking branch 'upstream/main' into main
2 parents ecdadd1 + fbbec5d commit c516d69

File tree

1,625 files changed

+54612
-15877
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,625 files changed

+54612
-15877
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
pull_request_target:
3+
types: [labeled, unlabeled, opened, synchronize, reopened, ready_for_review]
4+
paths:
5+
- "*/ql/src/**/*.ql"
6+
- "*/ql/src/**/*.qll"
7+
- "!**/experimental/**"
8+
9+
jobs:
10+
check-change-note:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Fail if no change note found. To fix, either add one, or add the `no-change-note-required` label.
14+
if: |
15+
github.event.pull_request.draft == false &&
16+
!contains(github.event.pull_request.labels.*.name, 'no-change-note-required')
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
run: |
20+
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate |
21+
jq 'any(.[].filename ; test("/change-notes/.*[.]md$"))' --exit-status

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
branches:
1010
- main
1111
- 'rc/*'
12+
paths:
13+
- 'csharp/**'
1214
schedule:
1315
- cron: '0 9 * * 1'
1416

.github/workflows/docs-review.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# When a PR is labelled with 'ready-for-docs-review',
2+
# this workflow comments on the PR to notify the GitHub CodeQL docs team.
3+
name: Request docs review
4+
on:
5+
# Runs in the context of the base repo.
6+
# This gives the workflow write access to comment on PRs.
7+
# The workflow should not check out or build the given ref,
8+
# or use untrusted data from the event payload in a command line.
9+
pull_request_target:
10+
types: [labeled]
11+
12+
jobs:
13+
request-docs-review:
14+
name: Request docs review
15+
# Run only on labelled PRs to the main repository.
16+
# Do not run on PRs to forks.
17+
if:
18+
github.event.label.name == 'ready-for-docs-review'
19+
&& github.event.pull_request.draft == false
20+
&& github.event.pull_request.base.repo.full_name == 'github/codeql'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Comment to request docs review
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
PR_NUMBER: ${{ github.event.pull_request.number }}
27+
run: |
28+
gh pr comment "$PR_NUMBER" --repo "github/codeql" \
29+
--body "Hello @github/docs-content-codeql - this PR is ready for docs review."

.github/workflows/generate-query-help-docs.yml

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

CODEOWNERS

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
/javascript/ @github/codeql-javascript
55
/python/ @github/codeql-python
66

7-
# Assign query help for docs review
8-
/cpp/**/*.qhelp @hubwriter
9-
/csharp/**/*.qhelp @jf205
10-
/java/**/*.qhelp @felicitymay
11-
/javascript/**/*.qhelp @mchammer01
12-
/python/**/*.qhelp @felicitymay
13-
/docs/language/ @shati-patel @jf205
7+
# Make @xcorail (GitHub Security Lab) a code owner for experimental queries so he gets pinged when we promote a query out of experimental
8+
/cpp/**/experimental/**/* @github/codeql-c-analysis @xcorail
9+
/csharp/**/experimental/**/* @github/codeql-csharp @xcorail
10+
/java/**/experimental/**/* @github/codeql-java @xcorail
11+
/javascript/**/experimental/**/* @github/codeql-javascript @xcorail
12+
/python/**/experimental/**/* @github/codeql-python @xcorail
1413

15-
# Exclude help for experimental queries from docs review
16-
/cpp/**/experimental/**/*.qhelp @github/codeql-c-analysis
17-
/csharp/**/experimental/**/*.qhelp @github/codeql-csharp
18-
/java/**/experimental/**/*.qhelp @github/codeql-java
19-
/javascript/**/experimental/**/*.qhelp @github/codeql-javascript
20-
/python/**/experimental/**/*.qhelp @github/codeql-python
14+
# Notify members of codeql-go about PRs to the shared data-flow library files
15+
/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll @github/codeql-java @github/codeql-go
16+
/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @github/codeql-java @github/codeql-go
17+
/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll @github/codeql-java @github/codeql-go
18+
/java/ql/src/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll @github/codeql-java @github/codeql-go
19+
/java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll @github/codeql-java @github/codeql-go

CONTRIBUTING.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If you have an idea for a query that you would like to share with other CodeQL u
3838

3939
- The queries and libraries must be autoformatted, for example using the "Format Document" command in [CodeQL for Visual Studio Code](https://help.semmle.com/codeql/codeql-for-vscode/procedures/about-codeql-for-vscode.html).
4040

41-
If you prefer, you can use this [pre-commit hook](misc/scripts/pre-commit) that automatically checks whether your files are correctly formatted. See the [pre-commit hook installation guide](docs/install-pre-commit-hook.md) for instructions on how to install the hook.
41+
If you prefer, you can use this [pre-commit hook](misc/scripts/pre-commit) that automatically checks whether your files are correctly formatted. See the [pre-commit hook installation guide](docs/pre-commit-hook-setup.md) for instructions on how to install the hook.
4242

4343
4. **Compilation**
4444

@@ -49,7 +49,11 @@ If you have an idea for a query that you would like to share with other CodeQL u
4949

5050
- The query must have at least one true positive result on some revision of a real project.
5151

52-
Experimental queries and libraries may not be actively maintained as the [supported](docs/supported-queries.md) libraries evolve. They may also be changed in backwards-incompatible ways or may be removed entirely in the future without deprecation warnings.
52+
6. **Query help files and unit tests**
53+
54+
- Query help (`.qhelp`) files and unit tests are optional (but strongly encouraged!) for queries in the `experimental` directories. For more information about contributing query help files and unit tests, see [Supported CodeQL queries and libraries](docs/supported-queries.md).
55+
56+
Experimental queries and libraries may not be actively maintained as the supported libraries evolve. They may also be changed in backwards-incompatible ways or may be removed entirely in the future without deprecation warnings.
5357

5458
After the experimental query is merged, we welcome pull requests to improve it. Before a query can be moved out of the `experimental` subdirectory, it must satisfy [the requirements for being a supported query](docs/supported-queries.md).
5559

config/identical-files.json

Lines changed: 54 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@
356356
],
357357
"Inline Test Expectations": [
358358
"cpp/ql/test/TestUtilities/InlineExpectationsTest.qll",
359+
"java/ql/test/TestUtilities/InlineExpectationsTest.qll",
359360
"python/ql/test/TestUtilities/InlineExpectationsTest.qll"
360361
],
361362
"C++ ExternalAPIs": [
@@ -373,56 +374,65 @@
373374
"javascript/ql/src/semmle/javascript/XML.qll",
374375
"python/ql/src/semmle/python/xml/XML.qll"
375376
],
376-
"DuplicationProblems.qhelp": [
377-
"cpp/ql/src/Metrics/Files/DuplicationProblems.qhelp",
378-
"csharp/ql/src/Metrics/Files/DuplicationProblems.qhelp",
379-
"javascript/ql/src/Metrics/DuplicationProblems.qhelp",
380-
"python/ql/src/Metrics/DuplicationProblems.qhelp"
381-
],
382-
"CommentedOutCodeQuery.qhelp": [
383-
"cpp/ql/src/Documentation/CommentedOutCodeQuery.qhelp",
384-
"python/ql/src/Lexical/CommentedOutCodeQuery.qhelp",
385-
"csharp/ql/src/Bad Practices/Comments/CommentedOutCodeQuery.qhelp",
386-
"java/ql/src/Violations of Best Practice/Comments/CommentedOutCodeQuery.qhelp",
387-
"javascript/ql/src/Comments/CommentedOutCodeQuery.qhelp"
388-
],
389-
"FLinesOfCodeReferences.qhelp": [
390-
"java/ql/src/Metrics/Files/FLinesOfCodeReferences.qhelp",
391-
"javascript/ql/src/Metrics/FLinesOfCodeReferences.qhelp"
392-
],
393-
"FCommentRatioCommon.qhelp": [
394-
"java/ql/src/Metrics/Files/FCommentRatioCommon.qhelp",
395-
"javascript/ql/src/Metrics/FCommentRatioCommon.qhelp"
396-
],
397-
"FLinesOfCodeOverview.qhelp": [
398-
"java/ql/src/Metrics/Files/FLinesOfCodeOverview.qhelp",
399-
"javascript/ql/src/Metrics/FLinesOfCodeOverview.qhelp"
400-
],
401-
"CommentedOutCodeMetricOverview.qhelp": [
402-
"cpp/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.qhelp",
403-
"csharp/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.qhelp",
404-
"java/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.qhelp",
405-
"javascript/ql/src/Comments/CommentedOutCodeMetricOverview.qhelp",
406-
"python/ql/src/Lexical/CommentedOutCodeMetricOverview.qhelp"
407-
],
408-
"FLinesOfDuplicatedCodeCommon.qhelp": [
409-
"cpp/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.qhelp",
410-
"java/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.qhelp",
411-
"javascript/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.qhelp",
412-
"python/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.qhelp"
413-
],
414-
"CommentedOutCodeReferences.qhelp": [
415-
"cpp/ql/src/Metrics/Files/CommentedOutCodeReferences.qhelp",
416-
"csharp/ql/src/Metrics/Files/CommentedOutCodeReferences.qhelp",
417-
"java/ql/src/Metrics/Files/CommentedOutCodeReferences.qhelp",
418-
"javascript/ql/src/Comments/CommentedOutCodeReferences.qhelp",
419-
"python/ql/src/Lexical/CommentedOutCodeReferences.qhelp"
377+
"DuplicationProblems.inc.qhelp": [
378+
"cpp/ql/src/Metrics/Files/DuplicationProblems.inc.qhelp",
379+
"csharp/ql/src/Metrics/Files/DuplicationProblems.inc.qhelp",
380+
"javascript/ql/src/Metrics/DuplicationProblems.inc.qhelp",
381+
"python/ql/src/Metrics/DuplicationProblems.inc.qhelp"
382+
],
383+
"CommentedOutCodeQuery.inc.qhelp": [
384+
"cpp/ql/src/Documentation/CommentedOutCodeQuery.inc.qhelp",
385+
"python/ql/src/Lexical/CommentedOutCodeQuery.inc.qhelp",
386+
"csharp/ql/src/Bad Practices/Comments/CommentedOutCodeQuery.inc.qhelp",
387+
"java/ql/src/Violations of Best Practice/Comments/CommentedOutCodeQuery.inc.qhelp",
388+
"javascript/ql/src/Comments/CommentedOutCodeQuery.inc.qhelp"
389+
],
390+
"FLinesOfCodeReferences.inc.qhelp": [
391+
"java/ql/src/Metrics/Files/FLinesOfCodeReferences.inc.qhelp",
392+
"javascript/ql/src/Metrics/FLinesOfCodeReferences.inc.qhelp"
393+
],
394+
"FCommentRatioCommon.inc.qhelp": [
395+
"java/ql/src/Metrics/Files/FCommentRatioCommon.inc.qhelp",
396+
"javascript/ql/src/Metrics/FCommentRatioCommon.inc.qhelp"
397+
],
398+
"FLinesOfCodeOverview.inc.qhelp": [
399+
"java/ql/src/Metrics/Files/FLinesOfCodeOverview.inc.qhelp",
400+
"javascript/ql/src/Metrics/FLinesOfCodeOverview.inc.qhelp"
401+
],
402+
"CommentedOutCodeMetricOverview.inc.qhelp": [
403+
"cpp/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.inc.qhelp",
404+
"csharp/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.inc.qhelp",
405+
"java/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.inc.qhelp",
406+
"javascript/ql/src/Comments/CommentedOutCodeMetricOverview.inc.qhelp",
407+
"python/ql/src/Lexical/CommentedOutCodeMetricOverview.inc.qhelp"
408+
],
409+
"FLinesOfDuplicatedCodeCommon.inc.qhelp": [
410+
"cpp/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.inc.qhelp",
411+
"java/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.inc.qhelp",
412+
"javascript/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.inc.qhelp",
413+
"python/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.inc.qhelp"
414+
],
415+
"CommentedOutCodeReferences.inc.qhelp": [
416+
"cpp/ql/src/Metrics/Files/CommentedOutCodeReferences.inc.qhelp",
417+
"csharp/ql/src/Metrics/Files/CommentedOutCodeReferences.inc.qhelp",
418+
"java/ql/src/Metrics/Files/CommentedOutCodeReferences.inc.qhelp",
419+
"javascript/ql/src/Comments/CommentedOutCodeReferences.inc.qhelp",
420+
"python/ql/src/Lexical/CommentedOutCodeReferences.inc.qhelp"
420421
],
421422
"IDE Contextual Queries": [
422423
"cpp/ql/src/IDEContextual.qll",
423424
"csharp/ql/src/IDEContextual.qll",
424425
"java/ql/src/IDEContextual.qll",
425426
"javascript/ql/src/IDEContextual.qll",
426427
"python/ql/src/analysis/IDEContextual.qll"
428+
],
429+
"SSA C#": [
430+
"csharp/ql/src/semmle/code/csharp/dataflow/internal/SsaImplCommon.qll",
431+
"csharp/ql/src/semmle/code/csharp/controlflow/internal/pressa/SsaImplCommon.qll",
432+
"csharp/ql/src/semmle/code/csharp/dataflow/internal/basessa/SsaImplCommon.qll"
433+
],
434+
"CryptoAlgorithms Python/JS": [
435+
"javascript/ql/src/semmle/javascript/security/CryptoAlgorithms.qll",
436+
"python/ql/src/semmle/crypto/Crypto.qll"
427437
]
428438
}

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>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net5.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>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
<AssemblyName>Semmle.Autobuild.Cpp</AssemblyName>
66
<RootNamespace>Semmle.Autobuild.Cpp</RootNamespace>
77
<ApplicationIcon />

0 commit comments

Comments
 (0)