Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRE in Microsoft.NetCore.Analyzers.Security.DoNotHardCodeEncryptionKey #2707

Closed
mavasani opened this issue Jul 26, 2019 · 3 comments
Closed
Assignees
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzers Bug The product is not behaving according to its current intended design Category-Security

Comments

@mavasani
Copy link
Contributor

Run the following regression test against the latest master sources:

        [Fact]
        public void RegressionTest()
        {
            VerifyCSharpWithDependencies(@"
using System;
using System.Security.Cryptography;

class TestClass
{
    internal static readonly string[,] s_field = { { """", ""M"" }, { ""S"", ""SM"" } };
}");
        }

Got:

// warning AD0001: Analyzer 'Microsoft.NetCore.Analyzers.Security.DoNotHardCodeEncryptionKey' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
// warning AD0001: Analyzer 'Microsoft.NetCore.Analyzers.Security.DoNotHardCodeEncryptionKey' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
@mavasani mavasani added Bug The product is not behaving according to its current intended design Area-Microsoft.CodeAnalysis.NetAnalyzers Category-Security labels Jul 26, 2019
@mavasani mavasani added this to the vNext milestone Jul 26, 2019
@dotpaul
Copy link
Contributor

dotpaul commented Jul 27, 2019

@LLLXXXCCC can you look at this one?

@mavasani
Copy link
Contributor Author

@LLLXXXCCC This should be fixed now?

@LLLXXXCCC
Copy link
Contributor

@LLLXXXCCC This should be fixed now?

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzers Bug The product is not behaving according to its current intended design Category-Security
Projects
None yet
Development

No branches or pull requests

4 participants