BigW Consortium Gitlab

mask_secret.rb 237 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
module Gitlab
  module Ci::MaskSecret
    class << self
      def mask!(value, token)
        return value unless value.present? && token.present?

        value.gsub!(token, 'x' * token.length)
        value
      end
    end
  end
end