Compare commits

...

7 Commits

Author SHA1 Message Date
Nick Rolfe
8cd261af0e Merge pull request #9324 from hvitved/dataflow/prohibits-use-use-fix-join
Data flow: Fix bad join in `prohibitsUseUseFlow`
2022-05-25 14:39:06 +01:00
Tom Hvitved
42f05dadc4 Data flow: Sync files 2022-05-25 14:21:22 +02:00
Tom Hvitved
3d072abcff Data flow: Fix bad join in prohibitsUseUseFlow
Before
```
Tuple counts for FlowSummaryImpl::Private::Steps::prohibitsUseUseFlow#1de78b88#ff@fdf8bdrq:
              6099   ~0%    {2} r1 = SCAN FlowSummaryImpl::Private::isParameterPostUpdate#1de78b88#fff OUTPUT In.2, In.0
         787252695   ~2%    {3} r2 = JOIN r1 WITH project#DataFlowImplCommon::ParamNode::isParameterOf#dispred#f0820431#fff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, true, Lhs.1
        5360462712   ~0%    {4} r3 = JOIN r2 WITH FlowSummaryImpl::Private::Steps::summaryLocalStep#1de78b88#ffb_021#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2, true, Lhs.0
              7132   ~2%    {2} r4 = JOIN r3 WITH FlowSummaryImpl::Private::Steps::summaryLocalStep#1de78b88#ffb ON FIRST 3 OUTPUT Lhs.0, Lhs.3

              5869  ~25%    {1} r5 = JOIN r4 WITH DataFlowImplCommon::Cached::clearsContentCached#4f8df883#ff ON FIRST 1 OUTPUT Lhs.1

              1263   ~9%    {1} r6 = JOIN r4 WITH DataFlowImplCommon::Cached::expectsContentCached#4f8df883#ff ON FIRST 1 OUTPUT Lhs.1

              7132  ~52%    {1} r7 = r5 UNION r6
             29593  ~26%    {2} r8 = JOIN r7 WITH project#FlowSummaryImpl::Private::Steps::summaryArgParam0#1de78b88#ffff#2_201#join_rhs ON FIRST 1 OUTPUT Rhs.1, Rhs.2
                            return r8
```

After
```
Tuple counts for FlowSummaryImpl::Private::Steps::prohibitsUseUseFlow#1de78b88#ff@aa7a37lj:
         6099   ~4%    {3} r1 = SCAN FlowSummaryImpl::Private::isParameterPostUpdate#1de78b88#fff OUTPUT In.0, true, In.2
         8434   ~5%    {2} r2 = JOIN r1 WITH FlowSummaryImpl::Private::Steps::summaryLocalStep#1de78b88#ffb_120#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2

         5869   ~5%    {3} r3 = JOIN r2 WITH DataFlowImplCommon::Cached::clearsContentCached#4f8df883#ff ON FIRST 1 OUTPUT Lhs.0, true, Lhs.1

         1278   ~6%    {3} r4 = JOIN r2 WITH DataFlowImplCommon::Cached::expectsContentCached#4f8df883#ff ON FIRST 1 OUTPUT Lhs.0, true, Lhs.1

         7147   ~6%    {3} r5 = r3 UNION r4
         7147  ~57%    {2} r6 = JOIN r5 WITH FlowSummaryImpl::Private::Steps::summaryLocalStep#1de78b88#ffb_120#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2
         5892  ~26%    {1} r7 = JOIN r6 WITH project#DataFlowImplCommon::ParamNode::isParameterOf#dispred#f0820431#fff ON FIRST 2 OUTPUT Lhs.0
        29589  ~26%    {2} r8 = JOIN r7 WITH project#FlowSummaryImpl::Private::Steps::summaryArgParam0#1de78b88#ffff#2_201#join_rhs ON FIRST 1 OUTPUT Rhs.1, Rhs.2
                       return r8
```
2022-05-25 14:21:22 +02:00
Anders Schack-Mulligen
deddc52666 Merge pull request #9317 from github/release-prep/2.9.3
Release preparation for version 2.9.3
2022-05-25 12:43:36 +02:00
Erik Krogh Kristensen
009ba4c280 update query id to the updated id 2022-05-25 10:55:33 +02:00
Anders Schack-Mulligen
673355df65 Fix markdown lists 2022-05-25 10:02:48 +02:00
github-actions[bot]
1f1b364feb Release preparation for version 2.9.3 2022-05-25 07:46:48 +00:00
80 changed files with 205 additions and 105 deletions

