Resolve the race-condition between ScanSecurityReportSecretsWorker and Security::StoreScansService
According to this comment, there is a race-condition among ScanSecurityReportSecretsWorker and Security::StoreScansService. ScanSecurityReportSecretsWorker was invoked before the actual security report was stored. That is why we are seeing the non-deterministic value of true/false for this line: https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/workers/ee/build_finished_worker.rb#L25
Edited by Saikat Sarkar