Skip to content

Commit

Permalink
feat: seccomp 配置默认关闭
Browse files Browse the repository at this point in the history
  • Loading branch information
yiqiwang-17 committed Feb 8, 2025
1 parent 5d16cf6 commit 8957c76
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type Config struct {

// SecConfigs sec config path and pattern
SecConfigs []SecConfigItem `config:"multi_config"`
Seccomp Seccomp `config:"seccomp"`

// Tasks 允许加载子配置采集项
Tasks []interface{} `config:"tasks"`
Expand All @@ -65,6 +66,11 @@ type SecConfigItem struct {
Pattern string `config:"file_pattern"`
}

// 系统调用配置
type Seccomp struct {
Enable bool `config:"enable"`
}

// 采集状态
type Registry struct {
FlushTimeout time.Duration `config:"flush"`
Expand Down Expand Up @@ -104,6 +110,9 @@ func Parse(cfg *beat.Config) (Config, error) {
FlushTimeout: 1 * time.Second,
GcFrequency: 1 * time.Minute,
},
Seccomp: Seccomp{
Enable: false,
},
}
err := cfg.Unpack(&config)
if err != nil {
Expand Down

0 comments on commit 8957c76

Please sign in to comment.