View File

@@ -1,3 +1,13 @@
## 0.2.2
### Deprecated APIs
* The `AnalysedString` class in the `StringAnalysis` module has been replaced with `AnalyzedString`, to follow our style guide. The old name still exists as a deprecated alias.
### New Features
* A `getInitialization` predicate was added to the `ConstexprIfStmt`, `IfStmt`, and `SwitchStmt` classes that yields the C++17-style initializer of the `if` or `switch` statement when it exists.
## 0.2.1
## 0.2.0

View File

@@ -1,4 +0,0 @@
---
category: feature
---
* A `getInitialization` predicate was added to the `ConstexprIfStmt`, `IfStmt`, and `SwitchStmt` classes that yields the C++17-style initializer of the `if` or `switch` statement when it exists.

View File

@@ -1,4 +0,0 @@
---
category: deprecated
---
* The `AnalysedString` class in the `StringAnalysis` module has been replaced with `AnalyzedString`, to follow our style guide. The old name still exists as a deprecated alias.

View File

@@ -0,0 +1,9 @@
## 0.2.2
### Deprecated APIs
* The `AnalysedString` class in the `StringAnalysis` module has been replaced with `AnalyzedString`, to follow our style guide. The old name still exists as a deprecated alias.
### New Features
* A `getInitialization` predicate was added to the `ConstexprIfStmt`, `IfStmt`, and `SwitchStmt` classes that yields the C++17-style initializer of the `if` or `switch` statement when it exists.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.2.1
lastReleaseVersion: 0.2.2

View File

@@ -1,5 +1,5 @@
name: codeql/cpp-all
version: 0.2.2-dev
version: 0.2.2
groups: cpp
dbscheme: semmlecode.cpp.dbscheme
extractor: cpp

View File

@@ -1,3 +1,10 @@
## 0.1.3
### Minor Analysis Improvements
* The "XML external entity expansion" (`cpp/external-entity-expansion`) query precision has been increased to `high`.
* The `cpp/unused-local-variable` no longer ignores functions that include `if` and `switch` statements with C++17-style initializers.
## 0.1.2
### Minor Analysis Improvements

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* The `cpp/unused-local-variable` no longer ignores functions that include `if` and `switch` statements with C++17-style initializers.

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* The "XML external entity expansion" (`cpp/external-entity-expansion`) query precision has been increased to `high`.

View File

@@ -0,0 +1,6 @@
## 0.1.3
### Minor Analysis Improvements
* The "XML external entity expansion" (`cpp/external-entity-expansion`) query precision has been increased to `high`.
* The `cpp/unused-local-variable` no longer ignores functions that include `if` and `switch` statements with C++17-style initializers.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.1.2
lastReleaseVersion: 0.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/cpp-queries
version: 0.1.3-dev
version: 0.1.3
groups:
- cpp
- queries

View File

@@ -1,3 +1,5 @@
## 1.1.3
## 1.1.2
## 1.1.1

View File

@@ -0,0 +1 @@
## 1.1.3

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 1.1.2
lastReleaseVersion: 1.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/csharp-solorigate-all
version: 1.1.3-dev
version: 1.1.3
groups:
- csharp
- solorigate

View File

@@ -1,3 +1,5 @@
## 1.1.3
## 1.1.2
## 1.1.1

View File

@@ -0,0 +1 @@
## 1.1.3

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 1.1.2
lastReleaseVersion: 1.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/csharp-solorigate-queries
version: 1.1.3-dev
version: 1.1.3
groups:
- csharp
- solorigate

View File

@@ -1,3 +1,5 @@
## 0.2.2
## 0.2.1
## 0.2.0

View File

@@ -0,0 +1 @@
## 0.2.2

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.2.1
lastReleaseVersion: 0.2.2

View File

@@ -1,5 +1,5 @@
name: codeql/csharp-all
version: 0.2.2-dev
version: 0.2.2
groups: csharp
dbscheme: semmlecode.csharp.dbscheme
extractor: csharp

View File

