Skip to content

Commit 165bb8b

Browse files
authored
Merge pull request #488 from pavgust/bump/master-next
Mergeback master to next
2 parents 90c75cd + 16ec9f1 commit 165bb8b

File tree

275 files changed

+8918
-10140
lines changed

Some content is hidden

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

275 files changed

+8918
-10140
lines changed

change-notes/1.19/analysis-csharp.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020
| Cross-site scripting (`cs/web/xss`) | More results | This query now finds cross-site scripting vulnerabilities in ASP.NET Core applications. |
2121
| *@name of query (Query ID)*| *Impact on results* | *How/why the query has changed* |
2222

23+
## Changes to code extraction
24+
25+
* Arguments passed using `in` are now extracted.
26+
* Fix a bug where the `dynamic` type name was not extracted correctly in certain circumstances.
2327

2428
## Changes to QL libraries
2529

2630
* `getArgument()` on `AccessorCall` has been improved so it now takes tuple assignments into account. For example, the argument for the implicit `value` parameter in the setter of property `P` is `0` in `(P, x) = (0, 1)`. Additionally, the argument for the `value` parameter in compound assignments is now only the expanded value, for example, in `P += 7` the argument is `P + 7` and not `7`.
31+
* The predicate `isInArgument()` has been added to the `AssignableAccess` class. This holds for expressions that are passed as arguments using `in`.

change-notes/1.19/analysis-java.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## General improvements
44

5+
* Where applicable, path explanations have been added to the security queries.
6+
57
## New queries
68

79
| **Query** | **Tags** | **Purpose** |

change-notes/1.19/analysis-javascript.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66

77
* The taint tracking library now recognizes additional sanitization patterns. This may give fewer false-positive results for the security queries.
88

