Skip to content

Commit

Permalink
Suppress Jenkins Security Scan warnings (#134)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
  • Loading branch information
daniel-beck and daniel-beck committed Apr 17, 2023
1 parent 1723c7a commit f39d652
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,9 @@ protected GlobalMatrixAuthorizationStrategy create() {
return new GlobalMatrixAuthorizationStrategy();
}

@SuppressWarnings("lgtm[jenkins/csrf]")
@Restricted(NoExternalUse.class)
public FormValidation doCheckName(@QueryParameter String value ) {
public FormValidation doCheckName(@QueryParameter String value) {
return doCheckName_(value, Jenkins.get(), Jenkins.ADMINISTER);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ public String getDisplayName() {
}

@Restricted(DoNotUse.class)
@SuppressWarnings("lgtm[jenkins/csrf]")
public FormValidation doCheckName(@AncestorInPath Computer computer, @QueryParameter String value) {
// Computer isn't a DescriptorByNameOwner before Jenkins 2.78, and then @AncestorInPath doesn't work
return doCheckName_(value,
Expand Down

0 comments on commit f39d652

Please sign in to comment.