{ "$schema": "http://json.schemastore.org/sarif-1.0.0", "version": "1.0.0", "runs": [ { "tool": { "name": "Microsoft.CodeAnalysis.VersionCheckAnalyzer", "version": "3.0.0", "language": "en-US" }, "rules": { "CA9999": { "id": "CA9999", "shortDescription": "Analyzer version mismatch", "fullDescription": "Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version.", "defaultLevel": "warning", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "AnalyzerVersionCheckAnalyzer", "languages": [ "C#", "Visual Basic" ] } } } }, { "tool": { "name": "Microsoft.CodeQuality.Analyzers", "version": "3.0.0", "language": "en-US" }, "rules": { "CA1000": { "id": "CA1000", "shortDescription": "Do not declare static members on generic types", "fullDescription": "When a static member of a generic type is called, the type argument must be specified for the type. When a generic instance member that does not support inference is called, the type argument must be specified for the member. In these two cases, the syntax for specifying the type argument is different and easily confused.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1000", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "DoNotDeclareStaticMembersOnGenericTypesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1008": { "id": "CA1008", "shortDescription": "Enums should have zero value", "fullDescription": "The default value of an uninitialized enumeration, just as other value types, is zero. A nonflags-attributed enumeration should define a member by using the value of zero so that the default value is a valid value of the enumeration. If an enumeration that has the FlagsAttribute attribute applied defines a zero-valued member, its name should be \"\"None\"\" to indicate that no values have been set in the enumeration.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1008", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "EnumsShouldHaveZeroValueAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry", "RuleNoZero" ] } }, "CA1010": { "id": "CA1010", "shortDescription": "Generic interface should also be implemented", "fullDescription": "To broaden the usability of a type, implement one of the generic interfaces. This is especially true for collections as they can then be used to populate generic collection types.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1010", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "CollectionsShouldImplementGenericInterfaceAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1012": { "id": "CA1012", "shortDescription": "Abstract types should not have constructors", "fullDescription": "Constructors on abstract types can be called only by derived types. Because public constructors create instances of a type, and you cannot create instances of an abstract type, an abstract type that has a public constructor is incorrectly designed.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1012", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "AbstractTypesShouldNotHaveConstructorsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1014": { "id": "CA1014", "shortDescription": "Mark assemblies with CLSCompliant", "fullDescription": "The Common Language Specification (CLS) defines naming restrictions, data types, and rules to which assemblies must conform if they will be used across programming languages. Good design dictates that all assemblies explicitly indicate CLS compliance by using CLSCompliantAttribute . If this attribute is not present on an assembly, the assembly is not compliant.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1014", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "MarkAssembliesWithAttributesDiagnosticAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1016": { "id": "CA1016", "shortDescription": "Mark assemblies with assembly version", "fullDescription": "The .NET Framework uses the version number to uniquely identify an assembly, and to bind to types in strongly named assemblies. The version number is used together with version and publisher policy. By default, applications run only with the assembly version with which they were built.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1016", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "MarkAssembliesWithAttributesDiagnosticAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1017": { "id": "CA1017", "shortDescription": "Mark assemblies with ComVisible", "fullDescription": "ComVisibleAttribute determines how COM clients access managed code. Good design dictates that assemblies explicitly indicate COM visibility. COM visibility can be set for the whole assembly and then overridden for individual types and type members. If this attribute is not present, the contents of the assembly are visible to COM clients.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1017", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "MarkAssembliesWithComVisibleAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1018": { "id": "CA1018", "shortDescription": "Mark attributes with AttributeUsageAttribute", "fullDescription": "Specify AttributeUsage on {0}.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1018", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "MarkAttributesWithAttributeUsageAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1021": { "id": "CA1021", "shortDescription": "Avoid out parameters", "fullDescription": "Passing types by reference (using 'out' or 'ref') requires experience with pointers, understanding how value types and reference types differ, and handling methods with multiple return values. Also, the difference between 'out' and 'ref' parameters is not widely understood.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1021", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "AvoidOutParameters", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1024": { "id": "CA1024", "shortDescription": "Use properties where appropriate", "fullDescription": "A public or protected method has a name that starts with \"\"Get\"\", takes no parameters, and returns a value that is not an array. The method might be a good candidate to become a property.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1024", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "UsePropertiesWhereAppropriateAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1027": { "id": "CA1027", "shortDescription": "Mark enums with FlagsAttribute", "fullDescription": "An enumeration is a value type that defines a set of related named constants. Apply FlagsAttribute to an enumeration when its named constants can be meaningfully combined.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1027", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "EnumWithFlagsAttributeAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1028": { "id": "CA1028", "shortDescription": "Enum Storage should be Int32", "fullDescription": "An enumeration is a value type that defines a set of related named constants. By default, the System.Int32 data type is used to store the constant value. Although you can change this underlying type, it is not required or recommended for most scenarios.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1028", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "EnumStorageShouldBeInt32Analyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1030": { "id": "CA1030", "shortDescription": "Use events where appropriate", "fullDescription": "This rule detects methods that have names that ordinarily would be used for events. If a method is called in response to a clearly defined state change, the method should be invoked by an event handler. Objects that call the method should raise events instead of calling the method directly.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1030", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "UseEventsWhereAppropriateAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1031": { "id": "CA1031", "shortDescription": "Do not catch general exception types", "fullDescription": "A general exception such as System.Exception or System.SystemException or a disallowed exception type is caught in a catch statement, or a general catch clause is used. General and disallowed exceptions should not be caught.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1031", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "DoNotCatchGeneralExceptionTypesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1033": { "id": "CA1033", "shortDescription": "Interface methods should be callable by child types", "fullDescription": "An unsealed externally visible type provides an explicit method implementation of a public interface and does not provide an alternative externally visible method that has the same name.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1033", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "InterfaceMethodsShouldBeCallableByChildTypesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1034": { "id": "CA1034", "shortDescription": "Nested types should not be visible", "fullDescription": "A nested type is a type that is declared in the scope of another type. Nested types are useful to encapsulate private implementation details of the containing type. Used for this purpose, nested types should not be externally visible.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1034", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "NestedTypesShouldNotBeVisibleAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1036": { "id": "CA1036", "shortDescription": "Override methods on comparable types", "fullDescription": "A public or protected type implements the System.IComparable interface. It does not override Object.Equals nor does it overload the language-specific operator for equality, inequality, less than, less than or equal, greater than or greater than or equal.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1036", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "OverrideMethodsOnComparableTypesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1040": { "id": "CA1040", "shortDescription": "Avoid empty interfaces", "fullDescription": "Interfaces define members that provide a behavior or usage contract. The functionality that is described by the interface can be adopted by any type, regardless of where the type appears in the inheritance hierarchy. A type implements an interface by providing implementations for the members of the interface. An empty interface does not define any members; therefore, it does not define a contract that can be implemented.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1040", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "AvoidEmptyInterfacesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1041": { "id": "CA1041", "shortDescription": "Provide ObsoleteAttribute message", "fullDescription": "A type or member is marked by using a System.ObsoleteAttribute attribute that does not have its ObsoleteAttribute.Message property specified. When a type or member that is marked by using ObsoleteAttribute is compiled, the Message property of the attribute is displayed. This gives the user information about the obsolete type or member.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1041", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "ProvideObsoleteAttributeMessageAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1043": { "id": "CA1043", "shortDescription": "Use Integral Or String Argument For Indexers", "fullDescription": "Indexers, that is, indexed properties, should use integer or string types for the index. These types are typically used for indexing data structures and increase the usability of the library. Use of the Object type should be restricted to those cases where the specific integer or string type cannot be specified at design time. If the design requires other types for the index, reconsider whether the type represents a logical data store. If it does not represent a logical data store, use a method.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1043", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "UseIntegralOrStringArgumentForIndexersAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1044": { "id": "CA1044", "shortDescription": "Properties should not be write only", "fullDescription": "Although it is acceptable and often necessary to have a read-only property, the design guidelines prohibit the use of write-only properties. This is because letting a user set a value, and then preventing the user from viewing that value, does not provide any security. Also, without read access, the state of shared objects cannot be viewed, which limits their usefulness.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1044", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "PropertiesShouldNotBeWriteOnlyAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1050": { "id": "CA1050", "shortDescription": "Declare types in namespaces", "fullDescription": "Types are declared in namespaces to prevent name collisions and as a way to organize related types in an object hierarchy.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1050", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "DeclareTypesInNamespacesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1051": { "id": "CA1051", "shortDescription": "Do not declare visible instance fields", "fullDescription": "The primary use of a field should be as an implementation detail. Fields should be private or internal and should be exposed by using properties.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1051", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "DoNotDeclareVisibleInstanceFieldsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1052": { "id": "CA1052", "shortDescription": "Static holder types should be Static or NotInheritable", "fullDescription": "Type '{0}' is a static holder type but is neither static nor NotInheritable", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1052", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "StaticHolderTypesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1054": { "id": "CA1054", "shortDescription": "Uri parameters should not be strings", "fullDescription": "If a method takes a string representation of a URI, a corresponding overload should be provided that takes an instance of the URI class, which provides these services in a safe and secure manner.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1054", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "UriParametersShouldNotBeStringsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1055": { "id": "CA1055", "shortDescription": "Uri return values should not be strings", "fullDescription": "This rule assumes that the method returns a URI. A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1055", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "UriReturnValuesShouldNotBeStringsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1056": { "id": "CA1056", "shortDescription": "Uri properties should not be strings", "fullDescription": "This rule assumes that the property represents a Uniform Resource Identifier (URI). A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1056", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "UriPropertiesShouldNotBeStringsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1060": { "id": "CA1060", "shortDescription": "Move pinvokes to native methods class", "fullDescription": "Platform Invocation methods, such as those that are marked by using the System.Runtime.InteropServices.DllImportAttribute attribute, or methods that are defined by using the Declare keyword in Visual Basic, access unmanaged code. These methods should be of the NativeMethods, SafeNativeMethods, or UnsafeNativeMethods class.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1060", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "MovePInvokesToNativeMethodsClassAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1061": { "id": "CA1061", "shortDescription": "Do not hide base class methods", "fullDescription": "A method in a base type is hidden by an identically named method in a derived type when the parameter signature of the derived method differs only by types that are more weakly derived than the corresponding types in the parameter signature of the base method.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1061", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "DoNotHideBaseClassMethodsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1062": { "id": "CA1062", "shortDescription": "Validate arguments of public methods", "fullDescription": "An externally visible method dereferences one of its reference arguments without verifying whether that argument is null (Nothing in Visual Basic). All reference arguments that are passed to externally visible methods should be checked against null. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. If the method is designed to be called only by known assemblies, you should make the method internal.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1062", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "ValidateArgumentsOfPublicMethods", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Dataflow", "Telemetry" ] } }, "CA1063": { "id": "CA1063", "shortDescription": "Implement IDisposable Correctly", "fullDescription": "All IDisposable types should implement the Dispose pattern correctly.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1063", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "ImplementIDisposableCorrectlyAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1064": { "id": "CA1064", "shortDescription": "Exceptions should be public", "fullDescription": "An internal exception is visible only inside its own internal scope. After the exception falls outside the internal scope, only the base exception can be used to catch the exception. If the internal exception is inherited from T:System.Exception, T:System.SystemException, or T:System.ApplicationException, the external code will not have sufficient information to know what to do with the exception.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1064", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "ExceptionsShouldBePublicAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1066": { "id": "CA1066", "shortDescription": "Type {0} should implement IEquatable because it overrides Equals", "fullDescription": "When a type T overrides Object.Equals(object), the implementation must cast the object argument to the correct type T before performing the comparison. If the type implements IEquatable, and therefore offers the method T.Equals(T), and if the argument is known at compile time to be of type T, then the compiler can call IEquatable.Equals(T) instead of Object.Equals(object), and no cast is necessary, improving performance.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1066", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "EquatableAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA1067": { "id": "CA1067", "shortDescription": "Override Object.Equals(object) when implementing IEquatable", "fullDescription": "When a type T implements the interface IEquatable, it suggests to a user who sees a call to the Equals method in source code that an instance of the type can be equated with an instance of any other type. The user might be confused if their attempt to equate the type with an instance of another type fails to compile. This violates the \"principle of least surprise\".", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1067", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "EquatableAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA1068": { "id": "CA1068", "shortDescription": "CancellationToken parameters must come last", "fullDescription": "Method '{0}' should take CancellationToken as the last parameter", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1068", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "CancellationTokenParametersMustComeLastAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA1069": { "id": "CA1069", "shortDescription": "Enums values should not be duplicated", "fullDescription": "The field reference '{0}' is duplicated in this bitwise initialization.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1069", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "EnumShouldNotHaveDuplicatedValues", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA1501": { "id": "CA1501", "shortDescription": "Avoid excessive inheritance", "fullDescription": "Deeply nested type hierarchies can be difficult to follow, understand, and maintain. This rule limits analysis to hierarchies in the same module. To fix a violation of this rule, derive the type from a base type that is less deep in the inheritance hierarchy or eliminate some of the intermediate base types.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1501", "properties": { "category": "Maintainability", "isEnabledByDefault": false, "typeName": "CodeMetricsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1502": { "id": "CA1502", "shortDescription": "Avoid excessive complexity", "fullDescription": "Cyclomatic complexity measures the number of linearly independent paths through the method, which is determined by the number and complexity of conditional branches. A low cyclomatic complexity generally indicates a method that is easy to understand, test, and maintain. The cyclomatic complexity is calculated from a control flow graph of the method and is given as follows: `cyclomatic complexity = the number of edges - the number of nodes + 1`, where a node represents a logic branch point and an edge represents a line between nodes.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1502", "properties": { "category": "Maintainability", "isEnabledByDefault": false, "typeName": "CodeMetricsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1505": { "id": "CA1505", "shortDescription": "Avoid unmaintainable code", "fullDescription": "The maintainability index is calculated by using the following metrics: lines of code, program volume, and cyclomatic complexity. Program volume is a measure of the difficulty of understanding of a symbol that is based on the number of operators and operands in the code. Cyclomatic complexity is a measure of the structural complexity of the type or method. A low maintainability index indicates that code is probably difficult to maintain and would be a good candidate to redesign.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1505", "properties": { "category": "Maintainability", "isEnabledByDefault": false, "typeName": "CodeMetricsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1506": { "id": "CA1506", "shortDescription": "Avoid excessive class coupling", "fullDescription": "This rule measures class coupling by counting the number of unique type references that a symbol contains. Symbols that have a high degree of class coupling can be difficult to maintain. It is a good practice to have types and methods that exhibit low coupling and high cohesion. To fix this violation, try to redesign the code to reduce the number of types to which it is coupled.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1506", "properties": { "category": "Maintainability", "isEnabledByDefault": false, "typeName": "CodeMetricsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1508": { "id": "CA1508", "shortDescription": "Avoid dead conditional code", "fullDescription": "'{0}' is always '{1}'. Remove or refactor the condition(s) to avoid dead code.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1508", "properties": { "category": "Maintainability", "isEnabledByDefault": false, "typeName": "AvoidDeadConditionalCode", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA1509": { "id": "CA1509", "shortDescription": "Invalid entry in code metrics rule specification file", "fullDescription": "Invalid entry in code metrics rule specification file", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1509", "properties": { "category": "Maintainability", "isEnabledByDefault": false, "typeName": "CodeMetricsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA1707": { "id": "CA1707", "shortDescription": "Identifiers should not contain underscores", "fullDescription": "By convention, identifier names do not contain the underscore (_) character. This rule checks namespaces, types, members, and parameters.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1707", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "IdentifiersShouldNotContainUnderscoresAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1708": { "id": "CA1708", "shortDescription": "Identifiers should differ by more than case", "fullDescription": "Identifiers for namespaces, types, members, and parameters cannot differ only by case because languages that target the common language runtime are not required to be case-sensitive.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1708", "properties": { "category": "Naming", "isEnabledByDefault": false, "typeName": "IdentifiersShouldDifferByMoreThanCaseAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1710": { "id": "CA1710", "shortDescription": "Identifiers should have correct suffix", "fullDescription": "By convention, the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, have a suffix that is associated with the base type or interface.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1710", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "IdentifiersShouldHaveCorrectSuffixAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1711": { "id": "CA1711", "shortDescription": "Identifiers should not have incorrect suffix", "fullDescription": "By convention, only the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, should end with specific reserved suffixes. Other type names should not use these reserved suffixes.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1711", "properties": { "category": "Naming", "isEnabledByDefault": false, "typeName": "IdentifiersShouldNotHaveIncorrectSuffixAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1712": { "id": "CA1712", "shortDescription": "Do not prefix enum values with type name", "fullDescription": "An enumeration's values should not start with the type name of the enumeration.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1712", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "DoNotPrefixEnumValuesWithTypeNameAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1714": { "id": "CA1714", "shortDescription": "Flags enums should have plural names", "fullDescription": "A public enumeration has the System.FlagsAttribute attribute, and its name does not end in \"\"s\"\". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1714", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "EnumsShouldHavePluralNamesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1715": { "id": "CA1715", "shortDescription": "Identifiers should have correct prefix", "fullDescription": "Identifiers should have correct prefix", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1715", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "IdentifiersShouldHaveCorrectPrefixAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1716": { "id": "CA1716", "shortDescription": "Identifiers should not match keywords", "fullDescription": "A namespace name or a type name matches a reserved keyword in a programming language. Identifiers for namespaces and types should not match keywords that are defined by languages that target the common language runtime.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1716", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "IdentifiersShouldNotMatchKeywordsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1717": { "id": "CA1717", "shortDescription": "Only FlagsAttribute enums should have plural names", "fullDescription": "Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1717", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "EnumsShouldHavePluralNamesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1720": { "id": "CA1720", "shortDescription": "Identifier contains type name", "fullDescription": "Names of parameters and members are better used to communicate their meaning than to describe their type, which is expected to be provided by development tools. For names of members, if a data type name must be used, use a language-independent name instead of a language-specific one.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1720", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "IdentifiersShouldNotContainTypeNames", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1721": { "id": "CA1721", "shortDescription": "Property names should not match get methods", "fullDescription": "The name of a public or protected member starts with \"\"Get\"\" and otherwise matches the name of a public or protected property. \"\"Get\"\" methods and properties should have names that clearly distinguish their function.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1721", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "PropertyNamesShouldNotMatchGetMethodsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1724": { "id": "CA1724", "shortDescription": "Type names should not match namespaces", "fullDescription": "Type names should not match the names of namespaces that are defined in the .NET Framework class library. Violating this rule can reduce the usability of the library.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1724", "properties": { "category": "Naming", "isEnabledByDefault": true, "typeName": "TypeNamesShouldNotMatchNamespacesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1725": { "id": "CA1725", "shortDescription": "Parameter names should match base declaration", "fullDescription": "Consistent naming of parameters in an override hierarchy increases the usability of the method overrides. A parameter name in a derived method that differs from the name in the base declaration can cause confusion about whether the method is an override of the base method or a new overload of the method.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1725", "properties": { "category": "Naming", "isEnabledByDefault": false, "typeName": "ParameterNamesShouldMatchBaseDeclarationAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1801": { "id": "CA1801", "shortDescription": "Review unused parameters", "fullDescription": "Avoid unused paramereters in your code. If the parameter cannot be removed, then change its name so it starts with an underscore and is optionally followed by an integer, such as '_', '_1', '_2', etc. These are treated as special discard symbol names.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1801", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "ReviewUnusedParametersAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1802": { "id": "CA1802", "shortDescription": "Use literals where appropriate", "fullDescription": "A field is declared static and read-only (Shared and ReadOnly in Visual Basic), and is initialized by using a value that is computable at compile time. Because the value that is assigned to the targeted field is computable at compile time, change the declaration to a const (Const in Visual Basic) field so that the value is computed at compile time instead of at run?time.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1802", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "UseLiteralsWhereAppropriateAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1806": { "id": "CA1806", "shortDescription": "Do not ignore method results", "fullDescription": "A new object is created but never used; or a method that creates and returns a new string is called and the new string is never used; or a COM or P/Invoke method returns an HRESULT or error code that is never used.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1806", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "DoNotIgnoreMethodResultsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1812": { "id": "CA1812", "shortDescription": "Avoid uninstantiated internal classes", "fullDescription": "An instance of an assembly-level type is not created by code in the assembly.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1812", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "AvoidUninstantiatedInternalClassesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1814": { "id": "CA1814", "shortDescription": "Prefer jagged arrays over multidimensional", "fullDescription": "A jagged array is an array whose elements are arrays. The arrays that make up the elements can be of different sizes, leading to less wasted space for some sets of data.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1814", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "PreferJaggedArraysOverMultidimensionalAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1815": { "id": "CA1815", "shortDescription": "Override equals and operator equals on value types", "fullDescription": "For value types, the inherited implementation of Equals uses the Reflection library and compares the contents of all fields. Reflection is computationally expensive, and comparing every field for equality might be unnecessary. If you expect users to compare or sort instances, or to use instances as hash table keys, your value type should implement Equals.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1815", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "OverrideEqualsAndOperatorEqualsOnValueTypesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1819": { "id": "CA1819", "shortDescription": "Properties should not return arrays", "fullDescription": "Arrays that are returned by properties are not write-protected, even when the property is read-only. To keep the array tamper-proof, the property must return a copy of the array. Typically, users will not understand the adverse performance implications of calling such a property.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1819", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "PropertiesShouldNotReturnArraysAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1821": { "id": "CA1821", "shortDescription": "Remove empty Finalizers", "fullDescription": "Finalizers should be avoided where possible, to avoid the additional performance overhead involved in tracking object lifetime.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1821", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "RemoveEmptyFinalizersAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1822": { "id": "CA1822", "shortDescription": "Mark members as static", "fullDescription": "Members that do not access instance data or call instance methods can be marked as static. After you mark the methods as static, the compiler will emit nonvirtual call sites to these members. This can give you a measurable performance gain for performance-sensitive code.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1822", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "MarkMembersAsStaticAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1823": { "id": "CA1823", "shortDescription": "Avoid unused private fields", "fullDescription": "Private fields were detected that do not appear to be accessed in the assembly.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1823", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "AvoidUnusedPrivateFieldsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2007": { "id": "CA2007", "shortDescription": "Consider calling ConfigureAwait on the awaited task", "fullDescription": "When an asynchronous method awaits a Task directly, continuation occurs in the same thread that created the task. Consider calling Task.ConfigureAwait(Boolean) to signal your intention for continuation. Call ConfigureAwait(false) on the task to schedule continuations to the thread pool, thereby avoiding a deadlock on the UI thread. Passing false is a good option for app-independent libraries. Calling ConfigureAwait(true) on the task has the same behavior as not explicitly calling ConfigureAwait. By explicitly calling this method, you're letting readers know you intentionally want to perform the continuation on the original synchronization context.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2007", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "DoNotDirectlyAwaitATaskAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2011": { "id": "CA2011", "shortDescription": "Avoid infinite recursion", "fullDescription": "Do not assign the property within its setter. This call might result in an infinite recursion.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2011", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "AvoidInfiniteRecursion", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2119": { "id": "CA2119", "shortDescription": "Seal methods that satisfy private interfaces", "fullDescription": "An inheritable public type provides an overridable method implementation of an internal (Friend in Visual Basic) interface. To fix a violation of this rule, prevent the method from being overridden outside the assembly.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2119", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "SealMethodsThatSatisfyPrivateInterfacesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2211": { "id": "CA2211", "shortDescription": "Non-constant fields should not be visible", "fullDescription": "Static fields that are neither constants nor read-only are not thread-safe. Access to such a field must be carefully controlled and requires advanced programming techniques to synchronize access to the class object.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2211", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "NonConstantFieldsShouldNotBeVisibleAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2214": { "id": "CA2214", "shortDescription": "Do not call overridable methods in constructors", "fullDescription": "Virtual methods defined on the class should not be called from constructors. If a derived class has overridden the method, the derived class version will be called (before the derived class constructor is called).", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2214", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "DoNotCallOverridableMethodsInConstructorsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2217": { "id": "CA2217", "shortDescription": "Do not mark enums with FlagsAttribute", "fullDescription": "An externally visible enumeration is marked by using FlagsAttribute, and it has one or more values that are not powers of two or a combination of the other defined values on the enumeration.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2217", "properties": { "category": "Usage", "isEnabledByDefault": false, "typeName": "EnumWithFlagsAttributeAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2219": { "id": "CA2219", "shortDescription": "Do not raise exceptions in finally clauses", "fullDescription": "When an exception is raised in a finally clause, the new exception hides the active exception. This makes the original error difficult to detect and debug.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2219", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "DoNotRaiseExceptionsInExceptionClausesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2225": { "id": "CA2225", "shortDescription": "Operator overloads have named alternates", "fullDescription": "An operator overload was detected, and the expected named alternative method was not found. The named alternative member provides access to the same functionality as the operator and is provided for developers who program in languages that do not support overloaded operators.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2225", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "OperatorOverloadsHaveNamedAlternatesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2226": { "id": "CA2226", "shortDescription": "Operators should have symmetrical overloads", "fullDescription": "A type implements the equality or inequality operator and does not implement the opposite operator.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2226", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "OperatorsShouldHaveSymmetricalOverloadsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2227": { "id": "CA2227", "shortDescription": "Collection properties should be read only", "fullDescription": "A writable collection property allows a user to replace the collection with a different collection. A read-only property stops the collection from being replaced but still allows the individual members to be set.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2227", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "CollectionPropertiesShouldBeReadOnlyAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2231": { "id": "CA2231", "shortDescription": "Overload operator equals on overriding value type Equals", "fullDescription": "In most programming languages there is no default implementation of the equality operator (==) for value types. If your programming language supports operator overloads, you should consider implementing the equality operator. Its behavior should be identical to that of Equals", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2231", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "OverloadOperatorEqualsOnOverridingValueTypeEqualsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2244": { "id": "CA2244", "shortDescription": "Do not duplicate indexed element initializations", "fullDescription": "Indexed elements in objects initializers must initialize unique elements. A duplicate index might overwrite a previous element initialization.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2244", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "AvoidDuplicateElementInitialization", "languages": [ "C#" ], "tags": [ "Telemetry" ] } }, "CA2245": { "id": "CA2245", "shortDescription": "Do not assign a property to itself.", "fullDescription": "The property {0} should not be assigned to itself.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2245", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "AvoidPropertySelfAssignment", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2246": { "id": "CA2246", "shortDescription": "Assigning symbol and its member in the same statement.", "fullDescription": "Assigning to a symbol and its member (field/property) in the same statement is not recommended. It is not clear if the member access was intended to use symbol's old value prior to the assignment or new value from the assignment in this statement. For clarity, consider splitting the assignments into separate statements.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2246", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "AssigningSymbolAndItsMemberInSameStatement", "languages": [ "C#" ], "tags": [ "Telemetry" ] } } } }, { "tool": { "name": "Microsoft.CodeQuality.CSharp.Analyzers", "version": "3.0.0", "language": "en-US" }, "rules": { "CA1001": { "id": "CA1001", "shortDescription": "Types that own disposable fields should be disposable", "fullDescription": "A class declares and implements an instance field that is a System.IDisposable type, and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1001", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "CSharpTypesThatOwnDisposableFieldsShouldBeDisposableAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1003": { "id": "CA1003", "shortDescription": "Use generic event handler instances", "fullDescription": "A type contains an event that declares an EventHandler delegate that returns void, whose signature contains two parameters (the first an object and the second a type that is assignable to EventArgs), and the containing assembly targets Microsoft .NET Framework?2.0.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1003", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "CSharpUseGenericEventHandlerInstancesAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1019": { "id": "CA1019", "shortDescription": "Define accessors for attribute arguments", "fullDescription": "Remove the property setter from {0} or reduce its accessibility because it corresponds to positional argument {1}.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1019", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "CSharpDefineAccessorsForAttributeArgumentsAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1032": { "id": "CA1032", "shortDescription": "Implement standard exception constructors", "fullDescription": "Failure to provide the full set of constructors can make it difficult to correctly handle exceptions.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1032", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "CSharpImplementStandardExceptionConstructorsAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1065": { "id": "CA1065", "shortDescription": "Do not raise exceptions in unexpected locations", "fullDescription": "A method that is not expected to throw exceptions throws an exception.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1065", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "CSharpDoNotRaiseExceptionsInUnexpectedLocationsAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1200": { "id": "CA1200", "shortDescription": "Avoid using cref tags with a prefix", "fullDescription": "Use of cref tags with prefixes should be avoided, since it prevents the compiler from verifying references and the IDE from updating references during refactorings. It is permissible to suppress this error at a single documentation site if the cref must use a prefix because the type being mentioned is not findable by the compiler. For example, if a cref is mentioning a special attribute in the full framework but you're in a file that compiles against the portable framework, or if you want to reference a type at higher layer of Roslyn, you should suppress the error. You should not suppress the error just because you want to take a shortcut and avoid using the full syntax.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1200", "properties": { "category": "Documentation", "isEnabledByDefault": true, "typeName": "CSharpAvoidUsingCrefTagsWithAPrefixAnalyzer", "languages": [ "C#" ], "tags": [ "Telemetry" ] } }, "CA1507": { "id": "CA1507", "shortDescription": "Use nameof to express symbol names", "fullDescription": "Using nameof helps keep your code valid when refactoring.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1507", "properties": { "category": "Maintainability", "isEnabledByDefault": true, "typeName": "CSharpUseNameofInPlaceOfStringAnalyzer", "languages": [ "C#" ], "tags": [ "Telemetry" ] } }, "CA2200": { "id": "CA2200", "shortDescription": "Rethrow to preserve stack details.", "fullDescription": "Re-throwing caught exception changes stack information.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2200", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "CSharpRethrowToPreserveStackDetailsAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2234": { "id": "CA2234", "shortDescription": "Pass system uri objects instead of strings", "fullDescription": "A call is made to a method that has a string parameter whose name contains \"uri\", \"URI\", \"urn\", \"URN\", \"url\", or \"URL\". The declaring type of the method contains a corresponding method overload that has a System.Uri parameter.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2234", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "CSharpPassSystemUriObjectsInsteadOfStringsAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } } } }, { "tool": { "name": "Microsoft.CodeQuality.VisualBasic.Analyzers", "version": "3.0.0", "language": "en-US" }, "rules": { "CA1001": { "id": "CA1001", "shortDescription": "Types that own disposable fields should be disposable", "fullDescription": "A class declares and implements an instance field that is a System.IDisposable type, and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1001", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "BasicTypesThatOwnDisposableFieldsShouldBeDisposableAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1003": { "id": "CA1003", "shortDescription": "Use generic event handler instances", "fullDescription": "A type contains an event that declares an EventHandler delegate that returns void, whose signature contains two parameters (the first an object and the second a type that is assignable to EventArgs), and the containing assembly targets Microsoft .NET Framework?2.0.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1003", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "BasicUseGenericEventHandlerInstancesAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1019": { "id": "CA1019", "shortDescription": "Define accessors for attribute arguments", "fullDescription": "Remove the property setter from {0} or reduce its accessibility because it corresponds to positional argument {1}.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1019", "properties": { "category": "Design", "isEnabledByDefault": false, "typeName": "BasicDefineAccessorsForAttributeArgumentsAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1032": { "id": "CA1032", "shortDescription": "Implement standard exception constructors", "fullDescription": "Failure to provide the full set of constructors can make it difficult to correctly handle exceptions.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1032", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "BasicImplementStandardExceptionConstructorsAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1065": { "id": "CA1065", "shortDescription": "Do not raise exceptions in unexpected locations", "fullDescription": "A method that is not expected to throw exceptions throws an exception.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1065", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "BasicDoNotRaiseExceptionsInUnexpectedLocationsAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1200": { "id": "CA1200", "shortDescription": "Avoid using cref tags with a prefix", "fullDescription": "Use of cref tags with prefixes should be avoided, since it prevents the compiler from verifying references and the IDE from updating references during refactorings. It is permissible to suppress this error at a single documentation site if the cref must use a prefix because the type being mentioned is not findable by the compiler. For example, if a cref is mentioning a special attribute in the full framework but you're in a file that compiles against the portable framework, or if you want to reference a type at higher layer of Roslyn, you should suppress the error. You should not suppress the error just because you want to take a shortcut and avoid using the full syntax.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1200", "properties": { "category": "Documentation", "isEnabledByDefault": true, "typeName": "BasicAvoidUsingCrefTagsWithAPrefixAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA1507": { "id": "CA1507", "shortDescription": "Use nameof to express symbol names", "fullDescription": "Using nameof helps keep your code valid when refactoring.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1507", "properties": { "category": "Maintainability", "isEnabledByDefault": true, "typeName": "BasicUseNameofInPlaceOfStringAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2200": { "id": "CA2200", "shortDescription": "Rethrow to preserve stack details.", "fullDescription": "Re-throwing caught exception changes stack information.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2200", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "BasicRethrowToPreserveStackDetailsAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2218": { "id": "CA2218", "shortDescription": "Override GetHashCode on overriding Equals", "fullDescription": "GetHashCode returns a value, based on the current instance, that is suited for hashing algorithms and data structures such as a hash table. Two objects that are the same type and are equal must return the same hash code.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2218", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "BasicOverrideGetHashCodeOnOverridingEqualsAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2224": { "id": "CA2224", "shortDescription": "Override Equals on overloading operator equals", "fullDescription": "A public type implements the equality operator but does not override Object.Equals.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2224", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "BasicOverrideEqualsOnOverloadingOperatorEqualsAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2234": { "id": "CA2234", "shortDescription": "Pass system uri objects instead of strings", "fullDescription": "A call is made to a method that has a string parameter whose name contains \"uri\", \"URI\", \"urn\", \"URN\", \"url\", or \"URL\". The declaring type of the method contains a corresponding method overload that has a System.Uri parameter.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2234", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "BasicPassSystemUriObjectsInsteadOfStringsAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } } } }, { "tool": { "name": "Microsoft.NetCore.Analyzers", "version": "3.0.0", "language": "en-US" }, "rules": { "CA1303": { "id": "CA1303", "shortDescription": "Do not pass literals as localized parameters", "fullDescription": "A method passes a string literal as a parameter to a constructor or method in the .NET Framework class library and that string should be localizable. To fix a violation of this rule, replace the string literal with a string retrieved through an instance of the ResourceManager class.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1303", "properties": { "category": "Globalization", "isEnabledByDefault": true, "typeName": "DoNotPassLiteralsAsLocalizedParameters", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Dataflow", "Telemetry" ] } }, "CA1304": { "id": "CA1304", "shortDescription": "Specify CultureInfo", "fullDescription": "A method or constructor calls a member that has an overload that accepts a System.Globalization.CultureInfo parameter, and the method or constructor does not call the overload that takes the CultureInfo parameter. When a CultureInfo or System.IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'CultureInfo' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1304", "properties": { "category": "Globalization", "isEnabledByDefault": true, "typeName": "SpecifyCultureInfoAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1305": { "id": "CA1305", "shortDescription": "Specify IFormatProvider", "fullDescription": "A method or constructor calls one or more members that have overloads that accept a System.IFormatProvider parameter, and the method or constructor does not call the overload that takes the IFormatProvider parameter. When a System.Globalization.CultureInfo or IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be based on the input from/output displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider'. Otherwise, if the result will be stored and accessed by software, such as when it is loaded from disk/database and when it is persisted to disk/database, specify 'CultureInfo.InvariantCulture'", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1305", "properties": { "category": "Globalization", "isEnabledByDefault": true, "typeName": "SpecifyIFormatProviderAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1307": { "id": "CA1307", "shortDescription": "Specify StringComparison", "fullDescription": "A string comparison operation uses a method overload that does not set a StringComparison parameter. If the result will be displayed to the user, such as when sorting a list of items for display in a list box, specify 'StringComparison.CurrentCulture' or 'StringComparison.CurrentCultureIgnoreCase' as the 'StringComparison' parameter. If comparing case-insensitive identifiers, such as file paths, environment variables, or registry keys and values, specify 'StringComparison.OrdinalIgnoreCase'. Otherwise, if comparing case-sensitive identifiers, specify 'StringComparison.Ordinal'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1307", "properties": { "category": "Globalization", "isEnabledByDefault": true, "typeName": "SpecifyStringComparisonAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1308": { "id": "CA1308", "shortDescription": "Normalize strings to uppercase", "fullDescription": "Strings should be normalized to uppercase. A small group of characters cannot make a round trip when they are converted to lowercase. To make a round trip means to convert the characters from one locale to another locale that represents character data differently, and then to accurately retrieve the original characters from the converted characters.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1308", "properties": { "category": "Globalization", "isEnabledByDefault": true, "typeName": "NormalizeStringsToUppercaseAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1401": { "id": "CA1401", "shortDescription": "P/Invokes should not be visible", "fullDescription": "A public or protected method in a public type has the System.Runtime.InteropServices.DllImportAttribute attribute (also implemented by the Declare keyword in Visual Basic). Such methods should not be exposed.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1401", "properties": { "category": "Interoperability", "isEnabledByDefault": true, "typeName": "PInvokeDiagnosticAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1813": { "id": "CA1813", "shortDescription": "Avoid unsealed attributes", "fullDescription": "The .NET Framework class library provides methods for retrieving custom attributes. By default, these methods search the attribute inheritance hierarchy. Sealing the attribute eliminates the search through the inheritance hierarchy and can improve performance.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1813", "properties": { "category": "Performance", "isEnabledByDefault": false, "typeName": "AvoidUnsealedAttributesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1816": { "id": "CA1816", "shortDescription": "Dispose methods should call SuppressFinalize", "fullDescription": "A method that is an implementation of Dispose does not call GC.SuppressFinalize; or a method that is not an implementation of Dispose calls GC.SuppressFinalize; or a method calls GC.SuppressFinalize and passes something other than this (Me in Visual?Basic).", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1816", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "CallGCSuppressFinalizeCorrectlyAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1820": { "id": "CA1820", "shortDescription": "Test for empty strings using string length", "fullDescription": "Comparing strings by using the String.Length property or the String.IsNullOrEmpty method is significantly faster than using Equals.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1820", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "TestForEmptyStringsUsingStringLengthAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1826": { "id": "CA1826", "shortDescription": "Do not use Enumerable methods on indexable collections. Instead use the collection directly", "fullDescription": "This collection is directly indexable. Going through LINQ here causes unnecessary allocations and CPU work.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1826", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectlyAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA1827": { "id": "CA1827", "shortDescription": "Do not use Count() or LongCount() when Any() can be used", "fullDescription": "For non-empty collections, Count() and LongCount() enumerate the entire sequence, while Any() stops at the first item or the first item that satisfies a condition.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1827", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "DoNotUseCountWhenAnyCanBeUsedAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA1828": { "id": "CA1828", "shortDescription": "Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used", "fullDescription": "For non-empty collections, CountAsync() and LongCountAsync() enumerate the entire sequence, while AnyAsync() stops at the first item or the first item that satisfies a condition.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1828", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "DoNotUseCountWhenAnyCanBeUsedAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2000": { "id": "CA2000", "shortDescription": "Dispose objects before losing scope", "fullDescription": "If a disposable object is not explicitly disposed before all references to it are out of scope, the object will be disposed at some indeterminate time when the garbage collector runs the finalizer of the object. Because an exceptional event might occur that will prevent the finalizer of the object from running, the object should be explicitly disposed instead.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2000", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "DisposeObjectsBeforeLosingScope", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Dataflow", "Telemetry" ] } }, "CA2002": { "id": "CA2002", "shortDescription": "Do not lock on objects with weak identity", "fullDescription": "An object is said to have a weak identity when it can be directly accessed across application domain boundaries. A thread that tries to acquire a lock on an object that has a weak identity can be blocked by a second thread in a different application domain that has a lock on the same object.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2002", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "DoNotLockOnObjectsWithWeakIdentityAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2008": { "id": "CA2008", "shortDescription": "Do not create tasks without passing a TaskScheduler", "fullDescription": "Do not create tasks unless you are using one of the overloads that takes a TaskScheduler. The default is to schedule on TaskScheduler.Current, which would lead to deadlocks. Either use TaskScheduler.Default to schedule on the thread pool, or explicitly pass TaskScheduler.Current to make your intentions clear.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2008", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "DoNotCreateTasksWithoutPassingATaskSchedulerAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2009": { "id": "CA2009", "shortDescription": "Do not call ToImmutableCollection on an ImmutableCollection value", "fullDescription": "Do not call {0} on an {1} value", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2009", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "DoNotCallToImmutableCollectionOnAnImmutableCollectionValueAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2012": { "id": "CA2012", "shortDescription": "Use ValueTasks correctly", "fullDescription": "ValueTasks returned from member invocations are intended to be directly awaited. Attempts to consume a ValueTask multiple times or to directly access one's result before it's known to be completed may result in an exception or corruption. Ignoring such a ValueTask is likely an indication of a functional bug and may degrade performance.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2012", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "UseValueTasksCorrectlyAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2013": { "id": "CA2013", "shortDescription": "Do not use ReferenceEquals with value types", "fullDescription": "Value type typed arguments are uniquely boxed for each call to this method, therefore the result is always false.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2013", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "DoNotUseReferenceEqualsWithValueTypesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2100": { "id": "CA2100", "shortDescription": "Review SQL queries for security vulnerabilities", "fullDescription": "SQL queries that directly use user input can be vulnerable to SQL injection attacks. Review this SQL query for potential vulnerabilities, and consider using a parameterized SQL query.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2100", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "ReviewSqlQueriesForSecurityVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Dataflow", "Telemetry" ] } }, "CA2101": { "id": "CA2101", "shortDescription": "Specify marshaling for P/Invoke string arguments", "fullDescription": "A platform invoke member allows partially trusted callers, has a string parameter, and does not explicitly marshal the string. This can cause a potential security vulnerability.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2101", "properties": { "category": "Globalization", "isEnabledByDefault": true, "typeName": "PInvokeDiagnosticAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2201": { "id": "CA2201", "shortDescription": "Do not raise reserved exception types", "fullDescription": "An exception of type that is not sufficiently specific or reserved by the runtime should never be raised by user code. This makes the original error difficult to detect and debug. If this exception instance might be thrown, use a different exception type.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2201", "properties": { "category": "Usage", "isEnabledByDefault": false, "typeName": "DoNotRaiseReservedExceptionTypesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2208": { "id": "CA2208", "shortDescription": "Instantiate argument exceptions correctly", "fullDescription": "A call is made to the default (parameterless) constructor of an exception type that is or derives from ArgumentException, or an incorrect string argument is passed to a parameterized constructor of an exception type that is or derives from ArgumentException.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2208", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "InstantiateArgumentExceptionsCorrectlyAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2213": { "id": "CA2213", "shortDescription": "Disposable fields should be disposed", "fullDescription": "A type that implements System.IDisposable declares fields that are of types that also implement IDisposable. The Dispose method of the field is not called by the Dispose method of the declaring type. To fix a violation of this rule, call Dispose on fields that are of types that implement IDisposable if you are responsible for allocating and releasing the unmanaged resources held by the field.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2213", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "DisposableFieldsShouldBeDisposed", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Dataflow", "Telemetry" ] } }, "CA2215": { "id": "CA2215", "shortDescription": "Dispose methods should call base class dispose", "fullDescription": "A type that implements System.IDisposable inherits from a type that also implements IDisposable. The Dispose method of the inheriting type does not call the Dispose method of the parent type. To fix a violation of this rule, call base.Dispose in your Dispose method.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2215", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "DisposeMethodsShouldCallBaseClassDispose", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2216": { "id": "CA2216", "shortDescription": "Disposable types should declare finalizer", "fullDescription": "A type that implements System.IDisposable and has fields that suggest the use of unmanaged resources does not implement a finalizer, as described by Object.Finalize.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2216", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "DisposableTypesShouldDeclareFinalizerAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2229": { "id": "CA2229", "shortDescription": "Implement serialization constructors", "fullDescription": "To fix a violation of this rule, implement the serialization constructor. For a sealed class, make the constructor private; otherwise, make it protected.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2229", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "SerializationRulesDiagnosticAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2235": { "id": "CA2235", "shortDescription": "Mark all non-serializable fields", "fullDescription": "An instance field of a type that is not serializable is declared in a type that is serializable.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2235", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "SerializationRulesDiagnosticAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2237": { "id": "CA2237", "shortDescription": "Mark ISerializable types with serializable", "fullDescription": "To be recognized by the common language runtime as serializable, types must be marked by using the SerializableAttribute attribute even when the type uses a custom serialization routine through implementation of the ISerializable interface.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2237", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "SerializationRulesDiagnosticAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2241": { "id": "CA2241", "shortDescription": "Provide correct arguments to formatting methods", "fullDescription": "The format argument that is passed to System.String.Format does not contain a format item that corresponds to each object argument, or vice versa.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2241", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "ProvideCorrectArgumentsToFormattingMethodsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2242": { "id": "CA2242", "shortDescription": "Test for NaN correctly", "fullDescription": "This expression tests a value against Single.Nan or Double.Nan. Use Single.IsNan(Single) or Double.IsNan(Double) to test the value.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2242", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "TestForNaNCorrectlyAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2243": { "id": "CA2243", "shortDescription": "Attribute string literals should parse correctly", "fullDescription": "The string literal parameter of an attribute does not parse correctly for a URL, a GUID, or a version.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2243", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "AttributeStringLiteralsShouldParseCorrectlyAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2300": { "id": "CA2300", "shortDescription": "Do not use insecure deserializer BinaryFormatter", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect BinaryFormatter deserialization without a SerializationBinder set, then disable rule CA2300, and enable rules CA2301 and CA2302.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2300", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerBinaryFormatterMethods", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2301": { "id": "CA2301", "shortDescription": "Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2301", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerBinaryFormatterWithoutBinder", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA2302": { "id": "CA2302", "shortDescription": "Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2302", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerBinaryFormatterWithoutBinder", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA2305": { "id": "CA2305", "shortDescription": "Do not use insecure deserializer LosFormatter", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2305", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerLosFormatter", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2310": { "id": "CA2310", "shortDescription": "Do not use insecure deserializer NetDataContractSerializer", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect NetDataContractSerializer deserialization without a SerializationBinder set, then disable rule CA2310, and enable rules CA2311 and CA2312.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2310", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerNetDataContractSerializerMethods", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2311": { "id": "CA2311", "shortDescription": "Do not deserialize without first setting NetDataContractSerializer.Binder", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2311", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerNetDataContractSerializerWithoutBinder", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA2312": { "id": "CA2312", "shortDescription": "Ensure NetDataContractSerializer.Binder is set before deserializing", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2312", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerNetDataContractSerializerWithoutBinder", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA2315": { "id": "CA2315", "shortDescription": "Do not use insecure deserializer ObjectStateFormatter", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2315", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerObjectStateFormatter", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2321": { "id": "CA2321", "shortDescription": "Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Initialize JavaScriptSerializer without a JavaScriptTypeResolver specified, or initialize with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2321", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerJavaScriptSerializerWithSimpleTypeResolver", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA2322": { "id": "CA2322", "shortDescription": "Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing", "fullDescription": "The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Ensure that the JavaScriptSerializer is initialized without a JavaScriptTypeResolver specified, or initialized with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2322", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerJavaScriptSerializerWithSimpleTypeResolver", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA2326": { "id": "CA2326", "shortDescription": "Do not use TypeNameHandling values other than None", "fullDescription": "Deserializing JSON when using a TypeNameHandling value other than None can be insecure. If you need to instead detect Json.NET deserialization when a SerializationBinder isn't specified, then disable rule CA2326, and enable rules CA2327, CA2328, CA2329, and CA2330.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2326", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "JsonNetTypeNameHandling", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2327": { "id": "CA2327", "shortDescription": "Do not use insecure JsonSerializerSettings", "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2327", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureSettingsForJsonNet", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA2328": { "id": "CA2328", "shortDescription": "Ensure that JsonSerializerSettings are secure", "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, ensure TypeNameHandling.None is specified, or for values other than None, ensure a SerializationBinder is specified to restrict deserialized types.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2328", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureSettingsForJsonNet", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA2329": { "id": "CA2329", "shortDescription": "Do not deserialize with JsonSerializer using an insecure configuration", "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2329", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerJsonNetWithoutBinder", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA2330": { "id": "CA2330", "shortDescription": "Ensure that JsonSerializer has a secure configuration when deserializing", "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2330", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureDeserializerJsonNetWithoutBinder", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3001": { "id": "CA3001", "shortDescription": "Review code for SQL injection vulnerabilities", "fullDescription": "Potential SQL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3001", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForSqlInjectionVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3002": { "id": "CA3002", "shortDescription": "Review code for XSS vulnerabilities", "fullDescription": "Potential cross-site scripting (XSS) vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3002", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForXssVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3003": { "id": "CA3003", "shortDescription": "Review code for file path injection vulnerabilities", "fullDescription": "Potential file path injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3003", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForFilePathInjectionVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3004": { "id": "CA3004", "shortDescription": "Review code for information disclosure vulnerabilities", "fullDescription": "Potential information disclosure vulnerability was found where '{0}' in method '{1}' may contain unintended information from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3004", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForInformationDisclosureVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3005": { "id": "CA3005", "shortDescription": "Review code for LDAP injection vulnerabilities", "fullDescription": "Potential LDAP injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3005", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForLdapInjectionVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3006": { "id": "CA3006", "shortDescription": "Review code for process command injection vulnerabilities", "fullDescription": "Potential process command injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3006", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForCommandExecutionVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3007": { "id": "CA3007", "shortDescription": "Review code for open redirect vulnerabilities", "fullDescription": "Potential open redirect vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3007", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForOpenRedirectVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3008": { "id": "CA3008", "shortDescription": "Review code for XPath injection vulnerabilities", "fullDescription": "Potential XPath injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3008", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForXPathInjectionVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3009": { "id": "CA3009", "shortDescription": "Review code for XML injection vulnerabilities", "fullDescription": "Potential XML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3009", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForXmlInjectionVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3010": { "id": "CA3010", "shortDescription": "Review code for XAML injection vulnerabilities", "fullDescription": "Potential XAML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3010", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForXamlInjectionVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3011": { "id": "CA3011", "shortDescription": "Review code for DLL injection vulnerabilities", "fullDescription": "Potential DLL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3011", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForDllInjectionVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3012": { "id": "CA3012", "shortDescription": "Review code for regex injection vulnerabilities", "fullDescription": "Potential regex injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3012", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ReviewCodeForRegexInjectionVulnerabilities", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA3061": { "id": "CA3061", "shortDescription": "Do Not Add Schema By URL", "fullDescription": "This overload of XmlSchemaCollection.Add method internally enables DTD processing on the XML reader instance used, and uses UrlResolver for resolving external XML entities. The outcome is information disclosure. Content from file system or network shares for the machine processing the XML can be exposed to attacker. In addition, an attacker can use this as a DoS vector.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3061", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotAddSchemaByURL", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5350": { "id": "CA5350", "shortDescription": "Do Not Use Weak Cryptographic Algorithms", "fullDescription": "Cryptographic algorithms degrade over time as attacks become for advances to attacker get access to more computation. Depending on the type and application of this cryptographic algorithm, further degradation of the cryptographic strength of it may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA-2 512, SHA-2 384, or SHA-2 256.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5350", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotUseInsecureCryptographicAlgorithmsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5351": { "id": "CA5351", "shortDescription": "Do Not Use Broken Cryptographic Algorithms", "fullDescription": "An attack making it computationally feasible to break this algorithm exists. This allows attackers to break the cryptographic guarantees it is designed to provide. Depending on the type and application of this cryptographic algorithm, this may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA512, SHA384, or SHA256. Replace digital signature uses with RSA with a key length greater than or equal to 2048-bits, or ECDSA with a key length greater than or equal to 256 bits.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5351", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotUseInsecureCryptographicAlgorithmsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5358": { "id": "CA5358", "shortDescription": "Review cipher mode usage with cryptography experts", "fullDescription": "These cipher modes might be vulnerable to attacks. Consider using recommended modes (CBC, CTS).", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5358", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "ApprovedCipherModeAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5359": { "id": "CA5359", "shortDescription": "Do Not Disable Certificate Validation", "fullDescription": "A certificate can help authenticate the identity of the server. Clients should validate the server certificate to ensure requests are sent to the intended server. If the ServerCertificateValidationCallback always returns 'true', any certificate will pass validation.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5359", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotDisableCertificateValidation", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5360": { "id": "CA5360", "shortDescription": "Do Not Call Dangerous Methods In Deserialization", "fullDescription": "Insecure Deserialization is a vulnerability which occurs when untrusted data is used to abuse the logic of an application, inflict a Denial-of-Service (DoS) attack, or even execute arbitrary code upon it being deserialized. It’s frequently possible for malicious users to abuse these deserialization features when the application is deserializing untrusted data which is under their control. Specifically, invoke dangerous methods in the process of deserialization. Successful insecure deserialization attacks could allow an attacker to carry out attacks such as DoS attacks, authentication bypasses, and remote code execution.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5360", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotCallDangerousMethodsInDeserialization", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5361": { "id": "CA5361", "shortDescription": "Do Not Disable SChannel Use of Strong Crypto", "fullDescription": "Starting with the .NET Framework 4.6, the System.Net.ServicePointManager and System.Net.Security.SslStream classes are recommeded to use new protocols. The old ones have protocol weaknesses and are not supported. Setting Switch.System.Net.DontEnableSchUseStrongCrypto with true will use the old weak crypto check and opt out of the protocol migration.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5361", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotSetSwitch", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5362": { "id": "CA5362", "shortDescription": "Do Not Refer Self In Serializable Class", "fullDescription": "This can allow an attacker to DOS or exhaust the memory of the process.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5362", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotReferSelfInSerializableClass", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5363": { "id": "CA5363", "shortDescription": "Do Not Disable Request Validation", "fullDescription": "Request validation is a feature in ASP.NET that examines HTTP requests and determines whether they contain potentially dangerous content. This check adds protection from markup or code in the URL query string, cookies, or posted form values that might have been added for malicious purposes. So, it is generally desirable and should be left enabled for defense in depth.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5363", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotDisableRequestValidation", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5364": { "id": "CA5364", "shortDescription": "Do Not Use Deprecated Security Protocols", "fullDescription": "Using a deprecated security protocol rather than the system default is risky.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5364", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotUseDeprecatedSecurityProtocols", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5365": { "id": "CA5365", "shortDescription": "Do Not Disable HTTP Header Checking", "fullDescription": "HTTP header checking enables encoding of the carriage return and newline characters, \\r and \\n, that are found in response headers. This encoding can help to avoid injection attacks that exploit an application that echoes untrusted data contained by the header.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5365", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotDisableHTTPHeaderChecking", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5366": { "id": "CA5366", "shortDescription": "Use XmlReader For DataSet Read Xml", "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5366", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "UseXmlReaderForDataSetReadXml", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5367": { "id": "CA5367", "shortDescription": "Do Not Serialize Types With Pointer Fields", "fullDescription": "Pointers are not \"type safe\" in the sense that you cannot guarantee the correctness of the memory they point at. So, serializing types with pointer fields is dangerous, as it may allow an attacker to control the pointer.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5367", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotSerializeTypeWithPointerFields", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5368": { "id": "CA5368", "shortDescription": "Set ViewStateUserKey For Classes Derived From Page", "fullDescription": "Setting the ViewStateUserKey property can help you prevent attacks on your application by allowing you to assign an identifier to the view-state variable for individual users so that they cannot use the variable to generate an attack. Otherwise, there will be cross-site request forgery vulnerabilities.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5368", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "SetViewStateUserKey", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5369": { "id": "CA5369", "shortDescription": "Use XmlReader For Deserialize", "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5369", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "UseXmlReaderForDeserialize", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5370": { "id": "CA5370", "shortDescription": "Use XmlReader For Validating Reader", "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5370", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "UseXmlReaderForValidatingReader", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5371": { "id": "CA5371", "shortDescription": "Use XmlReader For Schema Read", "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5371", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "UseXmlReaderForSchemaRead", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5372": { "id": "CA5372", "shortDescription": "Use XmlReader For XPathDocument", "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5372", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "UseXmlReaderForXPathDocument", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5373": { "id": "CA5373", "shortDescription": "Do not use obsolete key derivation function", "fullDescription": "Password-based key derivation should use PBKDF2 with SHA-2. Avoid using PasswordDeriveBytes since it generates a PBKDF1 key. Avoid using Rfc2898DeriveBytes.CryptDeriveKey since it doesn't use the iteration count or salt.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5373", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotUseObsoleteKDFAlgorithm", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5374": { "id": "CA5374", "shortDescription": "Do Not Use XslTransform", "fullDescription": "Do not use XslTransform. It does not restrict potentially dangerous external references.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5374", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotUseXslTransform", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5375": { "id": "CA5375", "shortDescription": "Do Not Use Account Shared Access Signature", "fullDescription": "Shared Access Signatures(SAS) are a vital part of the security model for any application using Azure Storage, they should provide limited and safe permissions to your storage account to clients that don't have the account key. All of the operations available via a service SAS are also available via an account SAS, that is, account SAS is too powerful. So it is recommended to use Service SAS to delegate access more carefully.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5375", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseAccountSAS", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5376": { "id": "CA5376", "shortDescription": "Use SharedAccessProtocol HttpsOnly", "fullDescription": "HTTPS encrypts network traffic. Use HttpsOnly, rather than HttpOrHttps, to ensure network traffic is always encrypted to help prevent disclosure of sensitive data.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5376", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "UseSharedAccessProtocolHttpsOnly", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5377": { "id": "CA5377", "shortDescription": "Use Container Level Access Policy", "fullDescription": "No access policy identifier is specified, making tokens non-revocable.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5377", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "UseContainerLevelAccessPolicy", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5378": { "id": "CA5378", "shortDescription": "Do not disable ServicePointManagerSecurityProtocols", "fullDescription": "Do not set Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols to true. Setting this switch limits Windows Communication Framework (WCF) to using Transport Layer Security (TLS) 1.0, which is insecure and obsolete.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5378", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotSetSwitch", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5379": { "id": "CA5379", "shortDescription": "Do Not Use Weak Key Derivation Function Algorithm", "fullDescription": "Some implementations of the Rfc2898DeriveBytes class allow for a hash algorithm to be specified in a constructor parameter or overwritten in the HashAlgorithm property. If a hash algorithm is specified, then it should be SHA-256 or higher.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5379", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotUseWeakKDFAlgorithm", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5380": { "id": "CA5380", "shortDescription": "Do Not Add Certificates To Root Store", "fullDescription": "By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5380", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotInstallRootCert", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5381": { "id": "CA5381", "shortDescription": "Ensure Certificates Are Not Added To Root Store", "fullDescription": "By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5381", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotInstallRootCert", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5382": { "id": "CA5382", "shortDescription": "Use Secure Cookies In ASP.Net Core", "fullDescription": "Applications available over HTTPS must use secure cookies.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5382", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "UseSecureCookiesASPNetCore", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5383": { "id": "CA5383", "shortDescription": "Ensure Use Secure Cookies In ASP.Net Core", "fullDescription": "Applications available over HTTPS must use secure cookies.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5383", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "UseSecureCookiesASPNetCore", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5384": { "id": "CA5384", "shortDescription": "Do Not Use Digital Signature Algorithm (DSA)", "fullDescription": "DSA is too weak to use.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5384", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotUseDSA", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5385": { "id": "CA5385", "shortDescription": "Use Rivest–Shamir–Adleman (RSA) Algorithm With Sufficient Key Size", "fullDescription": "Encryption algorithms are vulnerable to brute force attacks when too small a key size is used.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5385", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "UseRSAWithSufficientKeySize", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5386": { "id": "CA5386", "shortDescription": "Avoid hardcoding SecurityProtocolType value", "fullDescription": "Avoid hardcoding SecurityProtocolType {0}, and instead use SecurityProtocolType.SystemDefault to allow the operating system to choose the best Transport Layer Security protocol to use.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5386", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseDeprecatedSecurityProtocols", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5387": { "id": "CA5387", "shortDescription": "Do Not Use Weak Key Derivation Function With Insufficient Iteration Count", "fullDescription": "When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k).", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5387", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseWeakKDFInsufficientIterationCount", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5388": { "id": "CA5388", "shortDescription": "Ensure Sufficient Iteration Count When Using Weak Key Derivation Function", "fullDescription": "When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k).", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5388", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseWeakKDFInsufficientIterationCount", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5389": { "id": "CA5389", "shortDescription": "Do Not Add Archive Item's Path To The Target File System Path", "fullDescription": "When extracting files from an archive and using the archive item's path, check if the path is safe. Archive path can be relative and can lead to file system access outside of the expected file system target path, leading to malicious config changes and remote code execution via lay-and-wait technique.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5389", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotAddArchiveItemPathToTheTargetFileSystemPath", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5390": { "id": "CA5390", "shortDescription": "Do not hard-code encryption key", "fullDescription": "SymmetricAlgorithm's .Key property, or a method's rgbKey parameter, should never be a hard-coded value.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5390", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotHardCodeEncryptionKey", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5391": { "id": "CA5391", "shortDescription": "Use antiforgery tokens in ASP.NET Core MVC controllers", "fullDescription": "Handling a POST, PUT, PATCH, or DELETE request without validating an antiforgery token may be vulnerable to cross-site request forgery attacks. A cross-site request forgery attack can send malicious requests from an authenticated user to your ASP.NET Core MVC controller.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5391", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "UseAutoValidateAntiforgeryToken", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5392": { "id": "CA5392", "shortDescription": "Use DefaultDllImportSearchPaths attribute for P/Invokes", "fullDescription": "By default, P/Invokes using DllImportAttribute probe a number of directories, including the current working directory for the library to load. This can be a security issue for certain applications, leading to DLL hijacking.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5392", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "UseDefaultDllImportSearchPathsAttribute", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5393": { "id": "CA5393", "shortDescription": "Do not use unsafe DllImportSearchPath value", "fullDescription": "There could be a malicious DLL in the default DLL search directories. Or, depending on where your application is run from, there could be a malicious DLL in the application's directory. Use a DllImportSearchPath value that specifies an explicit search path instead. The DllImportSearchPath flags that this rule looks for can be configured in .editorconfig.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5393", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "UseDefaultDllImportSearchPathsAttribute", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5394": { "id": "CA5394", "shortDescription": "Do not use insecure randomness", "fullDescription": "Using a cryptographically weak pseudo-random number generator may allow an attacker to predict what security-sensitive value will be generated. Use a cryptographically strong random number generator if an unpredictable value is required, or ensure that weak pseudo-random numbers aren't used in a security-sensitive manner.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5394", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseInsecureRandomness", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5395": { "id": "CA5395", "shortDescription": "Miss HttpVerb attribute for action methods", "fullDescription": "All the methods that create, edit, delete, or otherwise modify data do so in the [HttpPost] overload of the method, which needs to be protected with the anti forgery attribute from request forgery. Performing a GET operation should be a safe operation that has no side effects and doesn't modify your persisted data.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5395", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "UseAutoValidateAntiforgeryToken", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5396": { "id": "CA5396", "shortDescription": "Set HttpOnly to true for HttpCookie", "fullDescription": "As a defense in depth measure, ensure security sensitive HTTP cookies are marked as HttpOnly. This indicates web browsers should disallow scripts from accessing the cookies. Injected malicious scripts are a common way of stealing cookies.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5396", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "SetHttpOnlyForHttpCookie", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5397": { "id": "CA5397", "shortDescription": "Do not use deprecated SslProtocols values", "fullDescription": "Older protocol versions of Transport Layer Security (TLS) are less secure than TLS 1.2 and TLS 1.3, and are more likely to have new vulnerabilities. Avoid older protocol versions to minimize risk.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5397", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "SslProtocolsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5398": { "id": "CA5398", "shortDescription": "Avoid hardcoded SslProtocols values", "fullDescription": "Current Transport Layer Security protocol versions may become deprecated if vulnerabilities are found. Avoid hardcoding SslProtocols values to keep your application secure. Use 'None' to let the Operating System choose a version.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5398", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "SslProtocolsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA5399": { "id": "CA5399", "shortDescription": "HttpClients should enable certificate revocation list checks", "fullDescription": "Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5399", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotDisableHttpClientCRLCheck", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5400": { "id": "CA5400", "shortDescription": "Ensure HttpClient certificate revocation list check is not disabled", "fullDescription": "Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5400", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotDisableHttpClientCRLCheck", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5401": { "id": "CA5401", "shortDescription": "Do not use CreateEncryptor with non-default IV", "fullDescription": "Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5401", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseCreateEncryptorWithNonDefaultIV", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5402": { "id": "CA5402", "shortDescription": "Use CreateEncryptor with the default IV ", "fullDescription": "Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5402", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotUseCreateEncryptorWithNonDefaultIV", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } }, "CA5403": { "id": "CA5403", "shortDescription": "Do not hard-code certificate", "fullDescription": "Hard-coded certificates in source code are vulnerable to being exploited.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca5403", "properties": { "category": "Security", "isEnabledByDefault": false, "typeName": "DoNotHardCodeCertificate", "languages": [ "C#", "Visual Basic" ], "tags": [ "Dataflow", "Telemetry" ] } } } }, { "tool": { "name": "Microsoft.NetCore.CSharp.Analyzers", "version": "3.0.0", "language": "en-US" }, "rules": { "CA1309": { "id": "CA1309", "shortDescription": "Use ordinal stringcomparison", "fullDescription": "A string comparison operation that is nonlinguistic does not set the StringComparison parameter to either Ordinal or OrdinalIgnoreCase. By explicitly setting the parameter to either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, your code often gains speed, becomes more correct, and becomes more reliable.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1309", "properties": { "category": "Globalization", "isEnabledByDefault": false, "typeName": "CSharpUseOrdinalStringComparisonAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1810": { "id": "CA1810", "shortDescription": "Initialize reference type static fields inline", "fullDescription": "A reference type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1810", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "CSharpInitializeStaticFieldsInlineAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1824": { "id": "CA1824", "shortDescription": "Mark assemblies with NeutralResourcesLanguageAttribute", "fullDescription": "The NeutralResourcesLanguage attribute informs the ResourceManager of the language that was used to display the resources of a neutral culture for an assembly. This improves lookup performance for the first resource that you load and can reduce your working set.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1824", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "CSharpMarkAssembliesWithNeutralResourcesLanguageAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1825": { "id": "CA1825", "shortDescription": "Avoid zero-length array allocations.", "fullDescription": "Avoid unnecessary zero-length array allocations. Use {0} instead.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1825", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "CSharpAvoidZeroLengthArrayAllocationsAnalyzer", "languages": [ "C#" ], "tags": [ "Telemetry" ] } }, "CA1829": { "id": "CA1829", "shortDescription": "Use Length/Count property instead of Count() when available", "fullDescription": "Enumerable.Count() potentially enumerates the sequence while a Length/Count property is a direct access.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1829", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "CSharpUsePropertyInsteadOfCountMethodWhenAvailableAnalyzer", "languages": [ "C#" ], "tags": [ "Telemetry" ] } }, "CA2010": { "id": "CA2010", "shortDescription": "Always consume the value returned by methods marked with PreserveSigAttribute", "fullDescription": "PreserveSigAttribute indicates that a method will return an HRESULT, rather than throwing an exception. Therefore, it is important to consume the HRESULT returned by the method, so that errors can be detected. Generally, this is done by calling Marshal.ThrowExceptionForHR.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2010", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "CSharpAlwaysConsumeTheValueReturnedByMethodsMarkedWithPreserveSigAttributeAnalyzer", "languages": [ "C#" ], "tags": [ "Telemetry" ] } }, "CA2207": { "id": "CA2207", "shortDescription": "Initialize value type static fields inline", "fullDescription": "A value type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2207", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "CSharpInitializeStaticFieldsInlineAnalyzer", "languages": [ "C#" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } } } }, { "tool": { "name": "Microsoft.NetCore.VisualBasic.Analyzers", "version": "3.0.0", "language": "en-US" }, "rules": { "CA1309": { "id": "CA1309", "shortDescription": "Use ordinal stringcomparison", "fullDescription": "A string comparison operation that is nonlinguistic does not set the StringComparison parameter to either Ordinal or OrdinalIgnoreCase. By explicitly setting the parameter to either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, your code often gains speed, becomes more correct, and becomes more reliable.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1309", "properties": { "category": "Globalization", "isEnabledByDefault": false, "typeName": "BasicUseOrdinalStringComparisonAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1810": { "id": "CA1810", "shortDescription": "Initialize reference type static fields inline", "fullDescription": "A reference type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1810", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "BasicInitializeStaticFieldsInlineAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1824": { "id": "CA1824", "shortDescription": "Mark assemblies with NeutralResourcesLanguageAttribute", "fullDescription": "The NeutralResourcesLanguage attribute informs the ResourceManager of the language that was used to display the resources of a neutral culture for an assembly. This improves lookup performance for the first resource that you load and can reduce your working set.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1824", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "BasicMarkAssembliesWithNeutralResourcesLanguageAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA1825": { "id": "CA1825", "shortDescription": "Avoid zero-length array allocations.", "fullDescription": "Avoid unnecessary zero-length array allocations. Use {0} instead.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1825", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "BasicAvoidZeroLengthArrayAllocationsAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA1829": { "id": "CA1829", "shortDescription": "Use Length/Count property instead of Count() when available", "fullDescription": "Enumerable.Count() potentially enumerates the sequence while a Length/Count property is a direct access.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1829", "properties": { "category": "Performance", "isEnabledByDefault": true, "typeName": "BasicUsePropertyInsteadOfCountMethodWhenAvailableAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2010": { "id": "CA2010", "shortDescription": "Always consume the value returned by methods marked with PreserveSigAttribute", "fullDescription": "PreserveSigAttribute indicates that a method will return an HRESULT, rather than throwing an exception. Therefore, it is important to consume the HRESULT returned by the method, so that errors can be detected. Generally, this is done by calling Marshal.ThrowExceptionForHR.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2010", "properties": { "category": "Reliability", "isEnabledByDefault": true, "typeName": "BasicAlwaysConsumeTheValueReturnedByMethodsMarkedWithPreserveSigAttributeAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA2207": { "id": "CA2207", "shortDescription": "Initialize value type static fields inline", "fullDescription": "A value type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2207", "properties": { "category": "Usage", "isEnabledByDefault": true, "typeName": "BasicInitializeStaticFieldsInlineAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } } } }, { "tool": { "name": "Microsoft.NetFramework.Analyzers", "version": "3.0.0", "language": "en-US" }, "rules": { "CA1058": { "id": "CA1058", "shortDescription": "Types should not extend certain base types", "fullDescription": "An externally visible type extends certain base types. Use one of the alternatives.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca1058", "properties": { "category": "Design", "isEnabledByDefault": true, "typeName": "TypesShouldNotExtendCertainBaseTypesAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "PortedFromFxCop", "Telemetry" ] } }, "CA2153": { "id": "CA2153", "shortDescription": "Do Not Catch Corrupted State Exceptions", "fullDescription": "Catching corrupted state exceptions could mask errors (such as access violations), resulting in inconsistent state of execution or making it easier for attackers to compromise system. Instead, catch and handle a more specific set of exception type(s) or re-throw the exception", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca2153", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotCatchCorruptedStateExceptionsAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA3075": { "id": "CA3075", "shortDescription": "Insecure DTD processing in XML", "fullDescription": "Using XmlTextReader.Load(), creating an insecure XmlReaderSettings instance when invoking XmlReader.Create(), setting the InnerXml property of the XmlDocument and enabling DTD processing using XmlUrlResolver insecurely can lead to information disclosure. Replace it with a call to the Load() method overload that takes an XmlReader instance, use XmlReader.Create() to accept XmlReaderSettings arguments or consider explicitly setting secure values. The DataViewSettingCollectionString property of DataViewManager should always be assigned from a trusted source, the DtdProcessing property should be set to false, and the XmlResolver property should be changed to XmlSecureResolver or null. ", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3075", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "DoNotUseInsecureDtdProcessingAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA3147": { "id": "CA3147", "shortDescription": "Mark Verb Handlers With Validate Antiforgery Token", "fullDescription": "Missing ValidateAntiForgeryTokenAttribute on controller action {0}.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3147", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "MarkVerbHandlersWithValidateAntiforgeryTokenAnalyzer", "languages": [ "C#", "Visual Basic" ], "tags": [ "Telemetry" ] } } } }, { "tool": { "name": "Microsoft.NetFramework.CSharp.Analyzers", "version": "3.0.0", "language": "en-US" }, "rules": { "CA3076": { "id": "CA3076", "shortDescription": "Insecure XSLT script processing.", "fullDescription": "Providing an insecure XsltSettings instance and an insecure XmlResolver instance to XslCompiledTransform.Load method is potentially unsafe as it allows processing script within XSL, which on an untrusted XSL input may lead to malicious code execution. Either replace the insecure XsltSettings argument with XsltSettings.Default or an instance that has disabled document function and script execution, or replace the XmlResolver argurment with null or an XmlSecureResolver instance. This message may be suppressed if the input is known to be from a trusted source and external resource resolution from locations that are not known in advance must be supported.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3076", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "CSharpDoNotUseInsecureXSLTScriptExecutionAnalyzer", "languages": [ "C#" ], "tags": [ "Telemetry" ] } }, "CA3077": { "id": "CA3077", "shortDescription": "Insecure Processing in API Design, XmlDocument and XmlTextReader", "fullDescription": "Enabling DTD processing on all instances derived from XmlTextReader or  XmlDocument and using XmlUrlResolver for resolving external XML entities may lead to information disclosure. Ensure to set the XmlResolver property to null, create an instance of XmlSecureResolver when processing untrusted input, or use XmlReader.Create method with a secure XmlReaderSettings argument. Unless you need to enable it, ensure the DtdProcessing property is set to false. ", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3077", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "CSharpDoNotUseInsecureDtdProcessingInApiDesignAnalyzer", "languages": [ "C#" ], "tags": [ "Telemetry" ] } } } }, { "tool": { "name": "Microsoft.NetFramework.VisualBasic.Analyzers", "version": "3.0.0", "language": "en-US" }, "rules": { "CA3076": { "id": "CA3076", "shortDescription": "Insecure XSLT script processing.", "fullDescription": "Providing an insecure XsltSettings instance and an insecure XmlResolver instance to XslCompiledTransform.Load method is potentially unsafe as it allows processing script within XSL, which on an untrusted XSL input may lead to malicious code execution. Either replace the insecure XsltSettings argument with XsltSettings.Default or an instance that has disabled document function and script execution, or replace the XmlResolver argurment with null or an XmlSecureResolver instance. This message may be suppressed if the input is known to be from a trusted source and external resource resolution from locations that are not known in advance must be supported.", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3076", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "BasicDoNotUseInsecureXSLTScriptExecutionAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "Telemetry" ] } }, "CA3077": { "id": "CA3077", "shortDescription": "Insecure Processing in API Design, XmlDocument and XmlTextReader", "fullDescription": "Enabling DTD processing on all instances derived from XmlTextReader or  XmlDocument and using XmlUrlResolver for resolving external XML entities may lead to information disclosure. Ensure to set the XmlResolver property to null, create an instance of XmlSecureResolver when processing untrusted input, or use XmlReader.Create method with a secure XmlReaderSettings argument. Unless you need to enable it, ensure the DtdProcessing property is set to false. ", "defaultLevel": "warning", "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/ca3077", "properties": { "category": "Security", "isEnabledByDefault": true, "typeName": "BasicDoNotUseInsecureDtdProcessingInApiDesignAnalyzer", "languages": [ "Visual Basic" ], "tags": [ "Telemetry" ] } } } } ] }