Skip to content

Add services to allow revert vulnerabilities to detected state

What does this MR do?

Related to #230558 (closed)

This MR adds services necessary to revert Vulnerability back to detected state. Changelog entry will be added when new APIs are added.

Query

SELECT "vulnerability_occurrences".*
FROM "vulnerability_occurrences"
WHERE "vulnerability_occurrences"."vulnerability_id" = 3503842
  AND (
    EXISTS (
      SELECT 1
      FROM "vulnerability_feedback"
      WHERE (vulnerability_occurrences.report_type = vulnerability_feedback.category)
        AND (vulnerability_occurrences.project_id = vulnerability_feedback.project_id)
        AND (ENCODE(vulnerability_occurrences.project_fingerprint, 'HEX') = vulnerability_feedback.project_fingerprint)
        AND "vulnerability_feedback"."feedback_type" = 0
    )
  );

https://explain.depesz.com/s/De29 (~23ms)

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