diff --git a/analyzers/rspec/cs/S106.html b/analyzers/rspec/cs/S106.html index bab708117ef..aaab0122b39 100644 --- a/analyzers/rspec/cs/S106.html +++ b/analyzers/rspec/cs/S106.html @@ -49,5 +49,7 @@

Resources

diff --git a/analyzers/rspec/cs/S3260.html b/analyzers/rspec/cs/S3260.html index 0f2dc292b0b..35e5985aa8c 100644 --- a/analyzers/rspec/cs/S3260.html +++ b/analyzers/rspec/cs/S3260.html @@ -67,19 +67,17 @@

Articles & blog posts

Benchmarks

- - - - - + + + + - - + @@ -88,45 +86,44 @@

Benchmarks

- - - - - -
Method Runtime MeanStdDevRatioStandard Deviation

.NET 5.0

918.7 us

10.72 us

1.00

SealedType

.NET 5.0

231.2 us

3.20 us

0.25

UnsealedType

.NET 6.0

867.9 us

5.65 us

1.00

SealedType

.NET 6.0

218.4 us

0.59 us

0.25

UnsealedType

.NET 7.0

1,074.5 us

3.15 us

1.00

SealedType

.NET 7.0

216.1 us

1.19 us

0.20

+

Glossary

+

The results were generated by running the following snippet with BenchmarkDotNet:

 [Params(1_000_000)]
diff --git a/analyzers/rspec/cs/S3329.html b/analyzers/rspec/cs/S3329.html
index 6b47b578466..c7bd96d4ec3 100644
--- a/analyzers/rspec/cs/S3329.html
+++ b/analyzers/rspec/cs/S3329.html
@@ -88,11 +88,10 @@ 

