-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASA-9110 #228
ASA-9110 #228
Conversation
@@ -249,5 +254,13 @@ | |||
} | |||
return FormValidation.ok(); | |||
} | |||
|
|||
public FormValidation doCheckTarget(@RelativePath("..") @QueryParameter String credentials, @AncestorInPath ItemGroup<?> context, @QueryParameter String presenceId) { |
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing permission check Warning
@@ -249,5 +254,13 @@ | |||
} | |||
return FormValidation.ok(); | |||
} | |||
|
|||
public FormValidation doCheckTarget(@RelativePath("..") @QueryParameter String credentials, @AncestorInPath ItemGroup<?> context, @QueryParameter String presenceId) { |
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing POST/RequirePOST annotation Warning
@@ -33,6 +33,9 @@ warning.asoc.certificates = Allowing Untrusted Connections is not applied to thi | |||
error.application.empty.ui = Application list is empty. Please check the credentials for service connection. | |||
error.url.validation.ui = Unless this is a private network, please verify your domain. | |||
error.url.validation = An error occurred while validating the Starting URL: {0}. | |||
error.dast.subscription.validation= You don't have a valid DAST subscription. | |||
error.sast.subscription.validation= You don't have a valid SAST subscription. | |||
error.sca.subscription.validation= You don't have a valid SCA subscription. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest combining these 3 strings into a single string that takes an input. For example:
error.subscription.invalid=You don't have a valid {0} subscription.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will use only 2 statements, one for the backend validation message & other for the UI.
@@ -249,5 +254,13 @@ public FormValidation doCheckIncludeSCAUploadDirect(@QueryParameter String inclu | |||
} | |||
return FormValidation.ok(); | |||
} | |||
|
|||
public FormValidation doCheckTarget(@RelativePath("..") @QueryParameter String credentials, @AncestorInPath ItemGroup<?> context, @QueryParameter String presenceId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you need Presence in the check ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the unused arguments.
@@ -60,8 +65,11 @@ | |||
return "Software Composition Analysis (SCA)"; | |||
} | |||
|
|||
public FormValidation doCheckTarget(@QueryParameter String target, @RelativePath("..") @QueryParameter String credentials, @AncestorInPath ItemGroup<?> context) { | |||
public FormValidation doCheckTarget(@RelativePath("..") @QueryParameter String credentials, @AncestorInPath ItemGroup<?> context) { |
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing permission check Warning
@@ -60,8 +65,11 @@ | |||
return "Software Composition Analysis (SCA)"; | |||
} | |||
|
|||
public FormValidation doCheckTarget(@QueryParameter String target, @RelativePath("..") @QueryParameter String credentials, @AncestorInPath ItemGroup<?> context) { | |||
public FormValidation doCheckTarget(@RelativePath("..") @QueryParameter String credentials, @AncestorInPath ItemGroup<?> context) { |
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing POST/RequirePOST annotation Warning
@@ -192,7 +196,9 @@ public void validateSettings(JenkinsAuthenticationProvider authProvider, Map<Str | |||
progress.setStatus(new Message(Message.WARNING, Messages.warning_include_sca_AppScan360())); | |||
properties.remove(CoreConstants.INCLUDE_SCA); | |||
} | |||
} else if(properties.containsKey(CoreConstants.INCLUDE_SCA) && !ServiceUtil.hasScaEntitlement(authProvider)) { | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this was made an "if" as opposed to the previous "else if"? I think we want it to be "else if" because with this change, an AppScan 360 user will get 2 warning about SCA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, got the scenario, reverting the changes.
@@ -33,6 +33,8 @@ warning.asoc.certificates = Allowing Untrusted Connections is not applied to thi | |||
error.application.empty.ui = Application list is empty. Please check the credentials for service connection. | |||
error.url.validation.ui = Unless this is a private network, please verify your domain. | |||
error.url.validation = An error occurred while validating the Starting URL: {0}. | |||
error.active.subscription.validation = You do not have a valid {0} subscription. | |||
error.active.subscription.validation.ui = You do not have subscription for selected scan type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this string to be:
"You do not have a subscription for the selected scan type."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, sure Matt.
Active subscription check before the execution of scan.