Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CategoryAWS = types.SecretRuleCategory("AWS") CategoryGitHub = types.SecretRuleCategory("GitHub") CategoryGitLab = types.SecretRuleCategory("GitLab") CategoryAsymmetricPrivateKey = types.SecretRuleCategory("AsymmetricPrivateKey") CategoryShopify = types.SecretRuleCategory("Shopify") CategorySlack = types.SecretRuleCategory("Slack") CategoryGoogle = types.SecretRuleCategory("Google") CategoryStripe = types.SecretRuleCategory("Stripe") CategoryPyPI = types.SecretRuleCategory("PyPI") CategoryHeroku = types.SecretRuleCategory("Heroku") CategoryTwilio = types.SecretRuleCategory("Twilio") CategoryAge = types.SecretRuleCategory("Age") CategoryFacebook = types.SecretRuleCategory("Facebook") CategoryTwitter = types.SecretRuleCategory("Twitter") CategoryAdobe = types.SecretRuleCategory("Adobe") CategoryAlibaba = types.SecretRuleCategory("Alibaba") CategoryAsana = types.SecretRuleCategory("Asana") CategoryAtlassian = types.SecretRuleCategory("Atlassian") CategoryBitbucket = types.SecretRuleCategory("Bitbucket") CategoryBeamer = types.SecretRuleCategory("Beamer") CategoryClojars = types.SecretRuleCategory("Clojars") CategoryContentfulDelivery = types.SecretRuleCategory("ContentfulDelivery") CategoryDatabricks = types.SecretRuleCategory("Databricks") CategoryDiscord = types.SecretRuleCategory("Discord") CategoryDoppler = types.SecretRuleCategory("Doppler") CategoryDropbox = types.SecretRuleCategory("Dropbox") CategoryDuffel = types.SecretRuleCategory("Duffel") CategoryDynatrace = types.SecretRuleCategory("Dynatrace") CategoryEasypost = types.SecretRuleCategory("Easypost") CategoryFastly = types.SecretRuleCategory("Fastly") CategoryFinicity = types.SecretRuleCategory("Finicity") CategoryFlutterwave = types.SecretRuleCategory("Flutterwave") CategoryFrameio = types.SecretRuleCategory("Frameio") CategoryGoCardless = types.SecretRuleCategory("GoCardless") CategoryGrafana = types.SecretRuleCategory("Grafana") CategoryHashiCorp = types.SecretRuleCategory("HashiCorp") CategoryHubSpot = types.SecretRuleCategory("HubSpot") CategoryIntercom = types.SecretRuleCategory("Intercom") CategoryIonic = types.SecretRuleCategory("Ionic") CategoryJWT = types.SecretRuleCategory("JWT") CategoryLinear = types.SecretRuleCategory("Linear") CategoryLob = types.SecretRuleCategory("Lob") CategoryMailchimp = types.SecretRuleCategory("Mailchimp") CategoryMailgun = types.SecretRuleCategory("Mailgun") CategoryMapbox = types.SecretRuleCategory("Mapbox") CategoryMessageBird = types.SecretRuleCategory("MessageBird") CategoryNewRelic = types.SecretRuleCategory("NewRelic") CategoryNpm = types.SecretRuleCategory("Npm") CategoryPlanetscale = types.SecretRuleCategory("Planetscale") CategoryPostman = types.SecretRuleCategory("Postman") CategoryPulumi = types.SecretRuleCategory("Pulumi") CategoryRubyGems = types.SecretRuleCategory("RubyGems") CategorySendGrid = types.SecretRuleCategory("SendGrid") CategorySendinblue = types.SecretRuleCategory("Sendinblue") CategoryShippo = types.SecretRuleCategory("Shippo") CategoryLinkedIn = types.SecretRuleCategory("LinkedIn") CategoryTwitch = types.SecretRuleCategory("Twitch") CategoryTypeform = types.SecretRuleCategory("Typeform") CategoryDocker = types.SecretRuleCategory("Docker") CategoryHuggingFace = types.SecretRuleCategory("HuggingFace") )
Functions ¶
func GetSecretRulesMetadata ¶ added in v0.35.0
This function is exported for trivy-plugin-aqua purposes only
Types ¶
type AllowRules ¶
type AllowRules []AllowRule
func (AllowRules) Allow ¶
func (rules AllowRules) Allow(match string) bool
func (AllowRules) AllowPath ¶
func (rules AllowRules) AllowPath(path string) bool
type Config ¶
type Config struct { // Enable only specified built-in rules. If only one ID is specified, all other rules are disabled. // All the built-in rules are enabled if this field is not specified. It doesn't affect custom rules. EnableBuiltinRuleIDs []string `yaml:"enable-builtin-rules"` // Disable rules. It is applied to enabled IDs. DisableRuleIDs []string `yaml:"disable-rules"` // Disable allow rules. DisableAllowRuleIDs []string `yaml:"disable-allow-rules"` CustomRules []Rule `yaml:"rules"` CustomAllowRules AllowRules `yaml:"allow-rules"` ExcludeBlock ExcludeBlock `yaml:"exclude-block"` }
func ParseConfig ¶ added in v0.32.0
type ExcludeBlock ¶
type Global ¶
type Global struct { Rules []Rule AllowRules AllowRules ExcludeBlock ExcludeBlock }
type Regexp ¶
Regexp adds unmarshalling from YAML for regexp.Regexp
func MustCompile ¶
func MustCompileWithoutWordPrefix ¶ added in v0.54.0
func (*Regexp) UnmarshalYAML ¶
UnmarshalYAML unmarshals YAML into a regexp.Regexp
type Rule ¶
type Rule struct { ID string `yaml:"id"` Category types.SecretRuleCategory `yaml:"category"` Title string `yaml:"title"` Severity string `yaml:"severity"` Regex *Regexp `yaml:"regex"` Keywords []string `yaml:"keywords"` Path *Regexp `yaml:"path"` AllowRules AllowRules `yaml:"allow-rules"` ExcludeBlock ExcludeBlock `yaml:"exclude-block"` SecretGroupName string `yaml:"secret-group-name"` }
func GetBuiltinRules ¶ added in v0.54.0
func GetBuiltinRules() []Rule
This function is exported for trivy-plugin-aqua purposes only
func (*Rule) MatchKeywords ¶
type Scanner ¶
type Scanner struct { *Global // contains filtered or unexported fields }
func NewScanner ¶
func (*Scanner) AllowLocation ¶
func (*Scanner) FindSubmatchLocations ¶
Click to show internal directories.
Click to hide internal directories.