Anchore Plugin enables Jenkins users to scan container images, generate analysis, evaluate gate policy, and execute customizable 40 | * queries. The plugin can be used in a freestyle project as a step or invoked from a pipeline script
41 | * 42 | *Requirements:
43 | * 44 | * Note that returning {@link
475 | * FormValidation#error(String)} does not prevent the form from being saved. It just means that a message will be displayed to the
476 | * user
477 | */
478 | @SuppressWarnings("unused")
479 | public FormValidation doCheckName(@QueryParameter String value) {
480 | if (!Strings.isNullOrEmpty(value)) {
481 | return FormValidation.ok();
482 | } else {
483 | return FormValidation.error("Please enter a valid file name");
484 | }
485 | }
486 |
487 | @SuppressWarnings("unused")
488 | public ListBoxModel doFillEngineCredentialsIdItems(@QueryParameter String credentialsId) {
489 | StandardListBoxModel result = new StandardListBoxModel();
490 |
491 | if (!Jenkins.getActiveInstance().hasPermission(Jenkins.ADMINISTER)) {
492 | return result.includeCurrentValue(credentialsId);
493 | }
494 |
495 | return result.includeEmptyValue()
496 | .includeMatchingAs(ACL.SYSTEM, Jenkins.getActiveInstance(), StandardUsernamePasswordCredentials.class,
497 | Collections.