Skip to content

Add vulnerabilities_allowed column

What does this MR do?

Add vulnerabilities_allowed column into approval_project_rules table.

Related issue: #335335 (closed)

Follow-up MR which handles the validation and default value in the application logic.

db:migrate:

bundle exec rails db:migrate
== 20210721211602 AddVulnerabilityAmountColumnIntoApprovalProjectRules: migrating
-- add_column(:approval_project_rules, :vulnerabilities_allowed, :integer, {:limit=>2})
   -> 0.0035s
== 20210721211602 AddVulnerabilityAmountColumnIntoApprovalProjectRules: migrated (0.0036s)

db:rollback:

bundle exec rails db:rollback
== 20210721211602 AddVulnerabilityAmountColumnIntoApprovalProjectRules: reverting
-- remove_column(:approval_project_rules, :vulnerabilities_allowed)
   -> 0.0027s
== 20210721211602 AddVulnerabilityAmountColumnIntoApprovalProjectRules: reverted (0.0027s)

database-lab:

exec alter table "approval_project_rules" add "vulnerabilities_allowed" smallint;
Session: 5333
The query has been executed. Duration: 9.006 ms (edited)  

Screenshots or Screencasts (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Zamir Martins

Merge request reports