https://github.com/ehrktia/sensitive
library to mask sensitive fields
https://github.com/ehrktia/sensitive
data-security golang-library personal-identifiable-information
Last synced: 3 months ago
JSON representation
library to mask sensitive fields
- Host: GitHub
- URL: https://github.com/ehrktia/sensitive
- Owner: ehrktia
- License: mit
- Created: 2024-03-30T21:52:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-31T19:09:07.000Z (about 2 years ago)
- Last Synced: 2024-06-20T23:09:27.359Z (almost 2 years ago)
- Topics: data-security, golang-library, personal-identifiable-information
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sensitive
[](https://pkg.go.dev/github.com/ehrktia/sensitive@v0.1.0)
This is a lib which can be used to hide sensitive values in struct.Mostly in microservices/applications config is managed via external (json/yaml) files. The values are parsed and mapped to struct. Some applications which speaks to external APIs will require key to be provided. These keys can be managed in config value fields.When logging the config values in public these secrets can be exposed and cause data leaks.
Focus of the lib is to manage data leaks,the lib has a `Mask` method which is
used to perform this operation.
There are 2 input fields required for the operation
1. data structure
2. list of fields which are required to be masked or hidden
### usage
refer to `example/main.go` for how to use
*Note:-* please set env variable `SET_VALUE` with required value to be
used for masking sensitive value
### Todo
- [ ] expand the functionality to non exported columns
### contributing
please feel free to raise a PR with your changes