jenkinsci / aqua-microscanner-plugin

Enables scanning of docker builds in Jenkins for OS package vulnerabilities.
https://plugins.jenkins.io/aqua-microscanner/
Apache License 2.0
35 stars 20 forks source link

./microscanner: Text file busy issue #22

Closed kevinchowvungle closed 5 years ago

kevinchowvungle commented 5 years ago

Describe the bug I keep getting non-zero code: 2 error when running scan with the micro-scanner plugin.

To Reproduce Steps to reproduce the behavior:

  1. Install the plugin.
  2. Run it as a pipeline per the example.
  3. In Console output, see:

[Pipeline] aquaMicroscanner Aqua MicroScanner in progress... The command '/bin/sh -c chmod +x microscanner && ./microscanner ${token} --html --continue-on-failure --no-verify' returned a non-zero code: 2 Archiving artifacts Archiving artifacts [Pipeline] }
[Pipeline] // stage [Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Scanning failed.
Finished: FAILURE`

  1. scanout.html shows:

Sending build context to Docker daemon 16.38 kB Step 1/5 : FROM alpine:latest ---> caf27325b298 Step 2/5 : ADD https://get.aquasec.com/microscanner . ---> 39dc268a1695 Removing intermediate container 2f81a400e12b Step 3/5 : USER 0 ---> Running in df4b0815691f ---> c1d9656a589c Removing intermediate container df4b0815691f Step 4/5 : ARG token ---> Running in c6f8e603e015 ---> aa20b1314490 Removing intermediate container c6f8e603e015 Step 5/5 : RUN chmod +x microscanner && ./microscanner ${token} --html --continue-on-failure --no-verify ---> Running in 4052b616a67d /bin/sh: ./microscanner: Text file busy 

  1. See error

Expected behavior Should have no error and see the report html.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

Note: I googled and found this solution: https://github.com/lukebond/microscanner-wrapper/issues/7

Need this same fix? https://github.com/stafot/microscanner-wrapper/commit/33ea38c2eb6caa234dd9e2d6d6569891ecade24d

kevinchowvungle commented 5 years ago

Switch to a new jenkins worker and this issue is resolved.