Skip to content

Find correct artifact file

Olivier Gonzalez requested to merge find_correct_artifact_in_archive into master

What does this MR do?

Ensure we fetch the correct artifact from the container archive.

Why was this MR needed?

When running SAST on a project that already has a report file present in the dir, this file is copied to the container and then it's the first one that is found when looking in the output archive. This makes all execution of SAST returning the exact same report instead of the correct one that was generated in the container.

This is unlikely to happen in CI but when running SAST locally multiple times in a row it leads to weird behavior that is hard to debug...

All in all it can't hurt to look for the full filepath where we want the report to be written instead of just the filename.

Edited by Olivier Gonzalez

Merge request reports