Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Common.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ dotnet_diagnostic.CA3077.severity = suggestion
dotnet_diagnostic.CA3147.severity = warning

# Do Not Use Weak Cryptographic Algorithms
dotnet_diagnostic.CA5350.severity = suggestion
dotnet_diagnostic.CA5350.severity = warning

# Do Not Use Broken Cryptographic Algorithms
dotnet_diagnostic.CA5351.severity = warning
Expand Down
1 change: 1 addition & 0 deletions src/Tasks/Hash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class Hash : TaskExtension
/// <summary>
/// Execute the task.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5350:Do Not Use Weak Cryptographic Algorithms", Justification = "This is not intended as a cryptographic security measure, only for uniqueness between build executions.")]
public override bool Execute()
{
if (ItemsToHash?.Length > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/ManifestUtil/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public static void GetFileInfo(string path, string targetFrameworkVersion, out s
GetFileInfoImpl(path, targetFrameworkVersion, out hash, out length);
}

[SuppressMessage("Microsoft.Security.Cryptography", "CA5354: SHA1CannotBeUsed.", Justification = ".NET 4.0 and earlier versions cannot parse SHA-2.")]
[SuppressMessage("Security", "CA5350:Do Not Use Weak Cryptographic Algorithms", Justification = ".NET 4.0 and earlier versions cannot parse SHA-2.")]
private static void GetFileInfoImpl(string path, string targetFrameWorkVersion, out string hash, out long length)
{
FileInfo fi = new FileInfo(path);
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/ManifestUtil/mansign2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ private static byte[] ComputeHashFromManifest(XmlDocument manifestDom, bool useS
return ComputeHashFromManifest(manifestDom, false, useSha256);
}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Cryptographic.Standard", "CA5354:SHA1CannotBeUsed", Justification = "SHA1 is retained for compatibility reasons as an option in VisualStudio signing page and consequently in the trust manager, default is SHA2.")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5350:Do Not Use Weak Cryptographic Algorithms", Justification = "SHA1 is retained for compatibility reasons as an option in VisualStudio signing page and consequently in the trust manager, default is SHA2.")]
private static byte[] ComputeHashFromManifest(XmlDocument manifestDom, bool oldFormat, bool useSha256)
{
if (oldFormat)
Expand Down