Standards

  • OWASP - Top 10 2021 Category A2 - Cryptographic Failures
  • OWASP - Top 10 2017 Category A3 - Sensitive Data Exposure
  • -
  • OWASP - Mobile AppSec - Verification Standard - Cryptography Requirements
  • -
  • OWASP - Mobile Top 10 2016 Category M5 - - Insufficient Cryptography
  • +
  • OWASP - Top 10 2017 Category A6 - Security + Misconfiguration
  • CWE - CWE-329 - Not Using an Unpredictable IV with CBC Mode
  • +
  • CWE - CWE-780 - Use of RSA Algorithm without OAEP
  • NIST, SP-800-38A - Recommendation for Block Cipher Modes of Operation
  • diff --git a/analyzers/rspec/cs/S3329.json b/analyzers/rspec/cs/S3329.json index e0d8db30986..904f505fb69 100644 --- a/analyzers/rspec/cs/S3329.json +++ b/analyzers/rspec/cs/S3329.json @@ -21,24 +21,29 @@ "scope": "Main", "securityStandards": { "CWE": [ - 329 + 327, + 780 ], "OWASP": [ + "A6", "A3" ], - "OWASP Mobile": [ - "M5" - ], - "MASVS": [ - "MSTG-CRYPTO-6" - ], "OWASP Top 10 2021": [ "A2" ], + "PCI DSS 3.2": [ + "4.1", + "6.5.3", + "6.5.4" + ], + "PCI DSS 4.0": [ + "4.2.1", + "6.2.4" + ], "ASVS 4.0": [ - "2.3.1", - "2.6.2", - "2.9.2" + "2.9.3", + "6.2.2", + "8.3.7" ] }, "quickfix": "targeted" diff --git a/analyzers/rspec/cs/S4027.html b/analyzers/rspec/cs/S4027.html index a616d03aa65..b6bda68746d 100644 --- a/analyzers/rspec/cs/S4027.html +++ b/analyzers/rspec/cs/S4027.html @@ -4,52 +4,46 @@

    Why is this an issue?

  • public MyException()
  • public MyException(string)
  • public MyException(string, Exception)
  • -
  • protected or private MyException(SerializationInfo, StreamingContext)
  • -

    That fourth constructor should be protected in unsealed classes, and private in sealed classes.

    -

    Not having this full set of constructors can make it difficult to handle exceptions.

    -

    Noncompliant code example

    -
    -using System;
    -
    -namespace MyLibrary
    +

    The absence of these constructors can complicate exception handling and limit the information that can be provided when an exception is thrown.

    +

    How to fix it

    +

    Code examples

    +

    Noncompliant code example

    +
    +public class MyException : Exception // Noncompliant: several constructors are missing
     {
    -  public class MyException // Noncompliant: several constructors are missing
    -  {
         public MyException()
         {
         }
    -  }
     }
     
    -

    Compliant solution

    -
    -using System;
    -using System.Runtime.Serialization;
    -
    -namespace MyLibrary
    +

    Compliant solution

    +
    +public class MyException : Exception
     {
    -  public class MyException : Exception
    -  {
    -      public MyException()
    -      {
    -      }
    -
    -      public MyException(string message)
    -          :base(message)
    -      {
    -      }
    +    public MyException()
    +    {
    +    }
     
    -      public MyException(string message, Exception innerException)
    -          : base(message, innerException)
    -      {
    -      }
    +    public MyException(string message)
    +        : base(message)
    +    {
    +    }
     
    -      protected MyException(SerializationInfo info, StreamingContext context)
    -          : base(info, context)
    -      {
    -      }
    -  }
    +    public MyException(string message, Exception innerException)
    +        : base(message, innerException)
    +    {
    +    }
     }
     
    +

    Resources

    +

    Documentation

    + diff --git a/analyzers/rspec/cs/S4035.html b/analyzers/rspec/cs/S4035.html index de0521cfdab..b69299a5c18 100644 --- a/analyzers/rspec/cs/S4035.html +++ b/analyzers/rspec/cs/S4035.html @@ -4,7 +4,7 @@

    Why is this an issue?

    to make a meaningful comparison. Therefore that implicit contract is now broken.

    Alternatively IEqualityComparer<T> provides a safer interface and is used by collections or Equals could be made virtual.

    -

    This rule raises an issue when an unsealed, public or protected class implements IEquitable<T> and the +

    This rule raises an issue when an unsealed, public or protected class implements IEquatable<T> and the Equals is neither virtual nor abstract.

    Noncompliant code example

    diff --git a/analyzers/rspec/cs/S4423.html b/analyzers/rspec/cs/S4423.html
    index 172154bf99c..73331b5249e 100644
    --- a/analyzers/rspec/cs/S4423.html
    +++ b/analyzers/rspec/cs/S4423.html
    @@ -110,6 +110,10 @@ 

    Articles & blog posts

    Standards

    diff --git a/analyzers/rspec/vbnet/S3329.json b/analyzers/rspec/vbnet/S3329.json index e0d8db30986..904f505fb69 100644 --- a/analyzers/rspec/vbnet/S3329.json +++ b/analyzers/rspec/vbnet/S3329.json @@ -21,24 +21,29 @@ "scope": "Main", "securityStandards": { "CWE": [ - 329 + 327, + 780 ], "OWASP": [ + "A6", "A3" ], - "OWASP Mobile": [ - "M5" - ], - "MASVS": [ - "MSTG-CRYPTO-6" - ], "OWASP Top 10 2021": [ "A2" ], + "PCI DSS 3.2": [ + "4.1", + "6.5.3", + "6.5.4" + ], + "PCI DSS 4.0": [ + "4.2.1", + "6.2.4" + ], "ASVS 4.0": [ - "2.3.1", - "2.6.2", - "2.9.2" + "2.9.3", + "6.2.2", + "8.3.7" ] }, "quickfix": "targeted" diff --git a/analyzers/rspec/vbnet/S4423.html b/analyzers/rspec/vbnet/S4423.html index a46041412f8..7570c29c4bd 100644 --- a/analyzers/rspec/vbnet/S4423.html +++ b/analyzers/rspec/vbnet/S4423.html @@ -108,6 +108,10 @@

    Articles & blog posts

    Standards