jenkinsci / amazon-inspector-image-scanner-plugin

Apache License 2.0
0 stars 1 forks source link

DisplayName with "/" #43

Closed anicksol closed 6 months ago

anicksol commented 6 months ago

Jenkins and plugins versions report

Environment Jenkins: 2.414.2 OS: Linux - 4.14.326-245.539.amzn2.x86_64 Java: 11.0.20 - Red Hat, Inc. (OpenJDK 64-Bit Server VM) --- ace-editor:1.1 amazon-ecr:1.114.vfd22430621f5 amazon-inspector-image-scanner:218.ve27f068f3f55 analysis-model-api:11.10.0 ansible:253.v4fe719ffdd8a_ ansicolor:1.0.4 antisamy-markup-formatter:162.v0e6ec0fcfcf6 apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 apache-httpcomponents-client-5-api:5.2.1-1.1 authentication-tokens:1.53.v1c90fd9191a_b_ aws-credentials:218.v1b_e9466ec5da_ aws-java-sdk:1.12.529-406.vdeff15e5817d aws-java-sdk-cloudformation:1.12.529-406.vdeff15e5817d aws-java-sdk-codebuild:1.12.529-406.vdeff15e5817d aws-java-sdk-core:1.12.69 aws-java-sdk-ec2:1.12.529-406.vdeff15e5817d aws-java-sdk-ecr:1.12.529-406.vdeff15e5817d aws-java-sdk-ecs:1.12.529-406.vdeff15e5817d aws-java-sdk-efs:1.12.529-406.vdeff15e5817d aws-java-sdk-elasticbeanstalk:1.12.529-406.vdeff15e5817d aws-java-sdk-iam:1.12.529-406.vdeff15e5817d aws-java-sdk-jmespath:1.12.69 aws-java-sdk-kinesis:1.12.529-406.vdeff15e5817d aws-java-sdk-kms:1.12.69 aws-java-sdk-logs:1.12.529-406.vdeff15e5817d aws-java-sdk-minimal:1.12.529-406.vdeff15e5817d aws-java-sdk-s3:1.12.69 aws-java-sdk-secretsmanager:1.12.529-406.vdeff15e5817d aws-java-sdk-sns:1.12.529-406.vdeff15e5817d aws-java-sdk-sqs:1.12.529-406.vdeff15e5817d aws-java-sdk-ssm:1.12.529-406.vdeff15e5817d aws-java-sdk-sts:1.12.69 aws-lambda:0.5.10 aws-lambda-cloud:0.4 aws-parameter-store:1.2.2 bootstrap4-api:4.6.0-6 bootstrap5-api:5.3.2-1 bouncycastle-api:2.29 branch-api:2.1128.v717130d4f816 build-timeout:1.31 build-user-vars-plugin:1.9 build-with-parameters:76.v9382db_f78962 caffeine-api:3.1.8-133.v17b_1ff2e0599 checks-api:2.0.2 cloud-stats:320.v96b_65297a_4b_b_ cloudbees-folder:6.848.ve3b_fd7839a_81 command-launcher:107.v773860566e2e commons-httpclient3-api:3.1-3 commons-lang3-api:3.13.0-62.v7d18e55f51e2 commons-text-api:1.10.0-78.v3e7b_ea_d5a_fe1 credentials:1319.v7eb_51b_3a_c97b_ credentials-binding:636.v55f1275c7b_27 data-tables-api:1.13.6-5 dependency-check-jenkins-plugin:5.4.3 display-url-api:2.200.vb_9327d658781 docker-commons:439.va_3cb_0a_6a_fb_29 docker-java-api:3.3.1-79.v20b_53427e041 docker-plugin:1.5 docker-workflow:572.v950f58993843 dtkit-api:3.0.2 durable-task:523.va_a_22cf15d5e0 ec2-fleet:3.0.0 echarts-api:5.4.0-6 email-ext:2.102 emailext-template:1.5 envinject:2.908.v66a_774b_31d93 envinject-api:1.199.v3ce31253ed13 extended-choice-parameter:376.v2e02857547b_a_ extensible-choice-parameter:1.8.1 font-awesome-api:6.4.2-1 forensics-api:2.3.0 git:5.2.0 git-client:4.5.0 git-parameter:0.9.19 git-server:99.va_0826a_b_cdfa_d gitlab-api:5.3.0-91.v1f9a_fda_d654f gitlab-branch-source:684.vea_fa_7c1e2fe3 gitlab-oauth:1.18 gitlab-plugin:1.7.16 google-oauth-plugin:1.318.vb_39c5db_e3041 handlebars:3.0.8 handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953 htmlpublisher:1.32 http_request:1.18 instance-identity:173.va_37c494ec4e5 ionicons-api:56.v1b_1c8c49374e jackson2-api:2.15.2-350.v0c2f3f8fc595 jakarta-activation-api:2.0.1-3 jakarta-mail-api:2.0.1-3 javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.8-1 jdk-tool:73.vddf737284550 jersey2-api:2.40-1 jquery:1.12.4-1 jquery-detached:1.2.1 jquery3-api:3.7.1-1 jsch:0.2.8-65.v052c39de79b_2 junit:1240.vf9529b_881428 lambda-test-runner:0.1.0 lockable-resources:1185.v0c528656ce04 mailer:463.vedf8358e006b_ mapdb-api:1.0.9-28.vf251ce40855d mask-passwords:173.v6a_077a_291eb_5 matrix-auth:3.2.1 matrix-project:808.v5a_b_5f56d6966 metrics:4.2.18-442.v02e107157925 mina-sshd-api-common:2.10.0-69.v28e3e36d18eb_ mina-sshd-api-core:2.10.0-69.v28e3e36d18eb_ miniorange-saml-sp:2.4.0 momentjs:1.1.1 monitoring:1.95.0 oauth-credentials:0.646.v02b_66dc03d2e pam-auth:1.10 parameterized-scheduler:255.v73827fcdf618 pipeline-aws:1.43 pipeline-build-step:505.v5f0844d8d126 pipeline-graph-analysis:202.va_d268e64deb_3 pipeline-graph-view:202.v6da_a_9e590325 pipeline-groovy-lib:689.veec561a_dee13 pipeline-input-step:477.v339683a_8d55e pipeline-milestone-step:111.v449306f708b_7 pipeline-model-api:2.2144.v077a_d1928a_40 pipeline-model-definition:2.2144.v077a_d1928a_40 pipeline-model-extensions:2.2144.v077a_d1928a_40 pipeline-rest-api:2.33 pipeline-stage-step:305.ve96d0205c1c6 pipeline-stage-tags-metadata:2.2144.v077a_d1928a_40 pipeline-stage-view:2.33 pipeline-utility-steps:2.16.0 plain-credentials:143.v1b_df8b_d3b_e48 plugin-util-api:3.6.0 popper-api:1.16.1-3 popper2-api:2.11.6-2 prism-api:1.29.0-8 publish-over:0.22 publish-over-ssh:1.25 resource-disposer:0.23 role-strategy:689.v731678c3e0eb_ saml:4.429.v9a_781a_61f1da_ scm-api:676.v886669a_199a_a_ script-security:1275.v23895f409fb_d sidebar-link:2.4.1 slack:684.v833089650554 snakeyaml-api:2.2-111.vc6598e30cc65 ssh-agent:333.v878b_53c89511 ssh-credentials:308.ve4497b_ccd8f4 ssh-slaves:2.916.vd17b_43357ce4 sshd:3.312.v1c601b_c83b_0e structs:325.vcb_307d2a_2782 thinBackup:1.18 timestamper:1.26 token-macro:384.vf35b_f26814ec trilead-api:2.84.v72119de229b_7 uno-choice:2.7.2 validating-string-parameter:183.v3748e79b_9737 variant:60.v7290fc0eb_b_cd warnings-ng:10.4.0 workflow-aggregator:596.v8c21c963d92d workflow-api:1283.v99c10937efcb_ workflow-basic-steps:1042.ve7b_140c4a_e0c workflow-cps:3802.vd42b_fcf00b_a_c workflow-cps-global-lib:609.vd95673f149b_b workflow-durable-task-step:1289.v4d3e7b_01546b_ workflow-job:1348.v32a_a_f150910e workflow-multibranch:756.v891d88f2cd46 workflow-scm-step:415.v434365564324 workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:865.v43e78cc44e0d ws-cleanup:0.45 xunit:3.1.3 ```text Paste the output here ```

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

AL2 master AL2023 for slave

Reproduction steps

1 When you use change Job display name with "/" like wrap([$class: 'BuildUser']) { currentBuild.displayName = "#${BUILD_NUMBER} - ${BRANCH}" currentBuild.description = "${APP_ENV} | ${BUILD_USER_ID} | run manual" } when in DisplayName is with character "/" then we get error

Expected Results

archive filename should be generated without "/" symbol

Actual Results

java.lang.RuntimeException: java.io.FileNotFoundException: /var/lib/jenkins/jobs/xxxxxxxxxxxxxx/157/archive/xxxx-157-dev/2.1.0-sbom.json (No such file or directory) at com.amazon.inspector.jenkins.amazoninspectorbuildstep.AmazonInspectorBuilder.writeSbomDataToFile(AmazonInspectorBuilder.java:307) at com.amazon.inspector.jenkins.amazoninspectorbuildstep.AmazonInspectorBuilder.perform(AmazonInspectorBuilder.java:192)

Anything else?

No response

Are you interested in contributing a fix?

No response

waltwilo commented 6 months ago

A new plugin version has released that may fix this issue. The function listed in the stack trace has been removed. Could you update the plugin and re-run it?

waltwilo commented 6 months ago

Closing due to no response.