sh-mcp/packages
Adam Moussa c5b7550eaa Harden auth + finance redaction (sh-security-review confirmed mediums)
Two confirmed medium findings from the agentic security review:

- Fail-open SH_MCP_ENV: config defaulted to 'local' when the var was unset,
  so a deploy that forgot SH_MCP_ENV=aws would silently run LocalAuthProvider
  and accept static dev bearer tokens (dev-finance-admin -> finance:admin).
  Now fail-closed: SH_MCP_ENV must be explicitly 'local' or 'aws' or the
  server refuses to start. Plus an independent guard in LocalAuthProvider
  that refuses to construct in an AWS runtime (AWS_LAMBDA_FUNCTION_NAME /
  AWS_EXECUTION_ENV present), regardless of the env flag.

- Finance egress redaction gap: redactDeep only wholesale-masked a sensitive
  key when its value was a scalar; an object/array under a sensitive key was
  recursed into, letting a bare nested value (e.g. {account:{number:...}})
  escape the keyword-gated pattern matcher. Now the entire subtree under a
  sensitive key is masked. No current finance tool emitted such shapes (all
  flat strings), so this closes a latent hole in the universal safety net.

+4 tests (subtree redaction, AWS-runtime guard). 411 pass; coverage gate green.

Review also produced lows (memo free-text digits, unsalted argsHash,
unauth /openapi.json by-design, session-cap no-reset by-design) tracked
separately; 0 confirmed critical/high — review verdict PASS.
2026-06-26 13:23:02 -04:00
..
calendar Add security-weighted test suite + coverage gate; wire tooling 2026-06-26 12:48:26 -04:00
gmail Add security-weighted test suite + coverage gate; wire tooling 2026-06-26 12:48:26 -04:00
google-maps Add security-weighted test suite + coverage gate; wire tooling 2026-06-26 12:48:26 -04:00
internal-data Add security-weighted test suite + coverage gate; wire tooling 2026-06-26 12:48:26 -04:00
knowledge-base Add security-weighted test suite + coverage gate; wire tooling 2026-06-26 12:48:26 -04:00
payments Add security-weighted test suite + coverage gate; wire tooling 2026-06-26 12:48:26 -04:00
qbo Add security-weighted test suite + coverage gate; wire tooling 2026-06-26 12:48:26 -04:00
reminders Add security-weighted test suite + coverage gate; wire tooling 2026-06-26 12:48:26 -04:00
shared Harden auth + finance redaction (sh-security-review confirmed mediums) 2026-06-26 13:23:02 -04:00
tasks Add security-weighted test suite + coverage gate; wire tooling 2026-06-26 12:48:26 -04:00
.gitkeep Phase 0b slice: monorepo scaffold + @sh-mcp/shared core + integration packages (#2) 2026-06-26 12:42:17 -04:00