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

Duplicated codes #1774

Closed
TrymBeast opened this issue Aug 9, 2018 · 7 comments
Closed

Duplicated codes #1774

TrymBeast opened this issue Aug 9, 2018 · 7 comments
Assignees
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzers Bug The product is not behaving according to its current intended design Category-Security

Comments

@TrymBeast
Copy link

Hello, while reviewing the rules to use where I work I noticed that there are two duplicated codes (CA5350 and CA5351).
I would expect that rule codes are unique.

Here are the details of this rules:

Analyzer package

Microsoft.CodeAnalysis.FxCopAnalyzers

Package Version

v2.6.1

Diagnostic ID

CA5350: Do not use insecure cryptographic algorithm SHA1.
CA5351: Do not use insecure cryptographic algorithm MD5.
CA5350: Do Not Use Weak Cryptographic Algorithms
CA5351: Do Not Use Broken Cryptographic Algorithms

@mavasani
Copy link
Contributor

mavasani commented Aug 14, 2018

@dotpaul @qinxgit I see we have different implementations for these rules in NetCore.Analyzers and NetFramework.Analyzers, possibly because the same rule works on different set of APIs. Will it be possible to combine the rule implementations into NetCore.Analyzers so both NetCore/NetFramework projects get the analyzer, but the rule implementation can have parts specific to netcore and netframework?

@mavasani mavasani added Bug The product is not behaving according to its current intended design Area-Microsoft.CodeAnalysis.NetAnalyzers Category-Security labels Aug 14, 2018
@mavasani
Copy link
Contributor

@dotpaul I have created a security label to track all issues that you probably care about. Assigning to you to make a call on this issue.

@dotpaul
Copy link
Contributor

dotpaul commented Aug 14, 2018

Thanks. I noticed this too, and for cryptography, I don't think it makes sense to have different rules / implementations for .NET Framework vs .NET Core, so I'll combine 'em and put them in CodeQuality.Analyzers.

@333fred
Copy link
Member

333fred commented Aug 14, 2018

I'm not sure that this belongs in CodeQuality. It should go in NetCore, so that both Framework and Core get the rule (assuming I have that correct @mavasani?)

@mavasani
Copy link
Contributor

@dotpaul Fred is correct. Given the analysis is specific to crypto APIs and their usage, it needs to go into NetCore analyzers. CodeQuality analyzers are not specific to any API usage.

@dotpaul
Copy link
Contributor

dotpaul commented Aug 14, 2018

Oh, got it.

@mavasani
Copy link
Contributor

mavasani commented Jan 5, 2019

Fixed with #1793

@mavasani mavasani closed this as completed Jan 5, 2019
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