Use `Pipeline#can_store_security_reports?` to check if we need to store security reports for a pipeline
Summary
While checking if we should store the security reports or not, we are checking the pipeline and the project separately in different places with the following logic;
# Check if pipeline has reports
pipeline.has_reports?(::Ci::JobArtifact.security_reports.or(::Ci::JobArtifact.license_scanning_reports))
# Check if project has the feature
pipeline.project.can_store_security_reports?
Instead of doing this in different places, we should use the new method Pipeline#can_store_security_reports?
which applies both of the checks above.
For more information please check !42634 (comment 423470834)
Implementation plan
Edited by Mehmet Emin INAC