CWE IDs: C#
| ID | Checker name and description |
|---|---|
| CWE-20: Improper Input Validation |
CS.SQL.INJECT.LOCAL SQL injection CS.SV.TAINTED.ALLOC_SIZE Use of unvalidated integer in memory allocation CS.SV.TAINTED.BINOP Use of unvalidated integer in binary operation CS.SV.TAINTED.CALL.BINOP Use of unvalidated integer in binary operation CS.SV.TAINTED.CALL.GLOBAL Use of unvalidated integer in an assignment operation CS.SV.TAINTED.CALL.INDEX_ACCESS Use of unvalidated integer as array index by function call CS.SV.TAINTED.CALL.LOOP_BOUND Use of unvalidated integer in loop condition through a function call CS.SV.TAINTED.CALL.LOOP_BOUND.RESOURCE Resource allocation in a loop is controlled by tainted data CS.SV.TAINTED.DESERIALIZATION Use of unvalidated integer during deserialization in object creation CS.SV.TAINTED.DLLPRELOAD Use of unvalidated string to load a DLL CS.SV.TAINTED.FMTSTR Use of unvalidated data in a format string CS.SV.TAINTED.GLOBAL Use of Unvalidated Integer in an Assignment Operation CS.SV.TAINTED.INDEX_ACCESS Use of unvalidated integer as array index CS.SV.TAINTED.INJECTION C# command injection CS.SV.TAINTED.LOOP_BOUND Use of unvalidated integer in loop condition CS.SV.TAINTED.LOOP_BOUND.RESOURCE Resource allocation in a loop controlled by tainted data CS.SV.TAINTED.PATH_TRAVERSAL Use of unvalidated data in a path traversal |
| CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') |
CS.SV.TAINTED.PATH_TRAVERSAL Use of unvalidated data in a path traversal |
| CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') |
CS.SV.TAINTED.INJECTION C# command injection |
| CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') |
CS.SV.TAINTED.INJECTION C# command injection |
| CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') |
CS.XSS.PERSIST Cross-site Scripting Persisting Vulnerability CS.XSS.REFLECT Cross-site Scripting Reflecting Vulnerability |
| CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') |
CS.SQL.INJECT.LOCAL SQL injection CS.SV.TAINTED.INJECTION C# command injection |
| CWE-94: Improper Control of Generation of Code ('Code Injection') |
CS.SQL.INJECT.LOCAL SQL injection CS.SV.TAINTED.DESERIALIZATION Use of unvalidated integer during deserialization in object creation CS.SV.TAINTED.FMTSTR Use of unvalidated data in a format string CS.SV.TAINTED.INJECTION C# command injection |
| CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer |
CS.ABV.EXCEPT IndexOutOfRange exception while accessing array element CS.SV.TAINTED.ALLOC_SIZE Use of unvalidated integer in memory allocation CS.SV.TAINTED.CALL.INDEX_ACCESS Use of unvalidated integer as array index by function call CS.SV.TAINTED.INDEX_ACCESS Use of unvalidated integer as array index |
| CWE-125: Out-of-bounds Read |
CS.ABV.EXCEPT IndexOutOfRange exception while accessing array element |
| CWE-190: Integer Overflow or Wraparound |
CS.SV.TAINTED.BINOP Use of unvalidated integer in binary operation CS.SV.TAINTED.CALL.BINOP Use of unvalidated integer in binary operation |
| CWE-192: Integer Coercion Error |
CS.FRACTION.LOSS Possible loss of fraction |
| CWE-200: Exposure of Sensitive Information to an Unauthorized Actor |
CS.INFORMATION_EXPOSURE.ALL Potential information exposure CS.INFORMATION_EXPOSURE.ATTR Potential security information exposure |
| CWE-259: Use of Hard-coded Password |
CS.HCC.PWD Use of a hardcoded password |
| CWE-269: Improper Privilege Management |
CS.SV.USAGERULES.PERMISSIONS Use of Privilege Elevation |
| CWE-284: Improper Access Control |
CS.AUTH.NOATTR Possible missing authorization check CS.NPS No permissions set for resource before accessing it CS.SV.USAGERULES.PERMISSIONS Use of Privilege Elevation |
| CWE-295: Improper Certificate Validation |
CS.X509.REVOCATION Certificate revocation list check is disabled. CS.X509.VALIDATION Validation of input is not done using AntiForgery.Validate |
| CWE-321: Use of Hard-coded Cryptographic Key |
CS.HCC Use of hardcoded credentials CS.HCC.PWD Use of a hardcoded password |
| CWE-326: Inadequate Encryption Strength |
CS.RCA Risky cryptographic algorithm used |
| CWE-327: Use of a Broken or Risky Cryptographic Algorithm |
CS.RCA Risky cryptographic algorithm used |
| CWE-352: Cross-Site Request Forgery |
CS.CSRF.ATTR.NOATTR AntiForgery attribute should be added to class or method. CS.CSRF.ATTR.POST AntiForgery attribute should be added to class or method. CS.CSRF.VALIDATE Validation of 'POST request data access' is not done. CS.CSRF.VSUK.CONSTASSIGN A const string is assigned to property 'ViewStateUserKey'. CS.CSRF.VSUK.NOASSIGN Property 'ViewStateUserKey' is not set. |
| CWE-369: Divide By Zero |
CS.DBZ.CONST Division by a zero constant occurs CS.DBZ.CONST.CALL The value '0' is passed to function that can use this value as divisor CS.DBZ.GENERAL Division by zero might occur CS.DBZ.ITERATOR Division by zero might occur in a loop iterator |
| CWE-398: Indicator of Poor Code Quality |
CS.ASSIGN.SELF Assignment of expression to itself CS.CTOR.VIRTUAL Virtual member call in constructor CS.HIDDEN.MEMBER.LOCAL.CLASS Member is hidden by a local variable CS.HIDDEN.MEMBER.LOCAL.STRUCT Member is hidden by a local variable CS.HIDDEN.MEMBER.PARAM.CLASS Member is hidden by a parameter CS.HIDDEN.MEMBER.PARAM.STRUCT Member is hidden by a parameter CS.IFACE.EMPTY Empty interface CS.LOOP.STR.CONCAT String concatenation in a loop |
| CWE-400: Uncontrolled Resource Consumption |
CS.RESOURCE.AUTOBOXING Autoboxing during operation inside a loop CS.RESOURCE.LOOP Object Allocation inside a loop CS.RESOURCE.UNBOXING Unboxing during operation inside a loop CS.SV.TAINTED.ALLOC_SIZE Use of unvalidated integer in memory allocation CS.SV.TAINTED.CALL.LOOP_BOUND Use of unvalidated integer in loop condition through a function call CS.SV.TAINTED.CALL.LOOP_BOUND.RESOURCE Resource allocation in a loop is controlled by tainted data CS.SV.TAINTED.LOOP_BOUND Use of unvalidated integer in loop condition CS.SV.TAINTED.LOOP_BOUND.RESOURCE Resource allocation in a loop controlled by tainted data |
| CWE-404: Improper Resource Shutdown or Release |
CS.RLK Resource leak CS.UFR Using freed resource |
| CWE-416: Use After Free |
CS.LOCRET.ARG Function returns address of local variable CS.LOCRET.GLOB Function returns address of local variable CS.LOCRET.RET Function returns address of local variable CS.UFR Using freed resource |
| CWE-426: Untrusted Search Path |
CS.SV.TAINTED.DLLPRELOAD Use of unvalidated string to load a DLL CS.SV.TAINTED.PATH_TRAVERSAL Use of unvalidated data in a path traversal CS.UNSAFE.DLLPRELOAD Use of Attribute to Load a DLL CS.UNSAFE.SEARCH_PATH Use of search path to resolve absolute Path |
| CWE-476: NULL Pointer Dereference |
CS.NRE.CHECK.CALL.MIGHT Reference may be passed to function that can dereference it after it was positively checked for null CS.NRE.CHECK.CALL.MUST Reference will be passed to function that may dereference it after it was positively checked for null CS.NRE.CHECK.MIGHT Reference may be dereferenced after it was positively checked for null CS.NRE.CHECK.MUST Reference will be dereferenced after it was positively checked for null CS.NRE.CONST.CALL Constant null is passed to function that can dereference it CS.NRE.CONST.DEREF Constant null is dereferenced CS.NRE.FUNC.CALL.MIGHT Result of function that may return null may be passed to another function that may dereference it CS.NRE.FUNC.CALL.MUST Result of function that may return null will be passed to another function that may dereference it CS.NRE.FUNC.MIGHT Result of function that can return null may be dereferenced CS.NRE.FUNC.MUST Result of function that may return null will be dereferenced CS.NRE.GEN.CALL.MIGHT Null reference may be passed to function that may dereference it CS.NRE.GEN.CALL.MUST Null reference will be passed to function that may dereference it CS.NRE.GEN.MIGHT Null reference may be dereferenced CS.NRE.GEN.MUST Null reference will be dereferenced CS.RNRE Suspicious dereference before null check |
| CWE-480: Use of Incorrect Operator |
CS.ASSIGN.SELF Assignment of expression to itself |
| CWE-502: Deserialization of Untrusted Data |
CS.SV.TAINTED.DESERIALIZATION Use of unvalidated integer during deserialization in object creation |
| CWE-561: Dead Code |
CS.CMP.VAL.NULL Possible comparing value type expression with 'null' CS.CONSTCOND.DO 'do' controlling expression is always true or always false CS.CONSTCOND.IF 'if' controlling expression is always true or always false CS.CONSTCOND.SWITCH 'switch' selector expression is constant CS.CONSTCOND.TERNARY Controlling condition in conditional expression is always true or always false CS.CONSTCOND.WHILE 'while' controlling expression is always true or always false |
| CWE-562: Return of Stack Variable Address |
CS.LOCRET.ARG Function returns address of local variable CS.LOCRET.GLOB Function returns address of local variable CS.LOCRET.RET Function returns address of local variable |
| CWE-563: Assignment to Variable without Use |
CS.ASSIGN.SELF Assignment of expression to itself |
| CWE-570: Expression is Always False |
CS.CMP.VAL.NULL Possible comparing value type expression with 'null' CS.CONSTCOND.DO 'do' controlling expression is always true or always false CS.CONSTCOND.IF 'if' controlling expression is always true or always false CS.CONSTCOND.SWITCH 'switch' selector expression is constant CS.CONSTCOND.TERNARY Controlling condition in conditional expression is always true or always false CS.CONSTCOND.WHILE 'while' controlling expression is always true or always false |
| CWE-571: Expression is Always True |
CS.CMP.VAL.NULL Possible comparing value type expression with 'null' CS.CONSTCOND.DO 'do' controlling expression is always true or always false CS.CONSTCOND.IF 'if' controlling expression is always true or always false CS.CONSTCOND.SWITCH 'switch' selector expression is constant CS.CONSTCOND.TERNARY Controlling condition in conditional expression is always true or always false CS.CONSTCOND.WHILE 'while' controlling expression is always true or always false |
| CWE-596: Incorrect Semantic Object Comparison |
CS.WRONGUSE.REFEQ Improper usage of Object.ReferenceEquals |
| CWE-606: Unchecked Input for Loop Condition |
CS.SV.TAINTED.CALL.LOOP_BOUND Use of unvalidated integer in loop condition through a function call CS.SV.TAINTED.CALL.LOOP_BOUND.RESOURCE Resource allocation in a loop is controlled by tainted data CS.SV.TAINTED.LOOP_BOUND Use of unvalidated integer in loop condition CS.SV.TAINTED.LOOP_BOUND.RESOURCE Resource allocation in a loop controlled by tainted data |
| CWE-611: Improper Restriction of XML External Entity Reference |
CS.XXE.DOCUMENT Possible XML External Entity (XXE) Attack CS.XXE.READER Possible XML External Entity (XXE) Attack CS.XXE.TEXT_READER Possible XML External Entity (XXE) Attack |
| CWE-672: Operation on a Resource after Expiration or Release |
CS.LOCRET.ARG Function returns address of local variable CS.LOCRET.GLOB Function returns address of local variable CS.LOCRET.RET Function returns address of local variable CS.UFR Using freed resource |
| CWE-690: Unchecked Return Value to NULL Pointer Dereference |
CS.NRE.FUNC.MIGHT Result of function that can return null may be dereferenced CS.NRE.FUNC.MUST Result of function that may return null will be dereferenced |
| CWE-704: Incorrect Type Conversion or Cast |
CS.UNCHECKED.CAST Object with type 'Object' is incorrectly cast to another object CS.UNCHECKED.LOOPITER.CAST Object with type 'Object' is incorrectly cast to another object in a loop CS.WRONG.CAST Object is incorrectly cast to another object CS.WRONG.CAST.MIGHT Object may be incorrectly cast to another object |
| CWE-732: Incorrect Permission Assignment for Critical Resource |
CS.NPS No permissions set for resource before accessing it CS.SV.USAGERULES.PERMISSIONS Use of Privilege Elevation |
| CWE-754: Improper Check for Unusual or Exceptional Conditions |
CS.NRE.CHECK.MIGHT Reference may be dereferenced after it was positively checked for null CS.NRE.CHECK.MUST Reference will be dereferenced after it was positively checked for null CS.NRE.FUNC.MIGHT Result of function that can return null may be dereferenced CS.NRE.FUNC.MUST Result of function that may return null will be dereferenced |
| CWE-770: Allocation of Resources Without Limits or Throttling |
CS.RESOURCE.LOOP Object Allocation inside a loop CS.SV.TAINTED.ALLOC_SIZE Use of unvalidated integer in memory allocation CS.SV.TAINTED.CALL.LOOP_BOUND.RESOURCE Resource allocation in a loop is controlled by tainted data CS.SV.TAINTED.LOOP_BOUND.RESOURCE Resource allocation in a loop controlled by tainted data |
| CWE-772: Missing Release of Resource after Effective Lifetime |
CS.RLK Resource leak |
| CWE-787: Out-of-bounds Write |
CS.ABV.EXCEPT IndexOutOfRange exception while accessing array element |
| CWE-798: Use of Hard-coded Credentials |
CS.HCC Use of hardcoded credentials CS.HCC.PWD Use of a hardcoded password CS.HCC.USER Use of a hardcoded user name |
| CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') |
CS.UNCHECKED.CAST Object with type 'Object' is incorrectly cast to another object CS.UNCHECKED.LOOPITER.CAST Object with type 'Object' is incorrectly cast to another object in a loop CS.WRONG.CAST Object is incorrectly cast to another object CS.WRONG.CAST.MIGHT Object may be incorrectly cast to another object |
| CWE-862: Missing Authorization |
CS.AUTH.NOATTR Possible missing authorization check |
| CWE-863: Incorrect Authorization |
CS.AUTH.NOATTR Possible missing authorization check |
| CWE-896: SFP Primary Cluster: Tainted Input |
CS.SV.TAINTED.ALLOC_SIZE Use of unvalidated integer in memory allocation CS.SV.TAINTED.BINOP Use of unvalidated integer in binary operation CS.SV.TAINTED.CALL.BINOP Use of unvalidated integer in binary operation CS.SV.TAINTED.CALL.GLOBAL Use of unvalidated integer in an assignment operation CS.SV.TAINTED.CALL.INDEX_ACCESS Use of unvalidated integer as array index by function call CS.SV.TAINTED.CALL.LOOP_BOUND Use of unvalidated integer in loop condition through a function call CS.SV.TAINTED.CALL.LOOP_BOUND.RESOURCE Resource allocation in a loop is controlled by tainted data CS.SV.TAINTED.DESERIALIZATION Use of unvalidated integer during deserialization in object creation CS.SV.TAINTED.DLLPRELOAD Use of unvalidated string to load a DLL CS.SV.TAINTED.FMTSTR Use of unvalidated data in a format string CS.SV.TAINTED.GLOBAL Use of Unvalidated Integer in an Assignment Operation CS.SV.TAINTED.INDEX_ACCESS Use of unvalidated integer as array index CS.SV.TAINTED.INJECTION C# command injection CS.SV.TAINTED.LOOP_BOUND Use of unvalidated integer in loop condition CS.SV.TAINTED.LOOP_BOUND.RESOURCE Resource allocation in a loop controlled by tainted data CS.SV.TAINTED.PATH_TRAVERSAL Use of unvalidated data in a path traversal |
| CWE-1235: Incorrect Use of Autoboxing and Unboxing for Performance Critical Operations |
CS.RESOURCE.AUTOBOXING Autoboxing during operation inside a loop CS.RESOURCE.UNBOXING Unboxing during operation inside a loop |
Support Summary:
- 32 rules