Documentation
¶
Overview ¶
Package hook implements bash command validation and approval logic.
Index ¶
Constants ¶
View Source
const SedSandboxAdvice = "Use 'sed --sandbox ...' to avoid a permission prompt."
SedSandboxAdvice is context advice provided when sed is run without sandbox.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandValidator ¶
CommandValidator inspects arguments for a specific command and returns a Decision.
type Decision ¶
type Decision struct {
Decision string `json:"decision,omitzero"`
Context string `json:"context,omitzero"`
}
Decision represents the outcome of inspecting a command.
func Validate ¶
Validate inspects a shell command string and determines if auto-approval is permissible based on command structure, AST composition, and allowlists.
Click to show internal directories.
Click to hide internal directories.