@@ -777,10 +777,10 @@ module Private {
predicate prohibitsUseUseFlow(ArgNode arg, SummarizedCallable sc) {
exists(ParamNode p, Node mid, ParameterPosition ppos, Node ret |
p = summaryArgParam0(_, arg, sc) and
p.isParameterOf(_, ppos) and
p.isParameterOf(_, pragma[only_bind_into](ppos)) and
summaryLocalStep(p, mid, true) and
summaryLocalStep(mid, ret, true) and
isParameterPostUpdate(ret, _, ppos)
isParameterPostUpdate(ret, _, pragma[only_bind_into](ppos))
|
summaryClearsContent(mid, _) or
summaryExpectsContent(mid, _)

View File

@@ -1,3 +1,5 @@
## 0.1.3
## 0.1.2
## 0.1.1

View File

@@ -0,0 +1 @@
## 0.1.3

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.1.2
lastReleaseVersion: 0.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/csharp-queries
version: 0.1.3-dev
version: 0.1.3
groups:
- csharp
- queries

View File

@@ -1,3 +1,5 @@
## 0.1.3
## 0.1.2
### New Features

View File

@@ -0,0 +1 @@
## 0.1.3

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.1.2
lastReleaseVersion: 0.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/go-all
version: 0.1.3-dev
version: 0.1.3
groups: go
dbscheme: go.dbscheme
extractor: go

View File

@@ -1,3 +1,5 @@
## 0.1.3
## 0.1.2
## 0.1.1

View File

@@ -0,0 +1 @@
## 0.1.3

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.1.2
lastReleaseVersion: 0.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/go-queries
version: 0.1.3-dev
version: 0.1.3
groups:
- go
- queries

View File

@@ -1,3 +1,14 @@
## 0.2.2
### Deprecated APIs
* The QL class `FloatingPointLiteral` has been renamed to `FloatLiteral`.
### Minor Analysis Improvements
* Fixed a sanitizer of the query `java/android/intent-redirection`. Now, for an intent to be considered
safe against intent redirection, both its package name and class name must be checked.
## 0.2.1
### New Features

View File

@@ -1,5 +0,0 @@
---
category: minorAnalysis
---
Fixed a sanitizer of the query `java/android/intent-redirection`. Now, for an intent to be considered
safe against intent redirection, both its package name and class name must be checked.

View File

@@ -1,4 +0,0 @@
---
category: deprecated
---
* The QL class `FloatingPointLiteral` has been renamed to `FloatLiteral`.

View File

@@ -0,0 +1,10 @@
## 0.2.2
### Deprecated APIs
* The QL class `FloatingPointLiteral` has been renamed to `FloatLiteral`.
### Minor Analysis Improvements
* Fixed a sanitizer of the query `java/android/intent-redirection`. Now, for an intent to be considered
safe against intent redirection, both its package name and class name must be checked.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.2.1
lastReleaseVersion: 0.2.2

View File

@@ -1,5 +1,5 @@
name: codeql/java-all
version: 0.2.2-dev
version: 0.2.2
groups: java
dbscheme: config/semmlecode.dbscheme
extractor: java

View File

@@ -777,10 +777,10 @@ module Private {
predicate prohibitsUseUseFlow(ArgNode arg, SummarizedCallable sc) {
exists(ParamNode p, Node mid, ParameterPosition ppos, Node ret |
p = summaryArgParam0(_, arg, sc) and
p.isParameterOf(_, ppos) and
p.isParameterOf(_, pragma[only_bind_into](ppos)) and
summaryLocalStep(p, mid, true) and
summaryLocalStep(mid, ret, true) and
isParameterPostUpdate(ret, _, ppos)
isParameterPostUpdate(ret, _, pragma[only_bind_into](ppos))
|
summaryClearsContent(mid, _) or
summaryExpectsContent(mid, _)

View File

@@ -1,3 +1,17 @@
## 0.1.3
### New Queries
* Two new queries "Inefficient regular expression" (`java/redos`) and "Polynomial regular expression used on uncontrolled data" (`java/polynomial-redos`) have been added.
These queries help find instances of Regular Expression Denial of Service vulnerabilities.
### Minor Analysis Improvements
* Query `java/sensitive-log` has received several improvements.
* It no longer considers usernames as sensitive information.
* The conditions to consider a variable a constant (and therefore exclude it as user-provided sensitive information) have been tightened.
* A sanitizer has been added to handle certain elements introduced by a Kotlin compiler plugin that have deceptive names.
## 0.1.2
### Query Metadata Changes
@@ -39,7 +53,7 @@ this respect.
### Minor Analysis Improvements
* Updated "Local information disclosure in a temporary directory" (`java/local-temp-file-or-directory-information-disclosure`) to remove false-positives when OS is properly used as logical guard.
* Updated "Local information disclosure in a temporary directory" (`java/local-temp-file-or-directory-information-disclosure`) to remove false-positives when OS is properly used as logical guard.
## 0.0.11

View File

@@ -1,6 +0,0 @@
---
category: newQuery
---
* Two new queries "Inefficient regular expression" (`java/redos`) and "Polynomial regular expression used on uncontrolled data" (`java/polynomial-redos`) have been added.
These queries help find instances of Regular Expression Denial of Service vulnerabilities.

View File

@@ -1,6 +1,12 @@
---
category: minorAnalysis
---
## 0.1.3
### New Queries
* Two new queries "Inefficient regular expression" (`java/redos`) and "Polynomial regular expression used on uncontrolled data" (`java/polynomial-redos`) have been added.
These queries help find instances of Regular Expression Denial of Service vulnerabilities.
### Minor Analysis Improvements
* Query `java/sensitive-log` has received several improvements.
* It no longer considers usernames as sensitive information.
* The conditions to consider a variable a constant (and therefore exclude it as user-provided sensitive information) have been tightened.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.1.2
lastReleaseVersion: 0.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/java-queries
version: 0.1.3-dev
version: 0.1.3
groups:
- java
- queries

View File

@@ -1,3 +1,9 @@
## 0.1.3
### Minor Analysis Improvements
* The `isLibaryFile` predicate from `ClassifyFiles.qll` has been renamed to `isLibraryFile` to fix a typo.
## 0.1.2
### Deprecated APIs

View File

@@ -1,4 +1,5 @@
---
category: minorAnalysis
---
## 0.1.3
### Minor Analysis Improvements
* The `isLibaryFile` predicate from `ClassifyFiles.qll` has been renamed to `isLibraryFile` to fix a typo.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.1.2
lastReleaseVersion: 0.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/javascript-all
version: 0.1.3-dev
version: 0.1.3
groups: javascript
dbscheme: semmlecode.javascript.dbscheme
extractor: javascript

View File

@@ -1,3 +1,12 @@
## 0.1.3
### New Queries
* The `js/actions/command-injection` query has been added. It highlights GitHub Actions workflows that may allow an
attacker to execute arbitrary code in the workflow.
The query previously existed an experimental query.
* A new query `js/insecure-temporary-file` has been added. The query detects the creation of temporary files that may be accessible by others users. The query is not run by default.
## 0.1.2
### New Queries

View File

@@ -1,4 +0,0 @@
---
category: newQuery
---
* A new query `js/insecure-temporary-file` has been added. The query detects the creation of temporary files that may be accessible by others users. The query is not run by default.

View File

@@ -1,6 +0,0 @@
---
category: newQuery
---
* The `js/actions/injection` query has been added. It highlights GitHub Actions workflows that may allow an
attacker to execute arbitrary code in the workflow.
The query previously existed an experimental query.

View File

@@ -0,0 +1,8 @@
## 0.1.3
### New Queries
* The `js/actions/command-injection` query has been added. It highlights GitHub Actions workflows that may allow an
attacker to execute arbitrary code in the workflow.
The query previously existed an experimental query.
* A new query `js/insecure-temporary-file` has been added. The query detects the creation of temporary files that may be accessible by others users. The query is not run by default.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.1.2
lastReleaseVersion: 0.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/javascript-queries
version: 0.1.3-dev
version: 0.1.3
groups:
- javascript
- queries

View File

@@ -1,3 +1,9 @@
## 0.4.0
### Breaking Changes
* `API::moduleImport` no longer has any results for dotted names, such as `API::moduleImport("foo.bar")`. Using `API::moduleImport("foo.bar").getMember("baz").getACall()` previously worked if the Python code was `from foo.bar import baz; baz()`, but not if the code was `import foo.bar; foo.bar.baz()` -- we are making this change to ensure the approach that can handle all cases is always used.
## 0.3.0
### Breaking Changes

View File

@@ -1,4 +0,0 @@
---
category: breaking
---
`API::moduleImport` no longer has any results for dotted names, such as `API::moduleImport("foo.bar")`. Using `API::moduleImport("foo.bar").getMember("baz").getACall()` previously worked if the Python code was `from foo.bar import baz; baz()`, but not if the code was `import foo.bar; foo.bar.baz()` -- we are making this change to ensure the approach that can handle all cases is always used.

View File

@@ -0,0 +1,5 @@
## 0.4.0
### Breaking Changes
* `API::moduleImport` no longer has any results for dotted names, such as `API::moduleImport("foo.bar")`. Using `API::moduleImport("foo.bar").getMember("baz").getACall()` previously worked if the Python code was `from foo.bar import baz; baz()`, but not if the code was `import foo.bar; foo.bar.baz()` -- we are making this change to ensure the approach that can handle all cases is always used.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.3.0
lastReleaseVersion: 0.4.0

View File

@@ -1,5 +1,5 @@
name: codeql/python-all
version: 0.3.1-dev
version: 0.4.0
groups: python
dbscheme: semmlecode.python.dbscheme
extractor: python

View File

@@ -1,3 +1,9 @@
## 0.1.3
### New Queries
* The query "PAM authorization bypass due to incorrect usage" (`py/pam-auth-bypass`) has been promoted from experimental to the main query pack. Its results will now appear by default. This query was originally [submitted as an experimental query by @porcupineyhairs](https://github.com/github/codeql/pull/8595).
## 0.1.2
### New Queries

View File

@@ -1,4 +1,5 @@
---
category: newQuery
---
## 0.1.3
### New Queries
* The query "PAM authorization bypass due to incorrect usage" (`py/pam-auth-bypass`) has been promoted from experimental to the main query pack. Its results will now appear by default. This query was originally [submitted as an experimental query by @porcupineyhairs](https://github.com/github/codeql/pull/8595).

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.1.2
lastReleaseVersion: 0.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/python-queries
version: 0.1.3-dev
version: 0.1.3
groups:
- python
- queries

View File

@@ -1,3 +1,14 @@
## 0.2.2
### Major Analysis Improvements
* Added data-flow support for [hashes](https://docs.ruby-lang.org/en/3.1/Hash.html).
### Minor Analysis Improvements
* Support for data flow through instance variables has been added.
* Support of the safe navigation operator (`&.`) has been added; there is a new predicate `MethodCall.isSafeNavigation()`.
## 0.2.1
### Bug Fixes

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
Support of the safe navigation operator (`&.`) has been added; there is a new predicate `MethodCall.isSafeNavigation()`.

View File

@@ -1,4 +0,0 @@
---
category: majorAnalysis
---
Added data-flow support for [hashes](https://docs.ruby-lang.org/en/3.1/Hash.html).

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
Support for data flow through instance variables has been added.

View File

@@ -0,0 +1,10 @@
## 0.2.2
### Major Analysis Improvements
* Added data-flow support for [hashes](https://docs.ruby-lang.org/en/3.1/Hash.html).
### Minor Analysis Improvements
* Support for data flow through instance variables has been added.
* Support of the safe navigation operator (`&.`) has been added; there is a new predicate `MethodCall.isSafeNavigation()`.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.2.1
lastReleaseVersion: 0.2.2

View File

@@ -777,10 +777,10 @@ module Private {
predicate prohibitsUseUseFlow(ArgNode arg, SummarizedCallable sc) {
exists(ParamNode p, Node mid, ParameterPosition ppos, Node ret |
p = summaryArgParam0(_, arg, sc) and
p.isParameterOf(_, ppos) and
p.isParameterOf(_, pragma[only_bind_into](ppos)) and
summaryLocalStep(p, mid, true) and
summaryLocalStep(mid, ret, true) and
isParameterPostUpdate(ret, _, ppos)
isParameterPostUpdate(ret, _, pragma[only_bind_into](ppos))
|
summaryClearsContent(mid, _) or
summaryExpectsContent(mid, _)

View File

@@ -1,5 +1,5 @@
name: codeql/ruby-all
version: 0.2.2-dev
version: 0.2.2
groups: ruby
extractor: ruby
dbscheme: ruby.dbscheme

View File

@@ -1,3 +1,5 @@
## 0.1.3
## 0.1.2
## 0.1.1

View File

@@ -0,0 +1 @@
## 0.1.3

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.1.2
lastReleaseVersion: 0.1.3

View File

@@ -1,5 +1,5 @@
name: codeql/ruby-queries
version: 0.1.3-dev
version: 0.1.3
groups:
- ruby
- queries