File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ DELTA_VERSION ?= 0.19.2
3131TMUX_VERSION ?= 3.6a
3232TMUX_SHA256 ?= b6d8d9c76585db8ef5fa00d4931902fa4b8cbe8166f528f44fc403961a3f3759
3333CLAUDE_CODE_VERSION ?= 2.1.143
34- CCTRACE_VERSION ?= 0.4 .0
34+ CCTRACE_VERSION ?= 0.11 .0
3535CODEX_VERSION ?= 0.131.0
3636GEMINI_CLI_VERSION ?= 0.42.0
3737GROK_CLI_VERSION ?= 0.2.93
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ agent_prepare() {
5050 # DEVA_TRACE=1 tells the entrypoint to install the cctrace MITM CA
5151 # into the container system trust store (#414)
5252 DOCKER_ARGS+=(" -e" " DEVA_TRACE=1" )
53+ DEVA_TRACE_ACTIVE=true
5354 AGENT_COMMAND=(" cctrace" " --no-open" " --" )
5455 if [ " $has_dangerously " = false ]; then
5556 AGENT_COMMAND+=(" --dangerously-skip-permissions" )
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ agent_prepare() {
9393 # cctrace codex profile: codex args go after "--"; always mitm.
9494 # DEVA_TRACE=1 installs the MITM CA into the container store (#414).
9595 DOCKER_ARGS+=(" -e" " DEVA_TRACE=1" )
96+ DEVA_TRACE_ACTIVE=true
9697 AGENT_COMMAND=(" cctrace" " codex" " --no-open" " --" " ${AGENT_COMMAND[@]: 1} " )
9798 fi
9899
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ agent_prepare() {
4141 # cctrace grok profile: grok args go after "--"; always mitm.
4242 # DEVA_TRACE=1 installs the MITM CA into the container store (#414).
4343 DOCKER_ARGS+=(" -e" " DEVA_TRACE=1" )
44+ DEVA_TRACE_ACTIVE=true
4445 AGENT_COMMAND=(" cctrace" " grok" " --no-open" " --" " ${AGENT_COMMAND[@]: 1} " )
4546 fi
4647
Original file line number Diff line number Diff line change @@ -3684,11 +3684,17 @@ if [ "$EPHEMERAL_MODE" = false ]; then
36843684 update_session_file
36853685 fi
36863686
3687+ # docker exec env overrides the container's creation-time env: pass the
3688+ # trace state explicitly so --trace works on an existing container and a
3689+ # non-traced attach un-trusts the CA installed by an earlier traced run.
3690+ _trace_env=" DEVA_TRACE=0"
3691+ [ " ${DEVA_TRACE_ACTIVE:- false} " = true ] && _trace_env=" DEVA_TRACE=1"
3692+
36873693 if [ " $AUTH_PROVISION_MODE " = true ]; then
3688- docker exec " ${DOCKER_TERMINAL_ARGS[@]} " " $CONTAINER_NAME " /usr/local/bin/docker-entrypoint.sh " ${AGENT_COMMAND[@]} " || true
3694+ docker exec -e " $_trace_env " " ${DOCKER_TERMINAL_ARGS[@]} " " $CONTAINER_NAME " /usr/local/bin/docker-entrypoint.sh " ${AGENT_COMMAND[@]} " || true
36893695 finish_auth_provision
36903696 else
3691- exec docker exec " ${DOCKER_TERMINAL_ARGS[@]} " " $CONTAINER_NAME " /usr/local/bin/docker-entrypoint.sh " ${AGENT_COMMAND[@]} "
3697+ exec docker exec -e " $_trace_env " " ${DOCKER_TERMINAL_ARGS[@]} " " $CONTAINER_NAME " /usr/local/bin/docker-entrypoint.sh " ${AGENT_COMMAND[@]} "
36923698 fi
36933699else
36943700 echo " Launching ${ACTIVE_AGENT} (ephemeral mode) via $( docker_image_ref) "
Original file line number Diff line number Diff line change @@ -343,7 +343,9 @@ setup_trace_ca() {
343343 if [ " ${DEVA_TRACE:- } " != " 1" ]; then
344344 if [ -f " $crt " ]; then
345345 rm -f " $crt "
346- update-ca-certificates > /dev/null 2>&1 || true
346+ if ! update-ca-certificates > /dev/null 2>&1 ; then
347+ echo " [entrypoint] warning: trust-store update failed; cctrace MITM CA may still be trusted" >&2
348+ fi
347349 fi
348350 return 0
349351 fi
@@ -363,8 +365,12 @@ setup_trace_ca() {
363365 fi
364366
365367 cp " $ca_path " " $crt "
366- update-ca-certificates > /dev/null 2>&1 || true
367- [ " $VERBOSE " = " true" ] && echo " [entrypoint] cctrace MITM CA trusted container-wide: $crt "
368+ chmod 644 " $crt "
369+ if update-ca-certificates > /dev/null 2>&1 ; then
370+ [ " $VERBOSE " = " true" ] && echo " [entrypoint] cctrace MITM CA trusted container-wide: $crt "
371+ else
372+ echo " [entrypoint] warning: trust-store update failed; container-wide CA trust incomplete (cctrace env-scoped trust still applies)" >&2
373+ fi
368374 return 0
369375}
370376
You can’t perform that action at this time.
0 commit comments