9+
* Support for AMD modules has been improved. This may give additional results for the security queries as well as any queries that use type inference on code bases that use such modules.
10+
911
* Support for popular libraries has been improved. Consequently, queries may produce more results on code bases that use the following features:
1012
- file system access, for example through [fs-extra](https://github.com/jprichardson/node-fs-extra) or [globby](https://www.npmjs.com/package/globby)
1113
- outbound network access, for example through the [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
1214
- the [lodash](https://lodash.com), [underscore](https://underscorejs.org/), [async](https://www.npmjs.com/package/async) and [async-es](https://www.npmjs.com/package/async-es) libraries
1315

1416
* Type inference for function calls has been improved. This may give additional results for queries that rely on type inference.
1517

18+
* Where applicable, path explanations have been added to the security queries.
19+
1620
## New queries
1721

1822
| **Query** | **Tags** | **Purpose** |
@@ -45,6 +49,8 @@
4549
| Unused variable, import, function or class | Fewer results | This rule now flags import statements with multiple unused imports once. |
4650
| Useless assignment to local variable | Fewer false-positive results | This rule now recognizes additional ways default values can be set. |
4751
| Whitespace contradicts operator precedence | Fewer false-positive results | This rule no longer flags operators with asymmetric whitespace. |
52+
| Client-side URL redirect | Fewer false-positive results | This rule now recognizes safe redirects in more cases. |
53+
| Server-side URL redirect | Fewer false-positive results | This rule now recognizes safe redirects in more cases. |
4854

4955
## Changes to QL libraries
5056

cpp/ql/src/Architecture/General Class-Level Information/ClassHierarchies.qhelp

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

cpp/ql/src/Architecture/General Class-Level Information/ClassHierarchies.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Class hierarchies
3-
* @description Shows classes and their base classes.
3+
* @description Shows an inheritance hierarchy for classes and their base classes.
44
* @kind graph
55
* @id cpp/architecture/class-hierarchies
66
* @graph.layout organic

cpp/ql/src/Architecture/General Class-Level Information/HubClasses.qhelp

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

cpp/ql/src/Architecture/General Class-Level Information/HubClasses.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Hub classes
3-
* @description Shows coupling between classes; red, large boxes are hub types that depend on many other classes
3+
* @description Shows coupling between classes. Large, red, boxes are hub types that depend on many other classes
44
* and are depended on by many other classes.
55
* @kind treemap
66
* @id cpp/architecture/hub-classes

cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.qhelp

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,30 @@
55

66

77
<overview>
8-
<p>This query shows the distribution of inheritance depth across all types, i.e. classes. Library types are ignored.</p>
8+
<p>This query shows the distribution of inheritance depth across all types, that is, classes. Library types are ignored.</p>
99

1010
<p>The result of this query is a line graph showing, for each number <i>n</i>, how many types have an inheritance depth of <i>n</i>, where
1111
the inheritance depth of a type is the length of a longest path in the inheritance hierarchy from top class to the type.</p>
12-
13-
<p>When hovering the mouse pointer over a specific depth value, the number of types having this inheritance depth is displayed.</p>
14-
1512
</overview>
16-
<section title="How to Address the Query Results">
13+
14+
<recommendation>
1715
<p>The depth of a type is an indication of how deeply nested a type is in a given design.
1816
Very deep types can be an indication of over-engineering, whereas a system with predominantly shallow types
1917
may not be exploiting object-orientation to the full.</p>
18+
</recommendation>
2019

21-
22-
23-
24-
25-
</section>
2620
<references>
2721
<li>
28-
Shyam R. Chidamber and Chris F. Kemerer.
29-
<a href="http://www.pitt.edu/~ckemerer/CK%20research%20papers/MetricForOOD_ChidamberKemerer94.pdf">A Metrics Suite for Object Oriented Design
30-
</a>.
22+
Shyam R. Chidamber and Chris F. Kemerer,
23+
<i><a href="http://www.pitt.edu/~ckemerer/CK%20research%20papers/MetricForOOD_ChidamberKemerer94.pdf">A Metrics Suite for Object Oriented Design
24+
</a></i>.
3125
IEEE Transactions on Software Engineering,
32-
20(6), pages 476-493, June 1994.
33-
26+
20(6), pages 476-493, June 1994.</li>
3427

35-
36-
<a href="http://www.dmst.aueb.gr/dds/index.en.html">Diomides D. Spinnelis</a>.
37-
<a href="http://www.spinellis.gr/codequality/">Code Quality: The Open Source Perspective</a>.
38-
Addison-Wesley 2007.
39-
40-
41-
42-
<a href="http://www.dmst.aueb.gr/dds/index.en.html">Diomides D. Spinnelis</a>.
43-
<a href="http://www.spinellis.gr/sw/ckjm/">ckjm - Chidamber and Kemerer Java Metrics</a>.
44-
(implementation of CK metrics), 2006.
45-
46-
47-
48-
</li></references></qhelp>
28+
<li>
29+
Lutz Prechelt, Barbara Unger, Michael Philippsen, and Walter Tich, <i><a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.159.2229&amp;rep=rep1&amp;type=pdf">A Controlled Experiment on Inheritance Depth as a Cost Factor for Code Maintenance
30+
</a></i>.
31+
Journal of Systems and Software, 65 (2):115-126, 2003.
32+
</li>
33+
</references>
34+
</qhelp>

cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Inheritance depth distribution
3-
* @description Shows distribution of inheritance depth across all classes.
3+
* @description Shows the distribution of inheritance depth across all classes.
44
* @kind chart
55
* @id cpp/architecture/inheritance-depth-distribution
66
* @chart.type line

cpp/ql/src/Architecture/General Namespace-Level Information/CyclicNamespaces.qhelp

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@
77
<overview>
88
<p>This query shows namespaces that cyclically depend
99
on one another.</p>
10-
11-
<p />
12-
1310
</overview>
14-
<section title="How to Address the Query Results">
15-
<p>If there are cyclic dependencies between packages, they cannot be developed and tested independently. It is thus preferable to
16-
eliminate such cycles from the program.</p>
17-
18-
19-
2011

12+
<recommendation>
13+
<p>If there are cyclic dependencies between packages, they cannot be developed and tested independently.
14+
It is better to eliminate such cycles from the program.</p>
15+
</recommendation>
2116

22-
</section>
2317
<references>
2418
<li>Robert Martin's <a href="https://drive.google.com/file/d/0BwhCYaYDn8EgOGM2ZGFhNmYtNmE4ZS00OGY5LWFkZTYtMjE0ZGNjODQ0MjEx/view">Acyclic Dependencies Principle</a>.
25-
</li></references></qhelp>
19+
</li>
20+
</references>
21+
</qhelp>

0 commit comments

Comments
 (0)