Awesome Reviewers

Security-sensitive behavior must be correct in the real execution boundary: resolve the effective security configuration (including profile overrides) and then propagate/enforce it through packaged subprocesses and trust-boundary validations.

Apply this as a standard checklist: 1) Resolve effective auth/provider

2) Propagate credentials across boundaries with allowlists

3) Preserve explicit credential intent

4) Validate trust boundaries using the correct context

5) Make secret handling deterministic and testable

Example pattern (effective provider + boundary allowlist):

// 1) Resolve effective provider from selected profile
const effectiveProvider = resolveProfileProvider(selectedProfile, rootConfig);
const authentication = scanAuthentication(rootConfig, authMode, effectiveProvider);

// 2) Ensure only explicitly allowlisted vars are forwarded to bundled worker
const allowedEnv = getBundledMcpEnvAllowlistForProvider(effectiveProvider);
const childEnv = Object.fromEntries(
  Object.entries(process.env).filter(([k]) => allowedEnv.has(k)),
);
spawnWorker({ env: childEnv });

Net effect: fewer “it passed the test but shipped unauthenticated/insecure” outcomes and more reliable security guarantees across auth selection, credential propagation, and trust-boundary enforcement.