Versions in this module Expand all Collapse all v0 v0.44.0 Aug 25, 2023 v0.0.1 Oct 9, 2023 Changes in this version + var CategoryAWS = types.SecretRuleCategory("AWS") + var CategoryAdobe = types.SecretRuleCategory("Adobe") + var CategoryAge = types.SecretRuleCategory("Age") + var CategoryAlibaba = types.SecretRuleCategory("Alibaba") + var CategoryAsana = types.SecretRuleCategory("Asana") + var CategoryAsymmetricPrivateKey = types.SecretRuleCategory("AsymmetricPrivateKey") + var CategoryAtlassian = types.SecretRuleCategory("Atlassian") + var CategoryBeamer = types.SecretRuleCategory("Beamer") + var CategoryBitbucket = types.SecretRuleCategory("Bitbucket") + var CategoryClojars = types.SecretRuleCategory("Clojars") + var CategoryContentfulDelivery = types.SecretRuleCategory("ContentfulDelivery") + var CategoryDatabricks = types.SecretRuleCategory("Databricks") + var CategoryDiscord = types.SecretRuleCategory("Discord") + var CategoryDoppler = types.SecretRuleCategory("Doppler") + var CategoryDropbox = types.SecretRuleCategory("Dropbox") + var CategoryDuffel = types.SecretRuleCategory("Duffel") + var CategoryDynatrace = types.SecretRuleCategory("Dynatrace") + var CategoryEasypost = types.SecretRuleCategory("Easypost") + var CategoryFacebook = types.SecretRuleCategory("Facebook") + var CategoryFastly = types.SecretRuleCategory("Fastly") + var CategoryFinicity = types.SecretRuleCategory("Finicity") + var CategoryFlutterwave = types.SecretRuleCategory("Flutterwave") + var CategoryFrameio = types.SecretRuleCategory("Frameio") + var CategoryGitHub = types.SecretRuleCategory("GitHub") + var CategoryGitLab = types.SecretRuleCategory("GitLab") + var CategoryGoCardless = types.SecretRuleCategory("GoCardless") + var CategoryGoogle = types.SecretRuleCategory("Google") + var CategoryGrafana = types.SecretRuleCategory("Grafana") + var CategoryHashiCorp = types.SecretRuleCategory("HashiCorp") + var CategoryHeroku = types.SecretRuleCategory("Heroku") + var CategoryHubSpot = types.SecretRuleCategory("HubSpot") + var CategoryIntercom = types.SecretRuleCategory("Intercom") + var CategoryIonic = types.SecretRuleCategory("Ionic") + var CategoryLinear = types.SecretRuleCategory("Linear") + var CategoryLinkedIn = types.SecretRuleCategory("LinkedIn") + var CategoryLob = types.SecretRuleCategory("Lob") + var CategoryMailchimp = types.SecretRuleCategory("Mailchimp") + var CategoryMailgun = types.SecretRuleCategory("Mailgun") + var CategoryMapbox = types.SecretRuleCategory("Mapbox") + var CategoryMessageBird = types.SecretRuleCategory("MessageBird") + var CategoryNewRelic = types.SecretRuleCategory("NewRelic") + var CategoryNpm = types.SecretRuleCategory("Npm") + var CategoryPlanetscale = types.SecretRuleCategory("Planetscale") + var CategoryPostman = types.SecretRuleCategory("Postman") + var CategoryPulumi = types.SecretRuleCategory("Pulumi") + var CategoryPyPI = types.SecretRuleCategory("PyPI") + var CategoryRubyGems = types.SecretRuleCategory("RubyGems") + var CategorySendGrid = types.SecretRuleCategory("SendGrid") + var CategorySendinblue = types.SecretRuleCategory("Sendinblue") + var CategoryShippo = types.SecretRuleCategory("Shippo") + var CategoryShopify = types.SecretRuleCategory("Shopify") + var CategorySlack = types.SecretRuleCategory("Slack") + var CategoryStripe = types.SecretRuleCategory("Stripe") + var CategoryTwilio = types.SecretRuleCategory("Twilio") + var CategoryTwitch = types.SecretRuleCategory("Twitch") + var CategoryTwitter = types.SecretRuleCategory("Twitter") + var CategoryTypeform = types.SecretRuleCategory("Typeform") + func GetSecretRulesMetadata() []defsecRules.Check + type AllowRule struct + Description string + ID string + Path *Regexp + Regex *Regexp + type AllowRules []AllowRule + func (rules AllowRules) Allow(match string) bool + func (rules AllowRules) AllowPath(path string) bool + type Blocks struct + func (b *Blocks) Match(block Location) bool + type Config struct + CustomAllowRules AllowRules + CustomRules []Rule + DisableAllowRuleIDs []string + DisableRuleIDs []string + EnableBuiltinRuleIDs []string + ExcludeBlock ExcludeBlock + func ParseConfig(configPath string) (*Config, error) + type ExcludeBlock struct + Description string + Regexes []*Regexp + type Global struct + AllowRules AllowRules + ExcludeBlock ExcludeBlock + Rules []Rule + func (g Global) Allow(match string) bool + func (g Global) AllowPath(path string) bool + type Location struct + End int + Start int + func (l Location) Match(loc Location) bool + type Match struct + Location Location + Rule Rule + type Regexp struct + func MustCompile(str string) *Regexp + func (r *Regexp) UnmarshalYAML(value *yaml.Node) error + type Rule struct + AllowRules AllowRules + Category types.SecretRuleCategory + ExcludeBlock ExcludeBlock + ID string + Keywords []string + Path *Regexp + Regex *Regexp + SecretGroupName string + Severity string + Title string + func (r *Rule) Allow(match string) bool + func (r *Rule) AllowPath(path string) bool + func (r *Rule) MatchKeywords(content []byte) bool + func (r *Rule) MatchPath(path string) bool + type ScanArgs struct + Content []byte + FilePath string + type Scanner struct + func NewScanner(config *Config) Scanner + func (s *Scanner) AllowLocation(r Rule, content []byte, loc Location) bool + func (s *Scanner) FindLocations(r Rule, content []byte) []Location + func (s *Scanner) FindSubmatchLocations(r Rule, content []byte) []Location + func (s *Scanner) Scan(args ScanArgs) types.Secret