Skip to content

Add Vulnerabilities External Link model

What does this MR do?

Related to #276897 (closed)

This change adds new model to database to store external links for vulnerabilities (ie. information about created issues in Jira).

Migrations

== 20201124075951 CreateVulnerabilityExternalLinks: migrating =================
-- create_table(:vulnerability_external_issue_links, {:if_not_exists=>true})
   -> 0.0145s
-- transaction_open?()
   -> 0.0000s
-- current_schema()
   -> 0.0002s
-- execute("ALTER TABLE vulnerability_external_issue_links\nADD CONSTRAINT check_68cffd19b0\nCHECK ( char_length(external_project_key) <= 255 )\nNOT VALID;\n")
   -> 0.0004s
-- current_schema()
   -> 0.0002s
-- execute("SET statement_timeout TO 0")
   -> 0.0002s
-- execute("ALTER TABLE vulnerability_external_issue_links VALIDATE CONSTRAINT check_68cffd19b0;")
   -> 0.0005s
-- execute("RESET ALL")
   -> 0.0002s
-- transaction_open?()
   -> 0.0000s
-- current_schema()
   -> 0.0002s
-- execute("ALTER TABLE vulnerability_external_issue_links\nADD CONSTRAINT check_3200604f5e\nCHECK ( char_length(external_issue_key) <= 255 )\nNOT VALID;\n")
   -> 0.0004s
-- current_schema()
   -> 0.0002s
-- execute("ALTER TABLE vulnerability_external_issue_links VALIDATE CONSTRAINT check_3200604f5e;")
   -> 0.0004s
== 20201124075951 CreateVulnerabilityExternalLinks: migrated (0.0276s) ========
== 20201124075951 CreateVulnerabilityExternalLinks: reverting =================
-- drop_table(:vulnerability_external_issue_links)
   -> 0.0126s
== 20201124075951 CreateVulnerabilityExternalLinks: reverted (0.0189s) ========

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] 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 Alan (Maciej) Paruszewski

Merge request reports