Skip to content

Commit

Permalink
Merge pull request #78 from jenkinsci/miguel/fix-security-alerts/miss…
Browse files Browse the repository at this point in the history
…ing-permission-checks

Dismiss missing permission check alerts in form validation methods
  • Loading branch information
pablobayarri authored Aug 22, 2024
2 parents 0a44ebd + f8603b8 commit cc3976a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ public String getDisplayName() {
return "Plastic SCM";
}

@SuppressWarnings("lgtm[jenkins/no-permission-check]")
@RequirePOST
public static FormValidation doCheckSelector(@QueryParameter String value) {
return FormChecker.doCheckSelector(value);
Expand Down Expand Up @@ -767,6 +768,7 @@ public String getDirectory() {
@Extension
public static class DescriptorImpl extends Descriptor<WorkspaceInfo> {

@SuppressWarnings("lgtm[jenkins/no-permission-check]")
@RequirePOST
public static FormValidation doCheckSelector(@QueryParameter String value) {
return FormChecker.doCheckSelector(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,19 @@ public String getDisplayName() {
return "Plastic SCM";
}

@SuppressWarnings("lgtm[jenkins/no-permission-check]")
@RequirePOST
public FormValidation doCheckBranch(@QueryParameter String value) {
return FormChecker.doCheckBranch(value);
}

@SuppressWarnings("lgtm[jenkins/no-permission-check]")
@RequirePOST
public FormValidation doCheckRepository(@QueryParameter String value) {
return FormChecker.doCheckRepository(value);
}

@SuppressWarnings("lgtm[jenkins/no-permission-check]")
@RequirePOST
public FormValidation doCheckServer(@QueryParameter String value) {
return FormChecker.doCheckServer(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public ListBoxModel doFillCredentialsIdItems(@AncestorInPath Item item, @QueryPa
return FormFiller.doFillCredentialsIdItems(item, credentialsId);
}

@SuppressWarnings("lgtm[jenkins/no-permission-check]")
@RequirePOST
public static FormValidation doCheckSpeckAttributeName(@QueryParameter String value) {
return Util.fixEmpty(value) == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public static String getDefaultSpecAttributeName() {
return MergebotScm.UPDATE_TO_SPEC_PARAMETER_NAME;
}

@SuppressWarnings("lgtm[jenkins/no-permission-check]")
@RequirePOST
public static FormValidation doCheckSpecAttributeName(@QueryParameter String value) {
return Util.fixEmpty(value) == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public String getId() {
return "plasticscm-cli";
}

@SuppressWarnings("lgtm[jenkins/no-permission-check]")
@RequirePOST
@Override
public FormValidation doCheckHome(@QueryParameter File value) {
Expand Down

0 comments on commit cc3976a

Please sign in to comment.