Skip to content

Commit

Permalink
Added CodeQL suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
advay26 committed Oct 13, 2022
1 parent 744bc16 commit 61239a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/NuGetGallery/Controllers/ApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,10 @@ public virtual ActionResult SimulateError(SimulatedErrorType type = SimulatedErr

[HttpPost]
[ApiAuthorize]
[ValidateAntiForgeryToken]
[ApiScopeRequired(NuGetScopes.PackagePush, NuGetScopes.PackagePushVersion)]
[ActionName("CreatePackageVerificationKey")]
public virtual async Task<ActionResult> CreatePackageVerificationKeyAsync(string id, string version)
// CodeQL [SM00433] This endpoint uses API Key authentication
{
// For backwards compatibility, we must preserve existing behavior where the client always pushes
// symbols and the VerifyPackageKey callback returns the appropriate response. For this reason, we
Expand Down Expand Up @@ -425,10 +425,10 @@ public virtual Task<ActionResult> CreatePackagePut()

[HttpPost]
[ApiAuthorize]
[ValidateAntiForgeryToken]
[ApiScopeRequired(NuGetScopes.PackagePush, NuGetScopes.PackagePushVersion)]
[ActionName("PushPackageApi")]
public virtual Task<ActionResult> CreatePackagePost()
// CodeQL [SM00433] This endpoint uses API Key authentication
{
return CreatePackageInternal();
}
Expand Down Expand Up @@ -947,10 +947,10 @@ public virtual async Task<ActionResult> DeletePackage(string id, string version,

[HttpPost]
[ApiAuthorize]
[ValidateAntiForgeryToken]
[ApiScopeRequired(NuGetScopes.PackageUnlist)]
[ActionName("PublishPackageApi")]
public virtual async Task<ActionResult> PublishPackage(string id, string version)
// CodeQL [SM00433] This endpoint uses API Key authentication
{
var package = PackageService.FindPackageByIdAndVersionStrict(id, version);
if (package == null)
Expand Down

0 comments on commit 61239a9

Please sign in to comment.