Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CELCheck ¶
type CELCheck struct {
// contains filtered or unexported fields
}
CELCheck evaluates a CEL expression against the hook input.
type CmdCheck ¶
type CmdCheck struct {
// contains filtered or unexported fields
}
CmdCheck runs an arbitrary shell command and passes/fails based on exit code. Unlike Linter, it does not require a file path — suitable for Stop events.
type CmdValidate ¶
type CmdValidate struct {
// contains filtered or unexported fields
}
CmdValidate checks bash commands against deny/allow patterns.
func (*CmdValidate) Execute ¶
func (c *CmdValidate) Execute(ctx context.Context, input *types.HookInput) (*types.CheckResult, error)
func (*CmdValidate) Init ¶
func (c *CmdValidate) Init(params map[string]interface{}) error
func (*CmdValidate) Name ¶
func (c *CmdValidate) Name() string
type DetectSecrets ¶
type DetectSecrets struct {
// contains filtered or unexported fields
}
DetectSecrets integrates Yelp detect-secrets for secret scanning. It dynamically generates a baseline config from YAML params and calls `detect-secrets scan --string` for each line of content.
func (*DetectSecrets) Execute ¶
func (d *DetectSecrets) Execute(ctx context.Context, input *types.HookInput) (*types.CheckResult, error)
func (*DetectSecrets) Init ¶
func (d *DetectSecrets) Init(params map[string]interface{}) error
func (*DetectSecrets) Name ¶
func (d *DetectSecrets) Name() string
type DirACL ¶
type DirACL struct {
// contains filtered or unexported fields
}
DirACL checks file paths against allow/deny glob patterns.
type Linter ¶
type Linter struct {
// contains filtered or unexported fields
}
Linter runs an external linter command on files after write/edit.
type PromptModify ¶
type PromptModify struct {
// contains filtered or unexported fields
}
PromptModify injects additional context into user prompts.
func (*PromptModify) Execute ¶
func (p *PromptModify) Execute(ctx context.Context, input *types.HookInput) (*types.CheckResult, error)
func (*PromptModify) Init ¶
func (p *PromptModify) Init(params map[string]interface{}) error
func (*PromptModify) Name ¶
func (p *PromptModify) Name() string
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maps check type names to their factories.
func NewRegistry ¶
func NewRegistry() *Registry
NewRegistry creates a Registry with all built-in checks registered.
type RepoAccess ¶
type RepoAccess struct {
// contains filtered or unexported fields
}
RepoAccess checks if the current repository is in the allow/deny list.
func (*RepoAccess) Execute ¶
func (r *RepoAccess) Execute(ctx context.Context, input *types.HookInput) (*types.CheckResult, error)
func (*RepoAccess) Init ¶
func (r *RepoAccess) Init(params map[string]interface{}) error
func (*RepoAccess) Name ¶
func (r *RepoAccess) Name() string
type SecretDetect ¶
type SecretDetect struct {
// contains filtered or unexported fields
}
SecretDetect scans tool_input content for secret patterns.
func (*SecretDetect) Execute ¶
func (s *SecretDetect) Execute(ctx context.Context, input *types.HookInput) (*types.CheckResult, error)
func (*SecretDetect) Init ¶
func (s *SecretDetect) Init(params map[string]interface{}) error
func (*SecretDetect) Name ¶
func (s *SecretDetect) Name() string
type SkillInject ¶
type SkillInject struct {
// contains filtered or unexported fields
}
SkillInject loads context from a file or inline text at session start.
func (*SkillInject) Execute ¶
func (s *SkillInject) Execute(ctx context.Context, input *types.HookInput) (*types.CheckResult, error)
func (*SkillInject) Init ¶
func (s *SkillInject) Init(params map[string]interface{}) error
func (*SkillInject) Name ¶
func (s *SkillInject) Name() string