Skip to content

Wire scan executor/sidecar env vars into compose - #303

Merged
haksungjang merged 1 commit into
mainfrom
compose-env-wiring/scan-executor-sidecar
Sep 3, 2026
Merged

Wire scan executor/sidecar env vars into compose#303
haksungjang merged 1 commit into
mainfrom
compose-env-wiring/scan-executor-sidecar

Conversation

@haksungjang

Copy link
Copy Markdown
Contributor

Summary

  • 26 vars documented in .env.example (SCAN_EXECUTOR mode selection, Docker sidecar hardening — resource caps, capabilities, network, volume strategy — Android scan image selection, scan-log persistence/retention) were never referenced in x-backend-env, so an operator following the docs to opt into SCAN_EXECUTOR=docker (or tune sidecar limits) via .env saw no effect.
  • Adds them to both compose files with defaults matching core/config.py.

One deliberate deviation from a flat "copy core/config.py's default"

SCAN_WORKSPACE_MOUNT's code default is /tmp/trustedoss (dev's mount point). docker-compose.yml's named volume actually mounts the worker/beat/backend at /workspace (see the volumes: section), and _docker_volume._workspace_mount()'s own docstring confirms: "prod sets this to /workspace." So the prod anchor uses ${SCAN_WORKSPACE_MOUNT:-/workspace} instead of the code default — using the code default there would have made a docker-executor sidecar resolve source_dir against the wrong path.

Context

Part of the same compose env-var wiring audit as #300/#301. This PR covers the scan-executor/sidecar cluster — the largest single cluster in the audit.

Test plan

  • Both compose files parse as valid YAML
  • Reviewer: this touches the same anchor lines as other PRs in the batch — rebase on merge if needed

26 vars documented in .env.example (SCAN_EXECUTOR mode selection, Docker
sidecar hardening — resource caps, capabilities, network, volume
strategy — Android scan image selection, scan-log persistence/retention)
were never referenced in x-backend-env, so setting them in .env (e.g.
opting into SCAN_EXECUTOR=docker) had no effect on the running
container. Adds them with defaults matching core/config.py.

SCAN_WORKSPACE_MOUNT is the one exception: the code default
(/tmp/trustedoss) is dev's mount point. docker-compose.yml's named
volume actually mounts the worker at /workspace, per
_docker_volume._workspace_mount()'s own docstring ("prod sets this to
/workspace"), so the prod anchor uses that instead — otherwise a
docker-executor sidecar would resolve source_dir against the wrong
path.

Part of the compose env-var wiring audit.
@haksungjang
haksungjang force-pushed the compose-env-wiring/scan-executor-sidecar branch from 83c7d17 to 2ae1984 Compare September 3, 2026 06:18
@haksungjang
haksungjang merged commit 22b8668 into main Sep 3, 2026
24 checks passed
@haksungjang
haksungjang deleted the compose-env-wiring/scan-executor-sidecar branch September 3, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant