Invoke scanning logic from gem
Overview
To perform the actual secrets detection scan, we have to invoke the scanning logic from the gem. It is important to properly handle error messages received or timeouts happening on the side of the gem too.
Please see parent epic for more details and considerations.
Implementation Plan
-
Add the gem as a dependency to gitlab-org/gitlab
project. -
Update the new push check to: -
Invoke the scanning method and pass blob objects to it. -
Implement code necessary to handle timeouts, and display a meaningful message. -
Implement code necessary to handle error messages, and display them properly.
-
Notes
Please check these two points from this internal document for more information on handling messages: 1, 2.
Also, please have a look at https://gitlab.com/gitlab-org/gitlab/-/issues/425993.
Edited by Ahmed Hemdan