Documentation
¶
Index ¶
Constants ¶
View Source
const ( CommandClassReadOnly = "read_only" CommandClassWrite = "write" CommandClassDestructive = "destructive" CommandClassUnknown = "unknown" )
View Source
const ( PermissionModeDefault = "" PermissionModeReadOnly = "read_only" )
Variables ¶
This section is empty.
Functions ¶
func ClassifyCommand ¶
ClassifyCommand returns a conservative semantic class for a shell command. This is informational today; policy layers can use it later for mode-aware approval/read-only decisions without duplicating command parsing.
func ExpandPowerShellEnvVars ¶
ExpandPowerShellEnvVars expands PowerShell/CMD environment variable syntax.
func StripQuotedHeredocBodies ¶
StripQuotedHeredocBodies removes quoted heredoc bodies before deny-pattern checks.
Types ¶
type Config ¶
type Config struct {
BuiltInDenyPatterns []*regexp.Regexp
CustomDenyPatterns []*regexp.Regexp
AllowPatterns []*regexp.Regexp
CustomAllowPatterns []*regexp.Regexp
AllowedPathPatterns []*regexp.Regexp
RestrictToWorkspace bool
PermissionMode string
}
Config contains the policy inputs needed to validate a shell command.
Click to show internal directories.
Click to hide internal directories.