Skip to content

Warn user about tokens in the comments

Dheeraj Joshi requested to merge djadmin-secret-detection-comments into master

Related issue: #368434 (closed)

What does this MR do and why?

This MR show a confirmation warning when user is about to submit a comment with potential sensitive tokens. This change applies to the MR and Issue comments.

This is the first iteration of this initiative, and shall be rolled out to other parts of the application too.

Screenshots or screen recordings

warn_token_message

How to set up and validate locally

  1. Go to any Issue or MR.
  2. Post a comment with a potential token, for example: "This message contains a token: glpat-1234567890abcdefghij"
  3. A confirmation warning should be shown

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Dheeraj Joshi

Merge request reports