jenkinsci / amazon-inspector-image-scanner-plugin

Apache License 2.0
0 stars 1 forks source link

Throwing java null pointer exception with the version 315 #70

Open varun-xempla opened 2 weeks ago

varun-xempla commented 2 weeks ago

Jenkins and plugins versions report

jenkins 2.452.2, ubuntu 22.04, docker image scanning throwing null pointer exception error which absolutely worked fine with the previous versions but throwing error with 315.v956b_b_57f2588

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

jenkins master involved in the problem.

Reproduction steps

please solve the issue

Expected Results

it should complete the scan and show if any vulnerabilities are present

Actual Results

Throwing errors Converting SBOM Results to CSV. Plugin execution ran into an error and is being aborted! Exception:java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because the return value of "com.amazon.inspector.jenkins.amazoninspectorbuildstep.models.sbom.Components.Component.getName()" is null java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because the return value of "com.amazon.inspector.jenkins.amazoninspectorbuildstep.models.sbom.Components.Component.getName()" is null at com.amazon.inspector.jenkins.amazoninspectorbuildstep.utils.HtmlConversionUtils.getLineComponents(HtmlConversionUtils.java:81) at com.amazon.inspector.jenkins.amazoninspectorbuildstep.csvconversion.CsvConverter.routeDockerCsvData(CsvConverter.java:193) at com.amazon.inspector.jenkins.amazoninspectorbuildstep.csvconversion.CsvConverter.routeVulnerabilities(CsvConverter.java:173) at com.amazon.inspector.jenkins.amazoninspectorbuildstep.AmazonInspectorBuilder.perform(AmazonInspectorBuilder.java:251) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)

Anything else?

No response

Are you interested in contributing a fix?

No response

waltwilo commented 2 weeks ago

Hi, please update to version 332.vc76cdef1349e and retry your build.

varun-xempla commented 2 weeks ago

hey i have tried using 332.vc76cdef1349e https://github.com/jenkinsci/amazon-inspector-image-scanner-plugin/releases/tag/332.vc76cdef1349e but still getting the same error null point exception.

On Wed, 10 Jul 2024 at 21:50, waltwilo @.***> wrote:

Hi, please update to version 332.vc76cdef1349e https://github.com/jenkinsci/amazon-inspector-image-scanner-plugin/releases/tag/332.vc76cdef1349e and retry your build.

— Reply to this email directly, view it on GitHub https://github.com/jenkinsci/amazon-inspector-image-scanner-plugin/issues/70#issuecomment-2220954576, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJYAHJRKCJCSMBF247BSN33ZLVNM7AVCNFSM6AAAAABKUQLM56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRQHE2TINJXGY . You are receiving this because you authored the thread.Message ID: <jenkinsci/amazon-inspector-image-scanner-plugin/issues/70/2220954576@ github.com>

waltwilo commented 2 weeks ago

I pushed another change that should hopefully fix your issue. If the next release doesn't fix your issue. Please provide some more information on your jenkins job so I can try to reproduce the error.