Documentation
¶
Overview ¶
Package sds provides sensitive data scanning functionality for logs
Package sds provides sensitive data scanning functionality for logs ¶
Package sds provides sensitive data scanning functionality for logs
Index ¶
- Constants
- func ShouldBlockCollectionUntilSDSConfiguration(cfg pkgconfigmodel.Reader) bool
- func ShouldBufferUntilSDSConfiguration(cfg pkgconfigmodel.Reader) bool
- func ValidateConfigField(cfg pkgconfigmodel.Reader) error
- func WaitForConfigurationBufferMaxSize(cfg pkgconfigmodel.Reader) int
- type Match
- type MatchAction
- type ProximityKeywords
- type ReconfigureOrder
- type ReconfigureOrderType
- type ReconfigureResponse
- type RuleConfig
- type RuleDefinition
- type RulesConfig
- type Scanner
- type StandardRuleConfig
- type StandardRuleDefinition
- type StandardRulesConfig
- type StandardRulesDefaults
Constants ¶
const SDSEnabled = false
Variables ¶
This section is empty.
Functions ¶
func ShouldBlockCollectionUntilSDSConfiguration ¶ added in v0.58.0
func ShouldBlockCollectionUntilSDSConfiguration(cfg pkgconfigmodel.Reader) bool
ShouldBlockCollectionUntilSDSConfiguration returns true if we want to start the collection only after having received an SDS configuration.
func ShouldBufferUntilSDSConfiguration ¶ added in v0.58.0
func ShouldBufferUntilSDSConfiguration(cfg pkgconfigmodel.Reader) bool
ShouldBufferUntilSDSConfiguration returns true if we have to buffer until we've received an SDS configuration.
func ValidateConfigField ¶ added in v0.58.0
func ValidateConfigField(cfg pkgconfigmodel.Reader) error
ValidateConfigField returns true if the configuration value for wait_for_configuration is valid. Validates its value only when SDS is enabled.
func WaitForConfigurationBufferMaxSize ¶ added in v0.58.0
func WaitForConfigurationBufferMaxSize(cfg pkgconfigmodel.Reader) int
WaitForConfigurationBufferMaxSize returns a size for the buffer used while waiting for an SDS configuration.
Types ¶
type MatchAction ¶
type MatchAction struct {
Type string `json:"type"`
Placeholder string `json:"placeholder"`
Direction string `json:"direction"`
CharacterCount uint32 `json:"character_count"`
}
MatchAction defines what's the action to do when there is a match.
type ProximityKeywords ¶
type ProximityKeywords struct {
Keywords []string `json:"keywords"`
CharacterCount uint32 `json:"character_count"`
UseRecommendedKeywords bool `json:"use_recommended_keywords"`
}
ProximityKeywords definition in RC config.
type ReconfigureOrder ¶
type ReconfigureOrder struct {
Type ReconfigureOrderType
Config []byte
ResponseChan chan ReconfigureResponse
}
ReconfigureOrder are used to trigger a reconfiguration of the SDS scanner.
type ReconfigureOrderType ¶
type ReconfigureOrderType string
ReconfigureOrderType is a type of reconfiguration order
const ( // StandardRules triggers the storage of a new set of standard rules // and reconfigure the internal SDS scanner with an existing user // configuration if any. StandardRules ReconfigureOrderType = "standard_rules" // AgentConfig triggers a reconfiguration of the SDS scanner. AgentConfig ReconfigureOrderType = "agent_config" // StopProcessing triggers a reconfiguration of the SDS scanner by destroying // it to remove the SDS processing step. StopProcessing ReconfigureOrderType = "stop_processing" )
type ReconfigureResponse ¶ added in v0.58.0
ReconfigureResponse is used to transmit the result from reconfiguring the processors.
type RuleConfig ¶
type RuleConfig struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Tags []string `json:"tags"`
Definition RuleDefinition `json:"definition"`
MatchAction MatchAction `json:"match_action"`
IncludedKeywords ProximityKeywords `json:"included_keywords"`
IsEnabled bool `json:"is_enabled"`
}
RuleConfig of rule as sent by the Remote Configuration.
type RuleDefinition ¶
type RuleDefinition struct {
StandardRuleID string `json:"standard_rule_id"`
Pattern string `json:"pattern"`
}
RuleDefinition definition in RC config.
type RulesConfig ¶
type RulesConfig struct {
ID string `json:"id"`
Name string `json:"name"`
Rules []RuleConfig `json:"rules"`
IsEnabled bool `json:"is_enabled"`
Description string `json:"description"`
}
RulesConfig as sent by the Remote Configuration. Equivalent of the groups in the UI.
func (RulesConfig) OnlyEnabled ¶
func (r RulesConfig) OnlyEnabled() RulesConfig
OnlyEnabled returns a new RulesConfig object containing only enabled rules. Use this to filter out disabled rules.
type Scanner ¶
type Scanner struct {
}
Scanner mock.
func CreateScanner ¶
CreateScanner creates a scanner for unsupported platforms/architectures.
func (*Scanner) GetRuleByIdx ¶
func (s *Scanner) GetRuleByIdx(_ uint32) (RuleConfig, error)
GetRuleByIdx mocks the GetRuleByIdx function.
func (*Scanner) Reconfigure ¶
func (s *Scanner) Reconfigure(_ ReconfigureOrder) (bool, error)
Reconfigure mocks the Reconfigure function.
type StandardRuleConfig ¶
type StandardRuleConfig struct {
ID string `json:"id"`
Name string `json:"name"`
Tags []string `json:"tags"`
Description string `json:"description"`
Definitions []StandardRuleDefinition `json:"definitions"`
}
StandardRuleConfig as sent by the Remote Configuration;
type StandardRuleDefinition ¶
type StandardRuleDefinition struct {
Version int `json:"version"`
Pattern string `json:"pattern"`
DefaultIncludedKeywords []string `json:"default_included_keywords"`
RequiredCapabilities []string `json:"required_capabilities"`
}
StandardRuleDefinition contains a versioned standard rule definition.
type StandardRulesConfig ¶
type StandardRulesConfig struct {
Rules []StandardRuleConfig `json:"rules"`
Defaults StandardRulesDefaults `json:"defaults"`
}
StandardRulesConfig contains standard rules.
type StandardRulesDefaults ¶
type StandardRulesDefaults struct {
IncludedKeywordsCharCount uint32 `json:"included_keywords_char_count"`
ExcludedKeywordsCharCount uint32 `json:"excluded_keywords_char_count"`
ExcludedKeywords []string `json:"excluded_keywords"`
}
StandardRulesDefaults contains consts defaults information for standard rules.