Documentation ¶
Index ¶
- func AddHttpBodyToMap(body string, m map[string][]string) error
- func CompareHeaders(h1 http.Header, h2 http.Header, res *[]models.HeaderResult, ...) bool
- func Contains(elems []string, v string) bool
- func FilterFields(r interface{}, filter []string, logger *zap.Logger) interface{}
- func FindNoisyFields(m map[string][]string, comparator func(string, []string) bool) []string
- func Flatten(j interface{}) map[string][]string
- func FlattenHttpResponse(h http.Header, body string) (map[string][]string, error)
- func IsTime(stringDate string) bool
- func IsValidPath(s string) bool
- func Match(exp, act string, noise []string, log *zap.Logger) (string, string, bool, error)
- func ReplaceFields(r interface{}, replace map[string]string, logger *zap.Logger) interface{}
- func SanitiseInput(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHttpBodyToMap ¶ added in v0.7.4
func CompareHeaders ¶
func FilterFields ¶ added in v0.8.0
func FindNoisyFields ¶ added in v0.7.4
func Flatten ¶ added in v0.7.4
Flatten takes a map and returns a new one where nested maps are replaced by dot-delimited keys. examples of valid jsons - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#examples
func FlattenHttpResponse ¶ added in v0.7.4
func IsValidPath ¶ added in v0.5.6
func ReplaceFields ¶ added in v0.8.0
ReplaceFields replaces the http test-case Request fields to values from the "replace" map.
func SanitiseInput ¶ added in v0.5.6
sanitiseInput sanitises user input strings before logging them for safety, removing newlines and escaping HTML tags. This is to prevent log injection, including forgery of log records. Reference: https://www.owasp.org/index.php/Log_Injection
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.