[go: up one dir, main page]

Skip to content

Add prefix to User#static_object_token

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

A static_object_token is generated in User. As defense in depth we should add a static prefix to these, to enable easier detection if an admin / user accidentally leaks the secrets. This is not a vulnerability.

app/models/user.rb:78:3: C: Gitlab/TokenWithoutPrefix: Tokens should be prefixed. See doc/development/secure_coding_guidelines.md#token-prefixes for more information.
  add_authentication_token_field :static_object_token, encrypted: :optional
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Relevant:

Edited by Nick Malcolm