Conversation
…dmin creds via TF_VAR secrets (#28) * public-repo log hygiene: role ARNs to secrets, account-id masking, admin creds out of tfvars Actions logs on a public repo are publicly readable; repo VARIABLES are not masked there. Role ARNs (account-id-bearing) move to same-named SECRETS, every configure-aws-credentials step sets mask-aws-account-id: true, and admin_email/admin_password leave the tfvars blobs — terraform.yml exports them from TF_VAR_ADMIN_* secrets as TF_VAR_ env. * close the plan-artifact channel + guard un-stripped tfvars (review follow-up) A tfplan embeds all variable values in plaintext and public-repo artifacts are world-downloadable: the plan job now encrypts the artifact with the TF_PLAN_ENC_KEY secret (fail-closed) and apply decrypts it. Both restore steps hard-fail if the restored tfvars still carries admin_email/ admin_password (tfvars outranks TF_VAR_ env — a stale blob would silently bypass the secrets channel). Apply's missing-role error now says secret. * demo user per stack, admin user gated off, IAM views admin-only Every stack now creates one regular Cognito user (demo_email, default demo@awsops.local; password via the TF_VAR_DEMO_PASSWORD secret on the plan step only). The admin user is no longer created by default (create_admin_user=false) — enabling it is a per-stack decision with per-stack credentials, resolving the shared-admin-credential review MAJOR. An 'admins' Cognito group backs web/lib/admin.ts's group check, and /api/security now withholds iam_no_mfa findings from non-admins (same convention as the admin-gated iam_user/iam_role inventory types); the security page renders only the checks the API returns. The apply job also cleans decrypted plan/config files off the persistent runner (if: always()) and no longer receives TF_VAR_* env a saved plan never reads. * fix: address review feedback — plan-job runner cleanup + admin provisioning docs The plan job gets the same if: always() sensitive-file cleanup as apply (an encrypt-step failure would otherwise strand a plaintext tfplan on the shared persistent runner), and the runbook's Korean text now states how a per-stack admin is actually provisioned (local apply with TF_VAR_admin_* env). * fix: address review feedback — demo user gated for production, k8sgpt admin_email path restored create_demo_user (default true) lets a stack — production foremost — refuse the shared demo credential, and a per-stack demo_password tfvars override is now the sanctioned path (the blob is itself a secret). The tfvars guard narrows to admin_password only: admin_email is not a secret and k8sgpt.tf needs it in tfvars when that flag is on, now enforced by a precondition on the budget resource. Runbook secrets matrix gains the six role-ARN secrets. * fix: address review feedback — demo user opt-in (default false), runner cleanup in deploy workflows create_demo_user now defaults to false, so the shared demo credential can never reach a stack by omission — dev-tier stacks opt in via their tfvars blob (atomoh's re-registered with create_demo_user = true). deploy-web and deploy-agentcore get the same if: always() cleanup of restored terraform config off the persistent runner. * fix: address review feedback — admin user leaves Terraform management entirely A TF-managed admin needs a password channel through CI plans (forbidden by the hygiene policy), and a locally-applied one ping-pongs into a destroy on the next CI plan via shared remote state — so aws_cognito_user.admin (and create_admin_user/admin_password) are removed outright. Admins are provisioned per stack out-of-band (admin-create-user + admins group; runbook carries the commands). admin_email stays solely as the k8sgpt notification address. Existing stacks' TF-managed admin is intentionally destroyed on the next apply.
🤖 AI Code Review (Claude Fable 5 chair · lens×model matrix)_Cells (model/lens): codex/L2 codex/L3 codex/L4 codex/L5 _ Status: BLOCKED — CRITICAL/MAJOR issues must be resolved before merge 🛑 Forced FAIL due to coverage collapse: at most one vendor survived, so cross-verification across the lens x model matrix cannot happen — fail-closed regardless of the chair's judgment. Final Review — PR #29: Promote dev: public-repo log hygiene + demo/admin user policySummaryThis PR moves role ARNs from repo variables into masked secrets, adds Panel note: each lens was seen by a single model (codex), so cross-model agreement signals are unavailable; all adopted findings were independently verified against the base checkout and diff. Issues per lensL2 — Code correctnessPanel: no findings. Chair verification concurs.
No CRITICAL/MAJOR/MINOR. L3 — Security / AWS mutation safetyMAJOR — Removing the MINOR (downgraded from panel MAJOR) — Shared demo password persists in Terraform state and the plan file. The panel's claim is factually true ( Positive L3 notes (verified): role-ARN secrets migration + L4 — Observability / data-integration correctnessPanel: no findings. Chair concurs — no Steampipe query, CIS-check, or diagnosis-logic semantics changed (steampipe.tf/workers.tf hunks are No CRITICAL/MAJOR/MINOR. L5 — Docs / ADR consistencyMINOR — MINOR (chair, in-diff) — auth.tf comment misdescribes the destroy as a state removal — see the L3 MAJOR; if the Out-of-gate note (out of diff scope): Otherwise the runbook additions accurately describe the implemented mechanics (secret names, fail-closed defaults, encryption flow, per-stack override precedence) — docs/implementation consistency is good. Suggestions
VerdictOne verified MAJOR (destructive admin-user removal with an unacknowledged sub/ownership side effect and a strictly-better non-destructive alternative) blocks promotion; everything else is MINOR or clean. Triggered by commit |
Promotes the merged #28 chain: role-ARN secrets (log masking),
mask-aws-account-id, encrypted tfplan artifact, per-stack demo user (opt-increate_demo_user), admin user out of Terraform management (out-of-band CLI provisioning), IAM findings admin-gated in the web BFF, and persistent-runner cleanup steps.🤖 Generated with Claude Code