Documentation ¶
Index ¶
- Constants
- Variables
- func AddStringSliceItem(item string, slice *[]string)
- func BuildRegex(pattern string, specialChar string, length int) string
- func BuildRegexJWT(firstRange, secondRange, thirdRange string) string
- func IsDone(ctx context.Context) bool
- func PinnedCertPool() *x509.CertPool
- func PinnedRetryableHttpClient() *http.Client
- func RangeValidation(rangeInput string) bool
- func Recover(ctx context.Context)
- func RecoverWithExit(ctx context.Context)
- func RemoveStringSliceItem(item string, slice *[]string)
- func RetryableHttpClient() *http.Client
- func RetryableHttpClientTimeout(timeOutSeconds int64) *http.Client
- func SaneHttpClient() *http.Client
- func SaneHttpClientTimeOut(timeOutSeconds int64) *http.Client
- func SkipFile(filename string, data []byte) bool
- func ToUpperCase(input string) string
- type CustomTransport
- type Filter
- type FilterRuleSet
- type Secret
Constants ¶
View Source
const AlphaNumPattern = "0-9a-zA-Z"
View Source
const DefaultResponseTimeout = 5 * time.Second
View Source
const EmailPattern = `` /* 456-byte string literal not displayed */
View Source
const HexPattern = "0-9a-f"
View Source
const RegexPattern = "0-9a-z"
View Source
const SubDomainPattern = `\b([A-Za-z0-9](?:[A-Za-z0-9\-]{0,61}[A-Za-z0-9])?)\b`
View Source
const UUIDPattern = `\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`
View Source
const UUIDPatternUpperCase = `\b([0-9A-Z]{8}-[0-9A-Z]{4}-[0-9A-Z]{4}-[0-9A-Z]{4}-[0-9A-Z]{12})\b`
Variables ¶
View Source
var (
KB, MB, GB, TB, PB = 1e3, 1e6, 1e9, 1e12, 1e15
IGNORED_EXTENSIONS = []string{"pdf", "mp4", "avi", "mpeg", "mpg", "mov", "wmv", "m4p", "swf", "mp2", "flv", "vob", "webm", "hdv", "3gp", "ogg", "mp3", "wav", "flac", "tif", "tiff", "jpg", "jpeg", "png", "gif", "zip", "webp"}
)
Functions ¶
func AddStringSliceItem ¶
func BuildRegex ¶ added in v3.6.9
Custom Regex functions
func BuildRegexJWT ¶ added in v3.6.9
func PinnedCertPool ¶
func RangeValidation ¶ added in v3.6.9
func RecoverWithExit ¶ added in v3.12.1
RecoverWithExit handles panics and reports to Sentry before exiting.
func RemoveStringSliceItem ¶
func RetryableHttpClient ¶
func RetryableHttpClientTimeout ¶ added in v3.10.4
func SaneHttpClient ¶
func SaneHttpClientTimeOut ¶
SaneHttpClientTimeOut adds a custom timeout for some scanners
func ToUpperCase ¶ added in v3.6.9
Types ¶
type CustomTransport ¶
type CustomTransport struct {
T http.RoundTripper
}
func NewCustomTransport ¶
func NewCustomTransport(T http.RoundTripper) *CustomTransport
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func FilterFromFiles ¶
FilterFromFiles creates a Filter using the rules in the provided include and exclude files.
type FilterRuleSet ¶
func FilterRulesFromFile ¶
func FilterRulesFromFile(source string) (*FilterRuleSet, error)
FilterRulesFromFile loads the list of regular expression filter rules in `source` and creates a FilterRuleSet.
func (*FilterRuleSet) Matches ¶
func (rules *FilterRuleSet) Matches(object string) bool
Matches will return true if any of the regular expressions in the FilterRuleSet match the pattern.
type Secret ¶
type Secret struct {
// contains filtered or unexported fields
}
func GetSecretFromEnv ¶ added in v3.0.2
func (*Secret) MustGetField ¶
Click to show internal directories.
Click to hide internal directories.