Commit Graph

2863 Commits

Author SHA1 Message Date
Tamas Vajk
a635503be0 Add test cases to UselessCastToSelf 2020-09-28 11:04:22 +02:00
Tamas Vajk
3577b27f49 Fix to not report on enum member initialization 2020-09-28 11:04:22 +02:00
Tamas Vajk
77bb1b2cd9 C#: Extract constant value of enum member equal clauses 2020-09-28 11:04:22 +02:00
Tamas Vajk
a6b62a3838 C#: Add enum init value test 2020-09-28 10:56:50 +02:00
Tamas Vajk
48bf6d55aa C#: Add implicit cast from array to pointer 2020-09-23 17:21:38 +02:00
Tamas Vajk
2868d5bf34 C#: Add pointer cast test cases 2020-09-23 12:20:51 +02:00
Tamás Vajk
03e20eed05 Merge pull request #4314 from tamasvajk/feature/switch-case-expr
C#: Fix switch case expression types
2020-09-23 08:57:32 +02:00
Tamás Vajk
5ab5e75b85 Merge pull request #4255 from fatenhealy/IncreaseInsufficientKeySizeValue
Increase insufficient key size value from 1024 to 2048
2020-09-22 23:06:12 +02:00
Tamas Vajk
5f96c37b28 C#: Fix switch case expression types 2020-09-22 13:16:31 +02:00
Faten Healy
c35a5d120a C#: Increasing required size of RSA key to 2048 2020-09-22 11:09:49 +02:00
Tamas Vajk
cc979d0b5f C#: Add switch case expression type test 2020-09-22 11:04:44 +02:00
Tom Hvitved
06dbec78f7 C#: Add Guard::controlsBasicBlock() and simplify Guard::isEquality() 2020-09-21 16:15:12 +02:00
Tamas Vajk
8bf4a4209c C#: Sign analysis
Synced between Java and C# through `identical-files.json`.
2020-09-21 16:15:12 +02:00
Tom Hvitved
d095d6b56b Merge pull request #4139 from hvitved/csharp/cfg/foreach-loop-empty
C#: Skip `foreach` loop bodies in the CFG when the iteration expression is empty
2020-09-15 09:30:29 +02:00
Tamás Vajk
d21c101c0d Merge pull request #4041 from tamasvajk/feature/update-roslyn
C#: upgrade Roslyn dependencies to version 3.7
2020-09-14 13:57:36 +02:00
Tom Hvitved
6c5b30d2a4 C#: Update CIL consistency test 2020-09-11 11:49:07 +02:00
Tamas Vajk
d60b7c7297 C#: Improve empty collection check to not report on collections with property writes 2020-09-11 10:46:34 +02:00
Tom Hvitved
6c716331d9 C#: Skip foreach loop bodies in the CFG when the iteration expression is empty 2020-09-07 15:26:28 +02:00
Tom Hvitved
9e240b7397 C#: Add more CFG loop unrolling tests 2020-09-07 15:26:25 +02:00
Tamas Vajk
e2c205deb4 C#: Add stable order for generated accessors in printed AST 2020-09-04 10:39:01 +02:00
Tom Hvitved
51dc1515ab C#: Address review comments 2020-09-02 10:52:05 +02:00
Tom Hvitved
c7f776984f C#: Add CFG tests for callables with multiple implementations 2020-09-02 10:52:05 +02:00
Tom Hvitved
8a0355720a C#: Make Callable::get[Expression|Statement]Body() return all possible implementations
Previosly, we returned only the body belonging to "the most likely" implementation,
based on a CFG size heuristics. However, now that more callables are mapped to the
same entity, it makes more sense to treat such callables (to some extent) like
partial methods. This means, for instance, that data flow will branch out to all possible
implementations, much like we do for virtual dispatch.
2020-09-02 10:52:05 +02:00
Tom Hvitved
d17f88bbcd C#: Remove assembly prefix from all extractor IDs 2020-09-02 10:52:04 +02:00
Calum Grant
f61fdc6891 C#: Only resolve a single, canonical type for each typeref. 2020-09-02 10:52:04 +02:00
Calum Grant
cd51a67c0d C#: Take nullability into account when creating symbol entities. Otherwise, an entity with the wrong (cached) nullability could be created. 2020-09-02 10:52:04 +02:00
Calum Grant
4657ddcb7c C#: Avoid qualifying explicit interface implementations. 2020-09-02 10:52:03 +02:00
Tom Hvitved
4e963a8a8e Merge pull request #4165 from hvitved/csharp/foreach-guard
C#: Fix bug in guards logic for `foreach` loops
2020-08-31 14:32:09 +02:00
Tom Hvitved
b205702853 C#: Fix bug in guards logic for foreach loops 2020-08-28 15:19:11 +02:00
Tom Hvitved
ddb33c914b C#: Add test that demonstrates issue with guards logic for foreach statements 2020-08-28 15:13:18 +02:00
Tamas Vajk
66e3739e72 Fix failing PrintAst test 2020-08-24 22:41:08 +02:00
Tamas Vajk
3dea6b3218 C#: Change implicitly sized array test input 2020-08-24 16:14:00 +02:00
Tamas Vajk
7516825b5f C#: Fix computed sizes for implicitly sized array creation 2020-08-24 16:14:00 +02:00
Tamas Vajk
699cafa890 C#: Add implicitly sized array creations to tests 2020-08-24 15:27:35 +02:00
Tom Hvitved
b8cde180b9 C#: Order top-level elements by location in PrintAst.qll 2020-08-21 06:17:37 +02:00
Tamás Vajk
2a8ff8785a C#: Add AST printing (#4038) 2020-08-20 14:24:43 +02:00
Tom Hvitved
65b4d35add Merge pull request #4055 from tamasvajk/feature/partial-methods
C#: Add body to partial methods
2020-08-20 10:14:56 +02:00
Tamas Vajk
0cf4c99986 C#: Change compiler generated flag for length arguments of implicitly sized arrays 2020-08-18 12:06:01 +02:00
Tamas Vajk
99e62ceee6 C#: Add test for length argument of implicitly sized arrays 2020-08-18 11:44:24 +02:00
Tamas Vajk
beeadea48f Add extra tests for partial methods 2020-08-18 10:26:31 +02:00
Tom Hvitved
c20d763490 Merge pull request #3951 from raulgarciamsft/users/raulgarciamsft/dataset_serialization
C#: DataSet serialization
2020-08-07 12:54:10 +02:00
Raul Garcia (MSFT)
64f4613a3f Removing the options file as requested 2020-07-30 10:25:15 -07:00
Raul Garcia (MSFT)
9e74c183fe Fixing expected results after adding comments to the unit test .cs file 2020-07-30 10:24:24 -07:00
Tom Hvitved
05307b8757 C#: Remove more FPs in cs/dereferenced-value-may-be-null 2020-07-30 12:16:59 +02:00
Tom Hvitved
4f4d9d35be C#: Add more nullness tests 2020-07-30 12:15:49 +02:00
Raul Garcia (MSFT)
7923c480af Fixing queries based on suggestions/comments.
TODO: Auto-formatting is still pending (need guidance on how to enable it on my environment). Thanks
2020-07-29 17:14:37 -07:00
Tom Hvitved
d39a33655f C#: Fix false-positives in cs/dereferenced-value-may-be-null
Dereferencing an expression of a nullable type should only be reported when
the expression is not clearly non-null.
2020-07-28 16:27:36 +02:00
Tom Hvitved
ce2368de96 C#: Add tests for null-coalescing assignment 2020-07-28 11:07:47 +02:00
Raul Garcia (MSFT)
5387294168 Moving to experimental as requested 2020-07-16 09:32:17 -07:00
Raul Garcia (MSFT)
3e0481b889 Queries to help on the detection based on misuse of DataSet and DataTable serialization that could lead to security problems.
https://go.microsoft.com/fwlink/?linkid=2132227
2020-07-14 17:54:54 -07:00