jenkinsci / grypescanner-plugin

Jenkins plugin for grype integration
https://plugins.jenkins.io/grypescanner/
MIT License
0 stars 4 forks source link

No enum constant io.jenkins.plugins.grypescanner.Finding.SEVERITY.Negligible #6

Closed seanleblancicdtech closed 1 year ago

seanleblancicdtech commented 1 year ago

Jenkins and plugins versions report

Environment ``` Jenkins: 2.319.1 OS: Linux - 4.15.0-189-generic Java: 1.8.0_362 - Private Build (OpenJDK 64-Bit Server VM) --- JDK_Parameter_Plugin:1.0 Matrix-sorter-plugin:1.3 PrioritySorter:4.0.1 ace-editor:1.1 analysis-core:1.96 anchore-container-scanner:1.0.23 ansicolor:1.0.1 ant:1.13 antisamy-markup-formatter:2.5 apache-httpcomponents-client-4-api:4.5.13-1.0 artifactory:3.14.2 authentication-tokens:1.4 badge:1.9 bootstrap4-api:4.6.0-3 bootstrap5-api:5.1.3-4 bouncycastle-api:2.25 branch-api:2.7.0 build-failure-analyzer:2.1.0 build-hpi-hudson:1.2 build-monitor-plugin:1.13+build.202112201608 build-name-setter:2.2.0 build-pipeline-plugin:1.5.8 build-timeout:1.20 built-on-column:1.1 caffeine-api:2.9.2-29.v717aac953ff3 checks-api:1.7.2 claim:2.18.2 cloudbees-folder:6.17 clover:4.12.1 cobertura:1.17 code-coverage-api:2.0.4 command-launcher:1.6 conditional-buildstep:1.4.1 config-file-provider:3.8.2 console-column-plugin:1.5 copyartifact:1.46.2 credentials:1087.1089.v2f1b_9a_b_040e4 credentials-binding:523.vd859a_4b_122e6 cucumber-reports:5.6.1 cvs:2.19 dark-theme:156.v6cf16af6f9ef dashboard-view:2.18 data-tables-api:1.11.3-6 dependency-check-jenkins-plugin:5.1.2 display-url-api:2.3.5 docker-commons:1.17 docker-workflow:1.26 durable-task:493.v195aefbb0ff2 dynamic-axis:1.0.3 echarts-api:5.2.2-2 email-ext:2.86 emotional-jenkins-plugin:1.2 envfile:1.2 envinject:2.4.0 envinject-api:1.8 environment-script:1.2.6 extended-choice-parameter:0.82 extended-read-permission:3.2 extensible-choice-parameter:1.8.0 external-monitor-job:1.7 font-awesome-api:5.15.4-5 forensics-api:1.7.0 generic-webhook-trigger:1.84 git:4.10.1 git-client:3.10.0 git-server:1.10 github:1.34.3 github-api:1.303-400.v35c2d8258028 gradle:1.37.1 grails:1.7 greenballs:1.15 groovy:2.4 groovy-postbuild:2.5 groovyaxis:0.3 grypescanner:1.4 handlebars:3.0.8 htmlpublisher:1.28 icon-shim:3.0.0 instant-messaging:1.48 iphoneview:0.2 ivy:2.1 jackson2-api:2.13.2.20220328-273.v11d70a_b_a_1a_52 jacoco:3.3.0 javadoc:1.6 javax-activation-api:1.2.0-3 jaxb:2.3.6-1 jdk-tool:1.5 jenkins-multijob-plugin:1.36 jobConfigHistory:2.30 jquery:1.12.4-1 jquery-detached:1.2.1 jquery3-api:3.6.0-2 jsch:0.1.55.2 junit:1.53 kubernetes-cli:1.10.3 kubernetes-client-api:5.10.1-171.vaa0774fb8c20 kubernetes-credentials:0.9.0 ldap:2.7 lockable-resources:2.12 locks-and-latches:0.6 mailer:1.34 mapdb-api:1.0.9.0 mask-passwords:3.0 matrix-auth:3.0 matrix-combinations-parameter:1.3.1 matrix-project:772.v494f19991984 maven-plugin:3.15.1 metrics:4.0.2.8 momentjs:1.1.1 msbuild:1.30 multi-branch-project-plugin:0.7 naginator:1.18.1 nodelabelparameter:1.10.2 okhttp-api:4.9.3-105.vb96869f8ac3a pam-auth:1.6.1 parameterized-scheduler:1.1 parameterized-trigger:2.43 performance:3.20 pipeline-build-step:2.15 pipeline-graph-analysis:1.12 pipeline-input-step:427.va6441fa17010 pipeline-milestone-step:1.3.2 pipeline-model-api:1.9.3 pipeline-model-declarative-agent:1.1.1 pipeline-model-definition:1.9.3 pipeline-model-extensions:1.9.3 pipeline-rest-api:2.19 pipeline-stage-step:2.5 pipeline-stage-tags-metadata:1.9.3 pipeline-stage-view:2.19 plain-credentials:1.8 plugin-usage-plugin:2.1 plugin-util-api:2.8.0 popper-api:1.16.1-2 popper2-api:2.11.0-1 postbuild-task:1.9 publish-over:0.22 radiatorviewplugin:1.29 rebuild:1.32 resource-disposer:0.20 ruby-runtime:0.12 run-condition:1.5 rvm:0.6 scm-api:608.vfa_f971c5a_a_e9 scm-sync-configuration:0.0.10 scoring-load-balancer:1.0.1 script-security:1138.v8e727069a_025 setenv:1.1 signal-killer:1.1 slack:2.49 snakeyaml-api:1.29.1 sonar:2.14 ssh-credentials:1.19 ssh-slaves:1.33.0 sshd:3.1.0 structs:318.va_f3ccb_729b_71 subversion:2.15.1 theme-manager:0.6 thinBackup:1.10 throttle-concurrents:2.5 timestamper:1.15 token-macro:293.v283932a_0a_b_49 translation:1.16 trilead-api:1.0.13 variant:1.4 view-job-filters:2.3 windows-slaves:1.8 workflow-aggregator:2.6 workflow-api:1153.vb_912c0e47fb_a_ workflow-basic-steps:2.24 workflow-cps:2660.vb_c0412dc4e6d workflow-cps-global-lib:552.vd9cc05b8a2e1 workflow-durable-task-step:1107.v5dab75aaccbd workflow-job:1145.v7f2433caa07f workflow-multibranch:2.26 workflow-scm-step:2.13 workflow-step-api:625.vd896b_f445a_f8 workflow-support:804.vba10a18a1476 ws-cleanup:0.43 xcode-plugin:2.0.17-565.v1c48051d46ef zap:1.1.0 zapper:1.0.7 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Linux

Reproduction steps

Set up a simple job to scan a Docker image.

Expected Results

The job would finish without error.

Actual Results

The scan seems to complete with return code of 0, but in post processing, it fails:

grype return value: 0 Archiving artifacts ERROR: Build step failed with exception java.lang.IllegalArgumentException: No enum constant io.jenkins.plugins.grypescanner.Finding.SEVERITY.Negligible at java.lang.Enum.valueOf(Enum.java:238) at io.jenkins.plugins.grypescanner.Finding$SEVERITY.valueOf(Finding.java:9) at io.jenkins.plugins.grypescanner.Finding.<init>(Finding.java:68) at io.jenkins.plugins.grypescanner.Findings.<init>(Findings.java:43) at io.jenkins.plugins.grypescanner.GrypeScannerStep.perform(GrypeScannerStep.java:110) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806) at hudson.model.Build$BuildExecution.build(Build.java:198) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514) at hudson.model.Run.execute(Run.java:1888) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:99) at hudson.model.Executor.run(Executor.java:432) Build step 'Vulnerability scan with grype' marked build as failure

Anything else?

No response

dtbaum commented 1 year ago

Thenk you for bug report! Fixed in 1.5.