Optional control of all scan execution policy CI variables
### Release notes <!-- What is the problem and solution you're proposing? This content sets the overall vision for the feature and serves as the release notes that will populate in various places, including the \\\[release post blog\\\](https://about.gitlab.com/releases/categories/releases/) and \\\[Gitlab project releases\\\](https://gitlab.com/gitlab-org/gitlab/-/releases). " --> ### Problem to solve <!-- What problem do we solve? Try to define the who/what/why of the opportunity as a user story. For example, "As a (who), I want (what), so I can (why/value)." --> Users need a way to run "immutable" jobs that cannot be tampered with and that only accept authorized/allowed inputs. [Scan Execution Policies with custom yaml support](https://gitlab.com/groups/gitlab-org/-/epics/7312) are very close to supporting that; however, they still allow variables which are not defined in the policy to influence the job. This puts the burden on the compliance team to define all variables which might potentially influence the job. Users need a way to easily "unset" all variables that are not explicitly approved to provide a fully immutable job. ### Intended users * [Cameron (Compliance Manager)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#cameron-compliance-manager) ### Proposal <!-- How are we going to solve the problem? Try to include the user journey! https://about.gitlab.com/handbook/journeys/#user-journey --> 1. Users will have the option to unset all variables not defined in the scan execution policy job. 1. These variables will be unset for the scan execution policy jobs only. The variables will not be unset for jobs not defined in the scan execution policy. 1. By default this option will not be selected. 1. Users will be able to define "exceptions" or a list of explicitly allowed variables which will not be unset. ### Permissions and Security This will not change permissions ### Documentation Documentation will be updated on the following pages: 1. https://docs.gitlab.com/ee/user/application_security/policies/scan-execution-policies.html ### Availability & Testing <!-- This section needs to be retained and filled in during the workflow planning breakdown phase of this feature proposal, if not earlier. What risks does this change pose to our availability? How might it affect the quality of the product? What additional test coverage or changes to tests will be needed? Will it require cross-browser testing? Please list the test areas (unit, integration and end-to-end) that needs to be added or updated to ensure that this feature will work as intended. Please use the list below as guidance. \\\* Unit test changes \\\* Integration test changes \\\* End-to-end test change See the test engineering planning process and reach out to your counterpart Software Engineer in Test for assistance: https://about.gitlab.com/handbook/engineering/quality/test-engineering/#test-planning --> ### What does success look like, and how can we measure that? <!-- Define both the success metrics and acceptance criteria. Note that success metrics indicate the desired business outcomes, while acceptance criteria indicate when the solution is working correctly. If there is no way to measure success, link to an issue that will implement a way to measure this. --> ### What is the type of buyer? <!-- What is the buyer persona for this feature? See https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/buyer-persona/ In which enterprise tier should this feature go? See https://about.gitlab.com/handbook/product/pricing/#four-tiers --> ~"GitLab Ultimate" ### Is this a cross-stage feature? <!-- Communicate if this change will affect multiple Stage Groups or product areas. We recommend always start with the assumption that a feature request will have an impact into another Group. Loop in the most relevant PM and Product Designer from that Group to provide strategic support to help align the Group's broader plan and vision, as well as to avoid UX and technical debt. https://about.gitlab.com/handbook/product/#cross-stage-features --> No ### Links / references <!-- Label reminders - you should have one of each of the following labels if you can figure out the correct ones --> 1. https://gitlab.com/gitlab-org/gitlab/-/issues/470070+ ### Customer Interest 1. https://gitlab.my.salesforce.com/00161000019p3gd?srPos=0&srKp=001 - 50 seats, ~"GitLab Ultimate" <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> _This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc._ <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
epic