Add mutation to dismiss multiple vulnerabilities
What does this MR do and why?
This change introduces a new mutation (Mutation.VulnerabilitiesDismiss
) to dismiss multiple vulnerabilities at the same time. It accepts a maximum of 100 vulnerability id's at a time and performs bulk inserts and updates to the vulnerabilities
, vulnerability_state_transitions
, vulnerability_reads
and notes
tables.
The following SQL queries are examples of the queries that are executed to perform a bulk update of 100 vulnerabilities.
SELECT DISTINCT
"projects".*
FROM
"projects"
WHERE
"projects"."id" IN ( SELECT DISTINCT
"vulnerabilities"."project_id"
FROM
"vulnerabilities"
WHERE
"vulnerabilities"."id" IN (4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 4420, 4421, 4422, 4423, 4424, 4425))
https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/19801/commands/64815
SELECT
"namespaces".*
FROM
"namespaces"
WHERE
"namespaces"."type" = 'Group'
AND "namespaces"."id" = 73460
SELECT
"namespaces".*
FROM
"namespaces"
WHERE
"namespaces"."id" = 73460
SELECT
"project_features".*
FROM
"project_features"
WHERE
"project_features"."project_id" = 34540
SELECT
MAX("project_authorizations"."access_level") AS maximum_access_level,
"project_authorizations"."user_id" AS project_authorizations_user_id
FROM
"project_authorizations"
WHERE
"project_authorizations"."project_id" = 34540
AND "project_authorizations"."user_id" = 38931
GROUP BY
"project_authorizations"."user_id"
SELECT
"vulnerabilities"."id",
"vulnerabilities"."state",
"vulnerabilities"."project_id"
FROM
"vulnerabilities"
WHERE
"vulnerabilities"."id" IN (4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 4420, 4421, 4422, 4423, 4424, 4425)
AND "vulnerabilities"."state" != 2
https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/19817/commands/64865
INSERT INTO "notes" ("noteable_type", "noteable_id", "project_id", "system", "note", "author_id", "created_at", "updated_at")
VALUES ('Vulnerability', 4326, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4327, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4328, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4329, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4330, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4331, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4332, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4333, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4334, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4335, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4336, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4337, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4338, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4339, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4340, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4341, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4342, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4343, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4344, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4345, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4346, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4347, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4348, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4349, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4350, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4351, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4352, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4353, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4354, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4355, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4356, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4357, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4358, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4359, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4360, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4361, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4362, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4363, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4364, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4365, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4366, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4367, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4368, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4369, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4370, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4371, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4372, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4373, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4374, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4375, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4376, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4377, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4378, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4379, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4380, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4381, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4382, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4383, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4384, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4385, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4386, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4387, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4388, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4389, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4390, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4391, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4392, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4393, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4394, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4395, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4396, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4397, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4398, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4399, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4400, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4401, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4402, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4403, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4404, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4405, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4406, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4407, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4408, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4409, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4410, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4411, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4412, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4413, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4414, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4415, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4416, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4417, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4418, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4419, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4420, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4421, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4422, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4423, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4424, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
('Vulnerability', 4425, 34540, TRUE, 'changed vulnerability status to Dismissed: Used In Tests and the following comment: "Dismissal Feedback"', 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435')
RETURNING
"id"
INSERT INTO "vulnerability_state_transitions" ("vulnerability_id", "from_state", "to_state", "comment", "dismissal_reason", "author_id", "created_at", "updated_at")
VALUES (4326, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4327, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4328, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4329, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4330, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4331, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4332, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4333, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4334, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4335, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4336, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4337, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4338, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4339, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4340, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4341, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4342, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4343, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4344, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4345, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4346, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4347, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4348, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4349, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4350, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4351, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4352, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4353, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4354, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4355, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4356, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4357, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4358, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4359, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4360, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4361, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4362, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4363, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4364, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4365, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4366, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4367, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4368, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4369, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4370, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4371, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4372, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4373, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4374, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4375, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4376, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4377, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4378, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4379, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4380, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4381, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4382, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4383, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4384, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4385, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4386, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4387, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4388, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4389, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4390, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4391, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4392, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4393, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4394, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4395, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4396, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4397, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4398, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4399, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4400, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4401, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4402, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4403, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4404, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4405, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4406, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4407, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4408, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4409, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4410, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4411, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4412, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4413, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4414, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4415, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4416, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4417, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4418, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4419, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4420, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4421, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4422, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4423, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4424, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435'),
(4425, 1, 2, 'Dismissal Feedback', 3, 38931, '2023-06-21 21:37:29.834435', '2023-06-21 21:37:29.834435')
RETURNING
"id"
UPDATE
"vulnerability_reads"
SET
"dismissal_reason" = 3
WHERE
"vulnerability_reads"."vulnerability_id" IN (
SELECT
"vulnerabilities"."id"
FROM
"vulnerabilities"
WHERE
"vulnerabilities"."id" IN (4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 4420, 4421, 4422, 4423, 4424, 4425)
AND "vulnerabilities"."state" != 2)
UPDATE
"vulnerabilities"
SET
"state" = 2,
"dismissed_by_id" = 38931,
"dismissed_at" = '2023-06-21 21:37:29.834435',
"updated_at" = '2023-06-21 21:37:29.834435'
WHERE
"vulnerabilities"."id" IN (4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 4420, 4421, 4422, 4423, 4424, 4425)
AND "vulnerabilities"."state" != 2
Screenshots or screen recordings
When the feature flag is disabled:
When executed with valid arguments:
With a generated system note:
When executed with too many vulnerabilities (maximum 100):
How to set up and validate locally
- Call
Feature.enable(:dismiss_vulnerabilities)
in the rails console for the relevant project(s). - Visit the graphql explorer
http://gdk.test:3000/-/graphql-explorer
- Execute the mutation
mutation dismissVulnerabilities($ids: [VulnerabilityID!]!, $comment: String!) { vulnerabilitiesDismiss( input: {vulnerabilityIds: $ids, comment: $comment, dismissalReason: USED_IN_TESTS} ) { vulnerabilities { id state dismissedAt dismissedBy { name } stateTransitions { nodes { dismissalReason fromState toState comment author { name } } } } errors } }
{ "ids": [ "gid://gitlab/Vulnerability/100", "gid://gitlab/Vulnerability/101", "gid://gitlab/Vulnerability/102", ], "comment": "A comment" }
- Verify the results by checking that the
state
isDISMISSED
and that thestateTransitions
includes a transition with atoState
ofDISMISSED
.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.