Skip to content

Multiple parraller trivy scans using the plugin fails #194

@yarinlaniado

Description

@yarinlaniado

When I am using the plugin in our jenkins, I noticed that if 2 jobs are using the same machine and utility, they both create
scan2html-temp-report.json in their TMP_DIR location, this caused my job to fail because it removed the json after the scan of the first job.

Optional solution solution for this will be to modify the name of the json to be a dynamic one once we are running the scan, I note that

func GetScan2htmlTempReportPath() string { return filepath.Join(os.TempDir(), "scan2html-temp-report.json") }
I saw this function in the internal/common dir.

Another solution that I did right now is to create a new dir in the TMP_DIR for each job I am running, but this will not use the caching that trivy provides

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions