mask

package
v1.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 3 Imported by: 8

Documentation

Overview

Package mask offers the functionality for non-reversible masking of sensitive data in the GitLab application.

It provides the ability to determine whether or not a URL parameter or Header should be considered sensitive.

Additionally, it provides masking functionality to mask sensitive information that gets logged via logging, structured logging, sentry and distributed tracing.

Index

Constants

View Source
const RedactionString = "[FILTERED]"

RedactionString represents the filtered value used in place of sensitive data in the mask package.

Variables

This section is empty.

Functions

func IsSensitiveHeader

func IsSensitiveHeader(name string) bool

IsSensitiveHeader will return true if the given parameter name should be masked for sensitivity.

func IsSensitiveParam

func IsSensitiveParam(name string) bool

IsSensitiveParam will return true if the given parameter name should be masked for sensitivity.

func URL

func URL(originalURL string) string

URL will mask the sensitive components in an URL with `[FILTERED]`. This list should maintain parity with the list in GitLab-CE, maintained at https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/application.rb. Based on https://stackoverflow.com/a/52965552/474597.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL