AWS codedeploy: Agent config: loader-env stripping on macOS; S3 parallel download
Summary
Extends the :strip_loader_env_in_hooks: setting to macOS 2.1.2+ (stripping DYLD_* variables instead of LD_*), and documents two new 2.1.2 settings, :s3_download_max_concurrency: and :s3_download_chunk_size:, for parallel range downloads of revisions from Amazon S3.
Security assessment
The :strip_loader_env_in_hooks: documentation describes a hardening control that removes dynamic-loader environment variables (LD_PRELOAD/LD_AUDIT on Linux, DYLD_INSERT_LIBRARIES and related DYLD_* on macOS) from lifecycle hook environments, mitigating library-injection/persistence via hook scripts; the change extends this guidance to macOS. The new S3 concurrency/chunk-size settings are performance tuning with no direct security impact. No specific vulnerability or CVE is referenced, so this is security documentation/hardening rather than a fix.
Evidence
+**:strip_loader_env_in_hooks:** | For version 2.0.x and later. Linux instances, and macOS instances with version 2.1.2 and later. Set to `true` to remove the `LD_PRELOAD`, `LD_LIBRARY_PATH`, and `LD_AUDIT` variables from the environment of lifecycle event hooks. On macOS, the setting removes the `DYLD_INSERT_LIBRARIES`, `DYLD_LIBRARY_PATH`, `DYLD_FRAMEWORK_PATH`, `DYLD_FALLBACK_LIBRARY_PATH`, `DYLD_FALLBACK_FRAMEWORK_PATH`, `DYLD_VERSIONED_LIBRARY_PATH`, and `DYLD_VERSIONED_FRAMEWORK_PATH` variables instead. The default setting is `false`.
Diff
diff --git a/codedeploy/latest/userguide/reference-agent-configuration.md b/codedeploy/latest/userguide/reference-agent-configuration.md index 1c61f1c..f767a38 100644 --- a//codedeploy/latest/userguide/reference-agent-configuration.md +++ b//codedeploy/latest/userguide/reference-agent-configuration.md @@ -48 +48 @@ You should set **:log_aws_wire:** to `true` only for the amount of time required -**:strip_loader_env_in_hooks:** | For version 2.0.x and later. Linux instances only. Set to `true` to remove the `LD_PRELOAD`, `LD_LIBRARY_PATH`, and `LD_AUDIT` variables from the environment of lifecycle event hooks. The default setting is `false`. +**:strip_loader_env_in_hooks:** | For version 2.0.x and later. Linux instances, and macOS instances with version 2.1.2 and later. Set to `true` to remove the `LD_PRELOAD`, `LD_LIBRARY_PATH`, and `LD_AUDIT` variables from the environment of lifecycle event hooks. On macOS, the setting removes the `DYLD_INSERT_LIBRARIES`, `DYLD_LIBRARY_PATH`, `DYLD_FRAMEWORK_PATH`, `DYLD_FALLBACK_LIBRARY_PATH`, `DYLD_FALLBACK_FRAMEWORK_PATH`, `DYLD_VERSIONED_LIBRARY_PATH`, and `DYLD_VERSIONED_FRAMEWORK_PATH` variables instead. The default setting is `false`. @@ -57,0 +58,2 @@ You should set **:log_aws_wire:** to `true` only for the amount of time required +**:s3_download_max_concurrency:** | For version 2.1.2 and later. The number of parallel HTTP range requests the agent uses to download an application revision from Amazon S3. Set to a value greater than `1` to download large revisions in parallel ranges. With `1`, the agent downloads the revision with a single `GetObject` request. Values above `64` are treated as `64`, and `0` is treated as `1`. The default setting is `1`. +**:s3_download_chunk_size:** | For version 2.1.2 and later. The size of each range request when `:s3_download_max_concurrency:` is greater than `1`. Enter a number of bytes or a size string such as `"16MiB"` or `"16MB"`. A revision of this size or smaller is downloaded with one request. Values below 64 KiB are treated as 64 KiB. The default setting is `"8MiB"`.