🔒 security: 'Accept any certificate' is off by default in every build; harness opts in with YUMUSH_ANY_CERT=1
Browse files at this commitb97ed6c9bdb036df5ad816dc49f71a998a839403Parent: 56a15db2 changed files +3 -5
- crates/client/src/lib.rs +2 -4
- harness/client.sh +1 -1
crates/client/src/lib.rsmodified+2 -4
| @@ -77,10 +77,8 @@ impl Server { | |||
| 77 | .and_then(|config| config.get("server_address")) | 77 | .and_then(|config| config.get("server_address")) |
| 78 | .expect("client config server_address") | 78 | .expect("client config server_address") |
| 79 | }); | 79 | }); |
| 80 | - let any_cert = match lines.next() { | 80 | + let any_cert = std::env::var_os("YUMUSH_ANY_CERT").is_some() |
| 81 | - Some(flag) => flag == "any_cert", | 81 | + || lines.next() == Some("any_cert"); |
| 82 | - None => cfg!(debug_assertions), | ||
| 83 | - }; | ||
| 84 | Self { address, any_cert } | 82 | Self { address, any_cert } |
| 85 | } | 83 | } |
| 86 | 84 | ||
harness/client.shmodified+1 -1
| @@ -6,6 +6,6 @@ STATE="${HARNESS_STATE:-/tmp/claude-1000/yumush-harness}" | |||
| 6 | NAME="$1" | 6 | NAME="$1" |
| 7 | source "${ENV_FILE:-$STATE/env}" | 7 | source "${ENV_FILE:-$STATE/env}" |
| 8 | mkdir -p "$STATE/clients/$NAME" | 8 | mkdir -p "$STATE/clients/$NAME" |
| 9 | -YUMUSH_SERVER_ADDRESS="127.0.0.1:${HARNESS_PORT:-2027}" XDG_CONFIG_HOME="$STATE/clients/$NAME" RUST_LOG="${RUST_LOG:-info}" "$ROOT/target/${PROFILE:-harness}/client" >"$STATE/$NAME.log" 2>&1 & | 9 | +YUMUSH_ANY_CERT=1 YUMUSH_SERVER_ADDRESS="127.0.0.1:${HARNESS_PORT:-2027}" XDG_CONFIG_HOME="$STATE/clients/$NAME" RUST_LOG="${RUST_LOG:-info}" "$ROOT/target/${PROFILE:-harness}/client" >"$STATE/$NAME.log" 2>&1 & |
| 10 | echo "$NAME $!" >> "$STATE/pids" | 10 | echo "$NAME $!" >> "$STATE/pids" |
| 11 | echo "$NAME $!" | 11 | echo "$NAME $!" |