-
Notifications
You must be signed in to change notification settings - Fork 0
/
CA5364.yaml
35 lines (33 loc) · 1.07 KB
/
CA5364.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
rules:
- id: CA5364
languages: [csharp]
severity: WARNING
metadata:
cwe: 'CWE-477: Use of Obsolete Function'
references:
- https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5364
category: security
message: |
Do not use deprecated security protocols
Don't use deprecated TLS protocol versions.
patterns:
- pattern-inside: |
using System;
using System.Net;
...
public class $C
{
public void $METHOD()
{
...
}
}
- pattern-either:
- pattern: |
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
- pattern: |
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;
- pattern: |
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
- pattern: |
ServicePointManager.SecurityProtocol = (SecurityProtocolType) 768;