File tree Expand file tree Collapse file tree
NuGetGallery.Core/Certificates
tests/NuGetGallery.Core.Facts/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // Copyright (c) .NET Foundation. All rights reserved.
1+ // Copyright (c) .NET Foundation. All rights reserved.
22// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
44using System ;
@@ -65,6 +65,7 @@ private static MemoryStream CopyAsReadOnly(Stream source)
6565 private static string GetSha1Thumbprint ( MemoryStream stream )
6666 {
6767#pragma warning disable CA5350 // Do Not Use Weak Cryptographic Algorithms
68+ // CodeQL [SM02196] Calculated for backwards compatibility, it is not used for anything
6869 using ( var hashAlgorithm = SHA1 . Create ( ) )
6970#pragma warning restore CA5350 // Do Not Use Weak Cryptographic Algorithms
7071 {
@@ -95,4 +96,4 @@ private static string GetHexString(byte[] bytes)
9596 return BitConverter . ToString ( bytes ) . Replace ( "-" , "" ) . ToLowerInvariant ( ) ;
9697 }
9798 }
98- }
99+ }
Original file line number Diff line number Diff line change @@ -329,8 +329,8 @@ public virtual ActionResult SimulateError(SimulatedErrorType type = SimulatedErr
329329 [ ApiAuthorize ]
330330 [ ApiScopeRequired ( NuGetScopes . PackagePush , NuGetScopes . PackagePushVersion ) ]
331331 [ ActionName ( "CreatePackageVerificationKey" ) ]
332- public virtual async Task < ActionResult > CreatePackageVerificationKeyAsync ( string id , string version )
333332 // CodeQL [SM00433] This endpoint uses API Key authentication
333+ public virtual async Task < ActionResult > CreatePackageVerificationKeyAsync ( string id , string version )
334334 {
335335 // For backwards compatibility, we must preserve existing behavior where the client always pushes
336336 // symbols and the VerifyPackageKey callback returns the appropriate response. For this reason, we
Original file line number Diff line number Diff line change 1- // Copyright (c) .NET Foundation. All rights reserved.
1+ // Copyright (c) .NET Foundation. All rights reserved.
22// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
44using System ;
@@ -171,14 +171,6 @@ public async Task OpenWriteAsyncReturnsWritableStream()
171171 var fileName = _prefixA ;
172172 var expectedContent = "Hello, world." ;
173173 var bytes = Encoding . UTF8 . GetBytes ( expectedContent ) ;
174- string expectedContentMD5 ;
175- #pragma warning disable CA5351
176- using ( var md5 = MD5 . Create ( ) )
177- {
178- expectedContentMD5 = Convert . ToBase64String ( md5 . ComputeHash ( bytes ) ) ;
179- }
180- #pragma warning disable CA5351
181-
182174 var container = _clientA . GetContainerReference ( folderName ) ;
183175 var file = container . GetBlobReference ( fileName ) ;
184176
You can’t perform that action at this time.
0 commit comments