Reset resolved_at column of vulnerabilities table while unresolving the records

Summary

We need to clear the resolved_at attribute of vulnerability records while changing their states from resolved to something else. This is currently not the case for the MarkResolvedAsDetected ingestion task.

Steps to reproduce

Example Project

gitlab-org/gitlab

What is the current bug behavior?

The resolved_at attribute of vulnerability records is not cleared when they are marked as re-detected.

What is the expected correct behavior?

The resolved_at attribute of vulnerability records is expected to be cleared when they are marked as re-detected.

Output of checks

This bug happens on GitLab.com

Possible fixes

Update the MarkResolvedAsDetected ingestion task to clear the resolved_at column.

Edited by 🤖 GitLab Bot 🤖