[Spike] use CI Job source for uniqueness on conflicting names
Pipeline execution policies can inject jobs into project pipelines. Currently, we enforce job name uniqueness which hard-fails the pipeline. This can cause issues with the built-in templates for security scanners which don't allow for job name customizations. If two policies include the same built-in template, the pipeline fails.
We are introducing a new strategy that overrides project jobs in case of a name conflict to avoid a CI failure.
In this spike we want to look for alternative solutions to allow both jobs to run even though they share the same name.
Ideas
We recently had changes added in &11796 (comment 2004323500) that introduce a
sourcevalue in the API that helps us indicate when a job was enforced from a scan execution policy. There is work still to be done to indicate the same for pipeline execution policies, but I wonder if this can also be a way to determineuniqueness. A job being enforced in a pipeline with the namedependency_scanningwithsource = pipeline execution policywould be unique to a job with the same name andsource = empty?/project-name?. Foggy on what other sources are available at the moment but wanted to see if there might be a way to use the source for some of the challenges we've run into.