Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4ee4bba

Browse files
authored
Merge branch 'main' into ZipSlip
2 parents 475cca0 + 5de2e24 commit 4ee4bba

1,336 files changed

Lines changed: 124492 additions & 87340 deletions

File tree

Some content is hidden

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

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ jobs:
3939

4040
- uses: ./.github/actions/fetch-codeql
4141

42+
- name: Install pack dependencies
43+
run: |
44+
for pack in modelbuilding src; do
45+
codeql pack install --mode verify -- "${pack}"
46+
done
47+
4248
- name: Check QL compilation
4349
run: |
4450
codeql query compile \
@@ -57,6 +63,9 @@ jobs:
5763

5864
- uses: ./.github/actions/fetch-codeql
5965

66+
- name: Install pack dependencies
67+
run: codeql pack install -- test
68+
6069
- name: Run QL tests
6170
run: |
6271
codeql test run \

.github/workflows/ruby-qltest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
qltest:
6464
runs-on: ubuntu-latest
6565
strategy:
66+
fail-fast: false
6667
matrix:
6768
slice: ["1/2", "2/2"]
6869
steps:

.pre-commit-config.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v3.2.0
7+
hooks:
8+
- id: trailing-whitespace
9+
- id: end-of-file-fixer
10+
11+
- repo: local
12+
hooks:
13+
- id: codeql-format
14+
name: Fix QL file formatting
15+
files: \.qll?$
16+
language: system
17+
entry: codeql query format --in-place
18+
19+
- id: sync-files
20+
name: Fix files required to be identical
21+
language: system
22+
entry: python3 config/sync-files.py --latest
23+
pass_filenames: false
24+
25+
- id: qhelp
26+
name: Check query help generation
27+
files: \.qhelp$
28+
language: system
29+
entry: python3 misc/scripts/check-qhelp.py

CONTRIBUTING.md

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

4343
- 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).
4444

45-
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.
45+
If you prefer, you can either:
46+
1. install the [pre-commit framework](https://pre-commit.com/) and install the configured hooks on this repo via `pre-commit install`, or
47+
2. use this [pre-commit hook](misc/scripts/pre-commit) that automatically checks whether your files are correctly formatted.
48+
49+
See the [pre-commit hook installation guide](docs/pre-commit-hook-setup.md) for instructions on the two approaches.
4650

4751
4. **Compilation**
4852

@@ -63,6 +67,6 @@ After the experimental query is merged, we welcome pull requests to improve it.
6367

6468
## Using your personal data
6569

66-
If you contribute to this project, we will record your name and email address (as provided by you with your contributions) as part of the code repositories, which are public. We might also use this information to contact you in relation to your contributions, as well as in the normal course of software development. We also store records of CLA agreements signed in the past, but no longer require contributors to sign a CLA. Under GDPR legislation, we do this on the basis of our legitimate interest in creating the CodeQL product.
70+
If you contribute to this project, we will record your name and email address (as provided by you with your contributions) as part of the code repositories, which are public. We might also use this information to contact you in relation to your contributions, as well as in the normal course of software development. We also store records of CLA agreements signed in the past, but no longer require contributors to sign a CLA. Under GDPR legislation, we do this on the basis of our legitimate interest in creating the CodeQL product.
6771

6872
Please do get in touch ([email protected]) if you have any questions about this or our data protection policies.

config/identical-files.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@
426426
"python/ql/src/Lexical/CommentedOutCodeMetricOverview.inc.qhelp"
427427
],
428428
"FLinesOfDuplicatedCodeCommon.inc.qhelp": [
429-
"cpp/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.inc.qhelp",
430429
"java/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.inc.qhelp",
431430
"javascript/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.inc.qhelp",
432431
"python/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.inc.qhelp"
@@ -465,7 +464,8 @@
465464
],
466465
"SensitiveDataHeuristics Python/JS": [
467466
"javascript/ql/lib/semmle/javascript/security/internal/SensitiveDataHeuristics.qll",
468-
"python/ql/lib/semmle/python/security/internal/SensitiveDataHeuristics.qll"
467+
"python/ql/lib/semmle/python/security/internal/SensitiveDataHeuristics.qll",
468+
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll"
469469
],
470470
"ReDoS Util Python/JS/Ruby": [
471471
"javascript/ql/lib/semmle/javascript/security/performance/ReDoSUtil.qll",
@@ -501,5 +501,11 @@
501501
"javascript/ql/lib/tutorial.qll",
502502
"python/ql/lib/tutorial.qll",
503503
"ruby/ql/lib/tutorial.qll"
504+
],
505+
"AccessPathSyntax": [
506+
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/AccessPathSyntax.qll",
507+
"java/ql/lib/semmle/code/java/dataflow/internal/AccessPathSyntax.qll",
508+
"javascript/ql/lib/semmle/javascript/frameworks/data/internal/AccessPathSyntax.qll",
509+
"ruby/ql/lib/codeql/ruby/dataflow/internal/AccessPathSyntax.qll"
504510
]
505511
}

cpp/config/suites/c/correctness

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
+ semmlecode-cpp-queries/Critical/NewArrayDeleteMismatch.ql: /Correctness/Common Errors
3232
+ semmlecode-cpp-queries/Critical/NewDeleteArrayMismatch.ql: /Correctness/Common Errors
3333
+ semmlecode-cpp-queries/Critical/NewFreeMismatch.ql: /Correctness/Common Errors
34+
+ semmlecode-cpp-queries/Likely Bugs/Memory Management/UsingExpiredStackAddress.ql: /Correctness/Common Errors
3435
# Use of Libraries
3536
+ semmlecode-cpp-queries/Likely Bugs/Memory Management/SuspiciousCallToMemset.ql: /Correctness/Use of Libraries
3637
+ semmlecode-cpp-queries/Likely Bugs/Memory Management/SuspiciousSizeof.ql: /Correctness/Use of Libraries

cpp/config/suites/cpp/correctness

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
+ semmlecode-cpp-queries/Critical/NewArrayDeleteMismatch.ql: /Correctness/Common Errors
3535
+ semmlecode-cpp-queries/Critical/NewDeleteArrayMismatch.ql: /Correctness/Common Errors
3636
+ semmlecode-cpp-queries/Critical/NewFreeMismatch.ql: /Correctness/Common Errors
37+
+ semmlecode-cpp-queries/Likely Bugs/Memory Management/UsingExpiredStackAddress.ql: /Correctness/Common Errors
3738
# Exceptions
3839
+ semmlecode-cpp-queries/Best Practices/Exceptions/AccidentalRethrow.ql: /Correctness/Exceptions
3940
+ semmlecode-cpp-queries/Best Practices/Exceptions/CatchingByValue.ql: /Correctness/Exceptions

0 commit comments

Comments
 (0)