-
Previous Value Current Value `ImageScannerStep` fails with `InvalidPathException` on Windows — colon in Trivy output filename
`ImageScannerStep` fails with `InvalidPathException` on Windows due to `:` in Trivy output filename
-
This step is running inside container, and does not support to run on Windows. Please run it on an agent installed on Linux.
-
I do have an agent that is running on Linux and the CI/CD job is being executed there. The issue is not the where the step is being executed. The issue is the filename being generated by Trivy. When it tries to publish the report back to the OneDev server running on Windows it fails due to an invalid character (
:) in the filename. -
I see. You are running the job on Linux agent and server on Windows. This is totally valid. Should be a bug and will look into this.
-
Thanks Robin!
-
State changed as build OD-7402 (15.0.8) is successful
-
OneDev
changed state to 'Closed' 1 month ago
Previous Value Current Value Open
Closed
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
15.0.7
|
| Labels |
No labels
|
Issue Votes (0)
The
ImageScannerStepfails during thepublish-scanner-reportsub-step when the OneDev server is running on Windows. The agent successfully completes the Trivy scan, but the server throws anInvalidPathExceptionwhen attempting to untar the scan results because Trivy names its output file after the image digestsha256:<hash>.jsonand the colon in that filename is illegal on Windows paths.Environment:
Steps to reproduce:
BuildImageStep(OCI output) followed byImageScannerSteppublish-scanner-reportfails with 502Build log error:
Suggested fix: Sanitize the Trivy output filename before packaging into the tar archive - replace
:with - or _ (e.g., sha256-.json) so it is valid on both Linux and Windows.