seahaven-org-baseline/lib
Adam Moussa 59852eff34
fix(iam): restore four permissions the boundary would have denied at migration
/sh-security-review (6 detectors + verifier) found four HIGH findings, all the
same defect class: the template's permission-source comment block was used as
the sanctioned scope source, but it is an incomplete and in places invented
secondary record. Each was verified against the real stack template before
fixing. None is live today (prod/dev boundary usage is 0); all four would have
been AccessDenied at first migration, three of them SILENTLY.

- SES configuration-set/seahaven-email-events restored. afterhours-shift-manager
  template.yaml:178-181 grants it with an in-repo comment stating the send is
  denied without it. An earlier revision dropped it after checking whether any
  config set exists in prod/dev today (none do) -- the wrong test. The right
  question is whether an enumerated stack's own IAM policy names it.
- SES identity/seahavenind.com added. meal-order-manager's SenderEmail defaults
  to adam@seahavenind.com (template.yaml:20-22) and email_report sends with it.
  The prior 'unverified identity fails loudly anyway' argument holds only until
  the migration verifies the domain, which the migration procedure requires.
- scheduler:Create/Delete/GetSchedule + iam:PassRole (scheduler.amazonaws.com
  only) added. afterhours template.yaml:110-120 needs both; the block omitted
  them entirely. Failure is silent -- app.py wraps create_schedule in a bare
  except, so the Slack command reports success and no schedule exists.
- secret:afi-slack-webhook-* added. The block named
  'afi-backup-monitor/slack-webhook-url', which does not exist; both afi secret
  ARNs are deploy parameters, so the real names live only in that repo's
  README:48-49 (afi-api-key, afi-slack-webhook).

Also corrected, all comment-only:
- The permission-source block itself, at each of the four points it was wrong,
  with the correction and its evidence recorded inline.
- The false claim that SAM auto-names async DLQs (it does not -- all four
  payments queues are hand-written with explicit QueueNames). Replaced with the
  real invariant: any queue a boundary-carrying function sends to must be
  payments-* or the boundary widens in the same PR; a denied destination write
  is silent.
- SIZE BUDGET: was 13 statements / 4,060 chars, actually 16 / 5,457 after these
  fixes. Headroom is 687 chars, roughly ONE more workload -- not the five the
  header claimed. Flagged per-workload boundaries as the realistic next move.

Verified unchanged: logical id LambdaExecutionBoundary and ManagedPolicyName
seahaven-lambda-execution-boundary, so all eight pinning conditions across both
guardrail policies still resolve.
2026-07-30 18:17:16 -04:00
..
deploy-substrate fix(iam): restore four permissions the boundary would have denied at migration 2026-07-30 18:17:16 -04:00
scp Adopt external-dev OU and its 3 SCPs via resource import (#45) 2026-07-14 14:10:10 -04:00
terraform-substrate fix(iam): scope Terraform guardrail role writes to a Terraform-owned path 2026-07-30 16:55:45 -04:00
account-baseline-stack.ts Merge external-dev member baseline; rename to seahaven-org-baseline (#43) 2026-07-14 13:53:07 -04:00
alarm-topic-stack.ts feat(prod): seahaven-prod DynamoDB CMK + site-alerts alarm topic (procurement-ingest migration Phase 0a) (#57) 2026-07-23 15:29:55 -04:00
backup-offsite-stack.ts Add AWS Backup with offsite vault (audit C-7) (#3) 2026-05-29 18:06:17 -04:00
backup-stack.ts chore: drop deleted tables from Phase2 backup selection (#59) 2026-07-23 16:21:04 -04:00
bedrock-logging-regional.ts [INFRA-91/89/16/88/73] Reconcile out-of-band baseline changes + add missing detective controls (#18) 2026-06-08 17:03:18 -04:00
bedrock-logging.ts Add Bedrock invocation logging destinations (#12) 2026-06-03 15:17:39 -04:00
cis-monitoring.ts feat: harden CIS 4.1 detection depth with M-of-N alarm tuning and CloudTrail Insights (#38) 2026-07-07 15:47:41 -04:00
deploy-substrate-stack.ts fix(deploy-substrate): move boundary-gated IAM policy off the role's inline budget 2026-07-27 16:43:15 -04:00
detective-controls.ts seahaven-dev account baseline with org-managed detection (Phase 4) (#49) 2026-07-14 16:41:36 -04:00
dynamodb-cmk-stack.ts [INFRA-95] Shared DynamoDB CMK for sensitive finance/PII tables (M-3) (#21) 2026-06-08 19:04:42 -04:00
flow-logs.ts Merge external-dev member baseline; rename to seahaven-org-baseline (#43) 2026-07-14 13:53:07 -04:00
governance-toggles.ts Merge external-dev member baseline; rename to seahaven-org-baseline (#43) 2026-07-14 13:53:07 -04:00
logs-key.ts [INFRA-96] CMK-encrypt sensitive CloudWatch log groups (M-24) (#20) 2026-06-08 19:04:36 -04:00
member-baseline-stack.ts seahaven-prod account baseline (Phase 5) (#50) 2026-07-14 17:17:55 -04:00
org-governance-stack.ts fix(scp): exempt chatbot:* from workloads-region-lock (global service, us-east-2 control plane) (#58) 2026-07-23 15:47:11 -04:00
regional-baseline-stack.ts [INFRA-91/89/16/88/73] Reconcile out-of-band baseline changes + add missing detective controls (#18) 2026-06-08 17:03:18 -04:00
ses-monitoring.ts Add monitoring + logging layer (audit Day 2: H-1/H-14/M-13) (#6) 2026-06-02 15:16:24 -04:00
terraform-substrate-stack.ts fix(iam): scope Terraform guardrail role writes to a Terraform-owned path 2026-07-30 16:55:45 -04:00
web-acl.ts Add shared CloudFront WAF WebACL (audit Day 3: M-17) (#7) 2026-06-02 16:42:24 -04:00