procurement-ingest/lambdas/wo
Adam Moussa 5746de001e
fix(webhook): address Open SWE review — require webhook URL, guard seq, bound client timeouts
Triaged all 29 Open SWE findings (6 posted + 23 below-threshold). Fixed the
three genuine ones; the rest are refuted/unreachable/intentional (details
replied on the PR).

- #0/#22 (high): SHOC_WEBHOOK_URL now has NO hardcoded default. A dropped env
  var previously fell back to the dev endpoint and would ship prod work-order
  data there; deliver() now fails closed (retryable) on an unset/non-https
  URL. The CDK env var is the single source.
- #9/#26 (high): capture record["dynamodb"]["SequenceNumber"] once, safely,
  before delivery. The catch-all exists so an exception can't re-deliver the
  whole batch — it must not itself KeyError on the subscript. A record without
  a SequenceNumber (unreachable for real streams) is logged + skipped.
- #16/#17: bound the Secrets Manager + SQS client timeouts (botocore Config:
  3s connect / 5s read / 2 retries) so a slow AWS call can't hang the
  invocation toward its 60s timeout and re-deliver the batch.

Dismissed (confirmed sound): HMAC scope is contract-pinned + golden-vector
shared (changing it is a breaking cross-party change); the replay script's
hardcoded prod account is a deliberate fail-closed guard, and its required
--url + dry-run-default + https-only are its intended operator-runbook design.

753 pytest / 85.7%, ruff, cdk synth green. No IAM/auth/Lambda-signature
change, so the mandatory cross-family gates are unaffected.
2026-07-24 17:40:13 -04:00
..
email_processor test: consolidate test roots — one loader, shared support, enforced CI floor (phase 8) (#118) 2026-07-20 16:19:15 -04:00
shoc_emitter fix(webhook): address Open SWE review — require webhook URL, guard seq, bound client timeouts 2026-07-24 17:40:13 -04:00
shoc_hmac_rotator fix(webhook): drop kid from rotator test_ok log (CodeQL clear-text-logging FP) 2026-07-24 16:51:55 -04:00
web_ui chore(deps): update boto3 requirement in /lambdas/wo/web_ui (#123) 2026-07-21 16:06:29 -04:00