codeql/change-notes/1.20/analysis-csharp.md

32 строки
2.6 KiB
Markdown
Исходник Обычный вид История

2018-11-28 23:21:34 +03:00
# Improvements to C# analysis
## General improvements
## New queries
| **Query** | **Tags** | **Purpose** |
|-----------------------------|-----------|--------------------------------------------------------------------|
## Changes to existing queries
2018-12-04 18:08:41 +03:00
| *@name of query (Query ID)* | *Impact on results* | *How/why the query has changed* |
|------------------------------|------------------------|-----------------------------------|
2018-11-28 23:21:34 +03:00
| Off-by-one comparison against container length (cs/index-out-of-bounds) | Fewer false positives | Results have been removed when there are additional guards on the index. |
2018-11-30 19:06:37 +03:00
| Dereferenced variable is always null (cs/dereferenced-value-is-always-null) | Improved results | The query has been rewritten from scratch, and the analysis is now based on static single assignment (SSA) forms. The query is now enabled by default in LGTM. |
| Dereferenced variable may be null (cs/dereferenced-value-may-be-null) | Improved results | The query has been rewritten from scratch, and the analysis is now based on static single assignment (SSA) forms. The query is now enabled by default in LGTM. |
2019-01-18 18:49:05 +03:00
| SQL query built from user-controlled sources (cs/sql-injection), Improper control of generation of code (cs/code-injection), Uncontrolled format string (cs/uncontrolled-format-string), Clear text storage of sensitive information (cs/cleartext-storage-of-sensitive-information), Exposure of private information (cs/exposure-of-sensitive-information) | More results | Data sources have been added from user controls in `System.Windows.Forms`. |
2019-01-23 19:20:09 +03:00
| Use of default ToString() (cs/call-to-object-tostring) | Fewer false positives | Results have been removed for `char` arrays passed to `StringBuilder.Append()`, which were incorrectly marked as using `ToString`. |
2019-01-11 18:56:47 +03:00
| Use of default ToString() (cs/call-to-object-tostring) | Fewer results | Results have been removed when the object is an interface or an abstract class. |
2019-02-04 15:45:13 +03:00
| Unused format argument (cs/format-argument-unused) | Fewer false positives | Results have been removed where the format string is empty. This is often used as a default value and is not an interesting result. |
2018-11-28 23:21:34 +03:00
## Changes to code extraction
2018-12-11 13:31:39 +03:00
* Fix extraction of `for` statements where the condition declares new variables using `is`.
2018-12-12 19:16:07 +03:00
* Initializers of `stackalloc` arrays are now extracted.
2018-12-11 13:31:39 +03:00
2018-11-28 23:21:34 +03:00
## Changes to QL libraries
2019-02-07 15:10:18 +03:00
* The class `TrivialProperty` now includes library properties determined to be trivial using CIL analysis. This may increase the number of results for all queries that use data flow.
2018-11-28 23:21:34 +03:00
## Changes to the autobuilder