mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-24 07:14:15 +00:00
Update consts.go and messageSensitiveDataCleaner.go
This commit is contained in:
parent
f958de6619
commit
3497dc057b
@ -4,6 +4,5 @@ const maskedFieldPlaceholderValue = "[REDACTED]"
|
|||||||
var personallyIdentifiableDataFields = []string {"token", "authorization", "authentication", "cookie", "userid", "password",
|
var personallyIdentifiableDataFields = []string {"token", "authorization", "authentication", "cookie", "userid", "password",
|
||||||
"username", "user", "key", "passcode", "pass", "auth", "authtoken", "jwt",
|
"username", "user", "key", "passcode", "pass", "auth", "authtoken", "jwt",
|
||||||
"bearer", "clientid", "clientsecret", "redirecturi", "phonenumber",
|
"bearer", "clientid", "clientsecret", "redirecturi", "phonenumber",
|
||||||
"zip", "zipcode", "address", "country", "city", "state", "residence",
|
"zip", "zipcode", "address", "country", "firstname", "lastname",
|
||||||
"name", "firstname", "lastname", "suffix", "middlename", "fname", "lname",
|
"middlename", "fname", "lname", "birthdate"}
|
||||||
"mname", "birthday", "birthday", "birthdate", "bday", "sender", "receiver"}
|
|
||||||
|
@ -7,7 +7,6 @@ import (
|
|||||||
"mizuserver/pkg/tap"
|
"mizuserver/pkg/tap"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func FilterSensitiveInfoFromHarRequest(harOutputItem *tap.OutputChannelItem) {
|
func FilterSensitiveInfoFromHarRequest(harOutputItem *tap.OutputChannelItem) {
|
||||||
@ -87,6 +86,7 @@ func filterJsonMap(jsonMap map[string] interface{}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// replaces sensitive query params in url string (http://service/api?userId=bob&password=123&type=login -> http://service/api?userId=[REDACTED]&password=[REDACTED]&type=login)
|
||||||
func filterUrl(originalUrl string) string {
|
func filterUrl(originalUrl string) string {
|
||||||
parsedUrl, err := url.Parse(originalUrl)
|
parsedUrl, err := url.Parse(originalUrl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user