Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check inspects bashScript and returns an error if it ought not be executed. Check DOES NOT PROVIDE SECURITY against malicious actors. It is intended to catch straightforward mistakes in which a model does things despite having been instructed not to do them.
func ExtractCommands ¶
ExtractCommands parses a bash command and extracts individual command names that are candidates for auto-installation.
Returns only simple command names (no paths, no builtins, no variable assignments) that could potentially be missing tools that need installation.
Filtering logic: - Excludes commands with paths (./script.sh, /usr/bin/tool, ../build.sh) - Excludes shell builtins (echo, cd, test, [, etc.) - Excludes variable assignments (FOO=bar) - Deduplicates repeated command names
Examples:
"ls -la && echo done" → ["ls"] (echo filtered as builtin) "./deploy.sh && curl api.com" → ["curl"] (./deploy.sh filtered as path) "yamllint config.yaml" → ["yamllint"] (candidate for installation)
func ResetSketchWipWarning ¶ added in v0.0.17
func ResetSketchWipWarning()
ResetSketchWipWarning resets the warning state for testing purposes
func WillRunGitCommit ¶
WillRunGitCommit checks if the provided bash script will run 'git commit'. It returns true if any command in the script is a git commit command.
Types ¶
This section is empty.