Technical implementation planning
Implementation plan:
-
Add "source" string column to ci_builds table that defaults to nullAddci_builds_sourcestable or similar that refers the source value to SEP-initiated builds - Add
sourceproperty toCi::Buildthat returns above column when present; otherwise, return the pipeline's source value - When an SEP job is created, set the source value to
scan_execution_policy(open question on where in the code this happens - currently SEP jobs are identified by name) - Add new claims to
Gitlab::Ci::Jwt.custom_claimsmethod based on the build's source property:-
job_source: same as build source property; may be null -
job_policy_ref_uri: for SEP jobs, points to the security policy project file that defined the scan policy, in the format gitlab.example.com/my-group/my-project//.gitlab-ci.yml@refs/heads/main -
job_policy_ref_sha: for SEP jobs, the git commit SHA for the file above that introduced the policy
-
- Add
"source"property to result in Job API (Ci::JobEntity) - [FE] Add source filtering to Build > Jobs
Issue for items 1+2: #458803 (closed)
Issue for item 3: #459000 (closed)
Issue for item 4: #459001 (closed)
Issue for item 5: #459015 (closed)
Edited by Aaron Huntsman