Skip to content

Add more examples for how to use variables in pipeline execution policies

This is a follow-up from this discussion:

  1. It would be ideal to use an example with SAST_EXCLUDED_ANALYZERS as that is a common scenario for customers. If there are variables that allow users to circumvent a job that needs to run for compliance, it is a best practice to set the variables in the policy in such a way that prevents that behavior. It would be ideal to make this easier in the future without any manual config, but that's the current state and an example here will drive the point home.
  2. We may also want to advise on what to set the variable to if you want to prevent users from setting the variable downstream. I think we could set it as empty to prevent this? @connorgilbert Can you confirm?
  3. I think the language around sharing variables is valid as there are cases where this is needed. However, there is also a desire to block variables downstream. Maybe we can keep the example you have for "sharing" and add one for "blocking" downstream projects from overriding pipeline execution policy variables with the SAST_EXCLUDED_ANALYZERS example?