Skip to content

Assess impact of CI Decomposition on DAST On-Demand

assess impact of !62092 (closed) and #334670 (closed) on dast on-demand scans. this may be relevant because we expresses relations between dast entities and ci entities at the database level.

summary

schema

builds

gitlabhq_development=# \d dast_scanner_profiles_builds
 Table "public.dast_scanner_profiles_builds"
 Column | Type | Collation | Nullable | Default
-------------------------+--------+-----------+----------+---------
 dast_scanner_profile_id | bigint | | not null |
 ci_build_id | bigint | | not null |
Indexes:
 "dast_scanner_profiles_builds_pkey" PRIMARY KEY, btree (dast_scanner_profile_id, ci_build_id)
 "dast_scanner_profiles_builds_on_ci_build_id" UNIQUE, btree (ci_build_id)
Foreign-key constraints:
 "fk_5d46286ad3" FOREIGN KEY (dast_scanner_profile_id) REFERENCES dast_scanner_profiles(id) ON DELETE CASCADE
 "fk_e4c49200f8" FOREIGN KEY (ci_build_id) REFERENCES ci_builds(id) ON DELETE CASCADE
gitlabhq_development=# \d dast_site_profiles_builds
 Table "public.dast_site_profiles_builds"
 Column | Type | Collation | Nullable | Default
----------------------+--------+-----------+----------+---------
 dast_site_profile_id | bigint | | not null |
 ci_build_id | bigint | | not null |
Indexes:
 "dast_site_profiles_builds_pkey" PRIMARY KEY, btree (dast_site_profile_id, ci_build_id)
 "dast_site_profiles_builds_on_ci_build_id" UNIQUE, btree (ci_build_id)
Foreign-key constraints:
 "fk_94e80df60e" FOREIGN KEY (dast_site_profile_id) REFERENCES dast_site_profiles(id) ON DELETE CASCADE
 "fk_a325505e99" FOREIGN KEY (ci_build_id) REFERENCES ci_builds(id) ON DELETE CASCADE

pipelines

gitlabhq_development=# \d dast_profiles_pipelines
 Table "public.dast_profiles_pipelines"
 Column | Type | Collation | Nullable | Default
-----------------+--------+-----------+----------+---------
 dast_profile_id | bigint | | not null |
 ci_pipeline_id | bigint | | not null |
Indexes:
 "dast_profiles_pipelines_pkey" PRIMARY KEY, btree (dast_profile_id, ci_pipeline_id)
 "index_dast_profiles_pipelines_on_ci_pipeline_id" UNIQUE, btree (ci_pipeline_id)
Foreign-key constraints:
 "fk_a60cad829d" FOREIGN KEY (ci_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE
 "fk_cc206a8c13" FOREIGN KEY (dast_profile_id) REFERENCES dast_profiles(id) ON DELETE CASCADE
gitlabhq_development=# \d dast_site_profiles_pipelines
 Table "public.dast_site_profiles_pipelines"
 Column | Type | Collation | Nullable | Default
----------------------+--------+-----------+----------+---------
 dast_site_profile_id | bigint | | not null |
 ci_pipeline_id | bigint | | not null |
Indexes:
 "dast_site_profiles_pipelines_pkey" PRIMARY KEY, btree (dast_site_profile_id, ci_pipeline_id)
 "index_dast_site_profiles_pipelines_on_ci_pipeline_id" UNIQUE, btree (ci_pipeline_id)
Foreign-key constraints:
 "fk_53849b0ad5" FOREIGN KEY (ci_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE
 "fk_cf05cf8fe1" FOREIGN KEY (dast_site_profile_id) REFERENCES dast_site_profiles(id) ON DELETE CASCADE

notes

once !64882 (merged) is merged, only dast_site_profiles_builds and dast_scanner_profiles_builds will be relevant.

Edited by Philip Cunningham