Closed spu-xb01 closed 4 months ago
Hi, thanks for reaching out.
Its likely that Jenkins doesn't have permissions to interact with inspector-sbomgen. If you're intent on using a standalone binary, ensure that the jenkins user has permissions to start inspector-sbomgen. Alternatively, you can use the automatic downloader to allow the plugin to download and use the required binary at runtime. You can use this option by adding sbomgenSource: 'linuxAmd64'
to your build step. If you have an arm-based system, use "linuxArm64" instead.
Well, I have the same problem and Jenkins definitely can run the binary directly and generate a json file if I run it with a shell in my pipeline. However, using the same path within the plugin gives me the same error as above.
The issue was that the plugin runs on an agent but it's looking for the binary in the master, as explained here: https://github.com/jenkinsci/amazon-inspector-image-scanner-plugin/issues/60#issuecomment-2275629406
Jenkins and plugins versions report
/home/ec2-user/inspector-sbomgen/linux/arm64/inspector-sbomgen
This is the correct path and the files are there ./inspector-sbomgen container -i alpine:latest If I don't run through a plugin everything works as expected
these solutions don't help https://docs.aws.amazon.com/inspector/latest/user/cicd-jenkins.html
What Operating System are you using (both controller, and any agents involved in the problem)?
NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/" SUPPORT_END="2025-06-30" Amazon Linux release 2 (Karoo)
Reproduction steps
Expected Results
Actual Results
Plugin execution ran into an error and is being aborted! Exception:com.amazon.inspector.jenkins.amazoninspectorbuildstep.exception.SbomgenNotFoundException: There was an issue running inspector-sbomgen, is /home/ec2-user/inspector-sbomgen/linux/arm64/inspector-sbomgen the correct path? com.amazon.inspector.jenkins.amazoninspectorbuildstep.exception.SbomgenNotFoundException: There was an issue running inspector-sbomgen, is /home/ec2-user/inspector-sbomgen/linux/arm64/inspector-sbomgen the correct path?
Anything else?
No response
Are you interested in contributing a fix?
No response