Use project bot users to run scan execution policies pipelines
All threads resolved!
All threads resolved!
Compare changes
Files
21+ 1
− 1
This MR adds a:
scan_execution_bot_users
.bot_user_id
to security_orchestration_policy_configurations
.security_policy_bot
.Security::OrchestrationConfiguration
is assigned.With the Feature flag scan_execution_bot_users
enabled. With every new security configuration is assigned to a project, it should create a bot user and add it as a guest to the project.
In the next iteration, we want to use the bot user to trigger scan execution pipelines. Currently, the last user that edited the security policy project is used as a triggerer for the pipelines.
Related issue #394958 (closed)
Screenrecording coming soon.
There are 4 cases to validate:
andysoiron/security-scan-results-policy-bots
branchrails db:migrate
Feature.enable(:scan_execution_bot_users)
bot
member named GitLab Security Policy Bot.Project.find(YOUR_PROJECT_ID).security_orchestration_policy_configuration
bot_user_id
field should match the ID of the bot user.bot
member named GitLab Security Policy Bot.Project.find(YOUR_PROJECT_ID).security_orchestration_policy_configuration
bot_user_id
field should be nil
.Rollback migrations:
rails db:migrate:down:main VERSION=20230419192748
rails db:migrate:down:ci VERSION=20230419192748
rails db:migrate:down:main VERSION=20230419193807
rails db:migrate:down:ci VERSION=20230419193807
rails db:migrate:down:main VERSION=20230425124907
rails db:migrate:down:ci VERSION=20230419193807
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.