Ensure valid SHA in database task and indexer
Summary
In https://gitlab.com/gitlab-org/gitlab/-/blob/82ba4a6a5c78501413012a9f2a918aa7353917a0/ee/lib/gitlab/elastic/indexer.rb#L82 we can ensure that the SHA is a valid one
Possible fixes
Check the sha param using the regex Commit::COMMIT_SHA_PATTERN
.
Edited by Francisco Javier López (ex-Gitlab)