-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Background
PR #210 proposed configuring Docker's /etc/hosts when --enable-host-access is used, so spawned containers can resolve host.docker.internal.
Problem
When --enable-host-access is used, spawned containers via docker-wrapper need host.docker.internal DNS resolution.
Proposed Changes
- Pass
AWF_ENABLE_HOST_ACCESSenvironment variable to agent container - Modify docker-wrapper.sh to:
- Allow
--add-host host.docker.internal:host-gatewayspecifically whenAWF_ENABLE_HOST_ACCESS=true - Inject
--add-host host.docker.internal:host-gatewayto spawned containers when enabled
- Allow
- Security fix: Make
AWF_ENABLE_HOST_ACCESSreadonly in entrypoint.sh to prevent malicious code from tampering with the variable
Security Note
The environment variable should be declared readonly in entrypoint.sh, preventing malicious code from enabling host access when it wasn't authorized.
Issue created from PR #210 during backlog cleanup
Reactions are currently unavailable