Skip to content

fix: high-severity bug sweep - #411

Merged
nourshoreibah merged 1 commit into
mainfrom
fix/high-severity-bug-sweep
Oct 16, 2026
Merged

nourshoreibah merged 1 commit into
mainfrom
fix/high-severity-bug-sweep

Conversation

@nourshoreibah

Copy link
Copy Markdown
Collaborator

Fixes the high-severity findings from a full-app bug sweep.

Backend / infra

  • Report saving broken in prod/preview — API Gateway's bare /reports resource only allowed GET, so POST /reports never reached the lambda. Added POST (infrastructure/{aws,preview}/api_gateway.tf); the deployment trigger hashes the method map, so the stage redeploys.
  • admin_notes leaked to members via GET /projects/:id/overview — now redacted like GET /expenditures.
  • Roster edits wiped hours/start_date — syncMemberships now diffs (delete removed, update changed roles, insert new) instead of delete-all + reinsert.
  • Receipt IDOR — receiptUrl must sit under receipts/<expense's project>/ on create/PATCH; view and delete use the same check, so one project's row can't read or delete another's receipt. Receipt filenames are sanitized like report uploads; malformed %-encoding no longer throws.
  • Register email enumeration — an already-claimed email now gets the same 403 INVITATION_REQUIRED as an unknown one.
  • Duplicate report objectUrl — POST /reports 409s on an already-registered object; delete keeps an object another row still references.
  • Unstable pagination — reports/expenditures order by date then id.
  • Frozen-status race — expense edit/delete pass the status they authorized against; the store re-checks under the row lock and the controller returns 409.
  • PATCH null was a silent no-op — null now clears category/description/receipt.
  • Repeat donations — dropped UNIQUE (donor_id, project_id) (two one-DDL migrations: add a donor_id index, then drop the constraint; DSQL supports DROP CONSTRAINT since 2026-07). No IF EXISTS, so a wrong constraint name fails the migrate loudly. Removed the 409 mapping.

Frontend

  • Expense amount keeps cents (typing 12.50 saved $1,250); submit ignores re-entry; changing project after upload clears the receipt.
  • Query cache is dropped on any identity change (logout, session expiry, login) so the next user never sees the previous user's rows.
  • Only a 400/401/403 ends the session; network/5xx/429 on /auth/me or refresh keep tokens and retry.
  • Set-new-password errors are shown; an expired challenge returns to sign-in with a message.
  • Donations page no longer requires donors:view (members got a 403 page); /donors dropped from its prefetch.
  • Dates parsed as local days (parseApiDate) in the expense table, month filter, reports date/year filter and review modal.
  • Reports bulk-delete selection clears on search/filter change.

Notes

  • Behaviour change: an existing expense whose receipt was uploaded under a different project's prefix (the old project-switch bug) will no longer serve/delete that receipt.
  • Medium-severity fixes are not in this PR.

Testing

  • Lambda typecheck clean (auth, donors, expenditures, projects, reports); shared/store builds + tests pass.
  • Jest (--runInBand): expenditures 140, projects 164, reports 145, donors 60, auth unit 81 — all pass. New tests: overview redaction, roster preserves hours, cross-project receipt rejected/not deleted, delete 409 on status change, null clears, duplicate objectUrl 409, shared object kept, repeat donation 201.
  • Migrations pass @aws/dsql-lint@0.2.20 and apply on local Postgres.
  • Frontend tsc --noEmit clean. Not run: frontend lint/jest, auth e2e (needs the dev server on :3000).

🤖 Generated with Claude Code

- infra: allow POST on the bare /reports resource so uploaded reports are saved
- expenses: amount input keeps cents; ignore re-submits; drop the receipt when the project changes
- projects: redact admin_notes in the overview; roster edits keep hours and start dates
- receipts: keys must sit under the expense's own project; sanitize filenames; guard bad %-encoding
- auth: register answers a claimed email like an unknown one (no enumeration)
- reports: refuse a duplicate objectUrl; keep an object another row still uses; id tiebreak
- expenditures: id tiebreak; status re-checked under the row lock (409); null clears fields
- donations: allow repeat gifts from a donor to a project (drop the UNIQUE constraint)
- frontend: clear cached queries on identity change; transient refresh/me failures keep
  the session; show set-password errors; donations page no longer needs donors:view;
  dates parsed as local days; reports selection cleared on filter change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

This PR contains a database migration

  • apps/backend/db/migrations/V20261015200000__index_project_donations_donor_id.sql
  • apps/backend/db/migrations/V20261015200100__allow_repeat_donations.sql

It will be applied to the production database automatically when this PR merges, before the new lambda code is deployed. Please confirm before requesting review:

  • Applied and tested locally. cd apps/backend && make migrate, then run the affected lambda's tests (cd apps/backend/lambdas/<name> && npm test). make show-migrations shows what applied.
  • Safe for the code that is live right now. During the deploy window -- and indefinitely if the deploy fails -- the currently deployed lambdas run against your new schema. Additive changes (CREATE TABLE, nullable ADD COLUMN, CREATE INDEX) are fine in one PR. DROP COLUMN, renames, ADD COLUMN NOT NULL with no default, and new UNIQUE/CHECK/FOREIGN KEY constraints need two merged PRs -- see the expand/contract rules in apps/backend/db/README.md.
  • Kept separate from unrelated changes. A migration PR should ideally contain the migration, the code that needs it, and nothing else. It changes production state, it is the one thing here that redeploying cannot roll back, and a reviewer should be able to see the whole schema change without scrolling past unrelated work.
  • No already-merged migration was edited. Fix an old migration by adding a new one; there is no down.

shared/types/db-types.d.ts is regenerated and pushed to this branch automatically -- don't hand-edit it. Expect one red migrations-fresh check before that commit lands.

This PR also changes 30 files outside apps/backend/db/. If any are unrelated to this schema change, consider splitting them into a separate PR.

@github-actions

Copy link
Copy Markdown
Contributor

Terraform Plan 📖 infrastructure/aws

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Terraform Plan 📖success

Show Plan
data.archive_file.lambda_placeholder: Reading...
data.archive_file.lambda_placeholder: Read complete after 0s [id=96878a51e358033297a32b882fd5223cc95fb8a7]
aws_acm_certificate.frontend[0]: Refreshing state... [id=arn:aws:acm:us-east-1:404813129370:certificate/ff647d49-05a1-4ca4-a652-dc48faec1688]
data.aws_caller_identity.current: Reading...
data.aws_route53_zone.app[0]: Reading...
data.aws_region.current: Reading...
aws_cloudfront_origin_access_control.frontend: Refreshing state... [id=E1ZI46GY0YEFAD]
aws_ses_domain_identity.app[0]: Refreshing state... [id=branchaccounting.org]
aws_iam_openid_connect_provider.github: Refreshing state... [id=arn:aws:iam::404813129370:oidc-provider/token.actions.githubusercontent.com]
aws_acm_certificate.api[0]: Refreshing state... [id=arn:aws:acm:us-east-2:404813129370:certificate/836032c9-c55f-461a-b4fb-8e5d76fae957]
aws_cloudfront_function.rewrite_index: Refreshing state... [id=branch-frontend-rewrite-index]
data.aws_region.current: Read complete after 0s [id=us-east-2]
aws_iam_role.lambda_role: Refreshing state... [id=branch-lambda-role]
aws_dsql_cluster.branch: Refreshing state...
data.aws_caller_identity.current: Read complete after 0s [id=404813129370]
aws_s3_bucket.reports_bucket: Refreshing state... [id=c4c-branch-generated-reports20260830181426405600000001]
aws_api_gateway_rest_api.branch_api: Refreshing state... [id=btt3bl5139]
aws_cloudwatch_log_group.lambda["auth"]: Refreshing state... [id=/aws/lambda/branch-auth]
aws_cloudwatch_log_group.lambda["donors"]: Refreshing state... [id=/aws/lambda/branch-donors]
aws_cloudwatch_log_group.lambda["expenditures"]: Refreshing state... [id=/aws/lambda/branch-expenditures]
aws_cloudwatch_log_group.lambda["projects"]: Refreshing state... [id=/aws/lambda/branch-projects]
data.aws_route53_zone.app[0]: Read complete after 1s [id=Z05958263TSNBU4JSXID1]
aws_cloudwatch_log_group.lambda["reports"]: Refreshing state... [id=/aws/lambda/branch-reports]
aws_cloudwatch_log_group.lambda["users"]: Refreshing state... [id=/aws/lambda/branch-users]
data.infisical_secrets.sentry_folder: Reading...
data.infisical_secrets.grafana_folder: Reading...
aws_s3_bucket.lambda_deployments: Refreshing state... [id=branch-lambda-deployments-404813129370]
aws_s3_bucket.frontend: Refreshing state... [id=branch-frontend-404813129370]
aws_ses_domain_dkim.app[0]: Refreshing state... [id=branchaccounting.org]
data.infisical_secrets.sentry_folder: Read complete after 0s
aws_ses_domain_mail_from.app[0]: Refreshing state... [id=branchaccounting.org]
data.aws_iam_policy_document.ci_migrate_assume: Reading...
data.infisical_secrets.grafana_folder: Read complete after 0s
data.aws_iam_policy_document.ci_migrate_assume: Read complete after 0s [id=3606114350]
data.aws_iam_policy_document.ci_preview_assume: Reading...
data.aws_iam_policy_document.ci_preview_assume: Read complete after 0s [id=245163413]
data.aws_iam_policy_document.ci_plan_assume: Reading...
data.aws_iam_policy_document.ci_apply_assume: Reading...
data.aws_iam_policy_document.ci_plan_assume: Read complete after 0s [id=1050147292]
data.aws_iam_policy_document.ci_apply_assume: Read complete after 0s [id=3235391464]
aws_api_gateway_gateway_response.cors["DEFAULT_5XX"]: Refreshing state... [id=aggr-btt3bl5139-DEFAULT_5XX]
aws_api_gateway_gateway_response.cors["DEFAULT_4XX"]: Refreshing state... [id=aggr-btt3bl5139-DEFAULT_4XX]
aws_api_gateway_resource.lambda_resources["auth"]: Refreshing state... [id=j2bjjp]
aws_api_gateway_resource.lambda_resources["projects"]: Refreshing state... [id=5rlpdk]
aws_api_gateway_resource.lambda_resources["reports"]: Refreshing state... [id=fbius2]
aws_api_gateway_resource.lambda_resources["users"]: Refreshing state... [id=r6frgh]
aws_api_gateway_resource.lambda_resources["donors"]: Refreshing state... [id=ooaugc]
aws_api_gateway_resource.lambda_resources["expenditures"]: Refreshing state... [id=x3f6cx]
aws_iam_role_policy_attachment.lambda_basic: Refreshing state... [id=branch-lambda-role/arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]
aws_iam_role_policy.lambda_ses_send: Refreshing state... [id=branch-lambda-role:branch-lambda-ses-send]
aws_iam_role.ci_migrate: Refreshing state... [id=branch-ci-migrate]
aws_iam_role.ci_preview: Refreshing state... [id=branch-ci-preview]
aws_iam_role.ci_plan: Refreshing state... [id=branch-ci-plan]
aws_route53_record.dmarc[0]: Refreshing state... [id=Z05958263TSNBU4JSXID1__dmarc.branchaccounting.org_TXT]
aws_route53_record.ses_verification[0]: Refreshing state... [id=Z05958263TSNBU4JSXID1__amazonses.branchaccounting.org_TXT]
aws_iam_role.ci_apply: Refreshing state... [id=branch-ci-apply]
aws_route53_record.api_cert_validation["api.branchaccounting.org"]: Refreshing state... [id=Z05958263TSNBU4JSXID1__4fac00187cd968edbe71cbc7664d4601.api.branchaccounting.org._CNAME]
aws_route53_record.frontend_cert_validation["branchaccounting.org"]: Refreshing state... [id=Z05958263TSNBU4JSXID1__6e4f9a0f55e3f295054f4aebd1cde0c8.branchaccounting.org._CNAME]
aws_route53_record.spf[0]: Refreshing state... [id=Z05958263TSNBU4JSXID1_branchaccounting.org_TXT]
aws_iam_role_policy.lambda_dsql_connect: Refreshing state... [id=branch-lambda-role:branch-lambda-dsql-connect]
aws_route53_record.ses_mail_from_spf[0]: Refreshing state... [id=Z05958263TSNBU4JSXID1_mail.branchaccounting.org_TXT]
aws_route53_record.ses_mail_from_mx[0]: Refreshing state... [id=Z05958263TSNBU4JSXID1_mail.branchaccounting.org_MX]
aws_route53_record.ses_dkim[0]: Refreshing state... [id=Z05958263TSNBU4JSXID1_um5rslhbpotxdh2ojg7ho3ajwkz4ouom._domainkey.branchaccounting.org_CNAME]
aws_route53_record.ses_dkim[1]: Refreshing state... [id=Z05958263TSNBU4JSXID1_yka5xbfuragci7thfnkbnpsibjvkkbu7._domainkey.branchaccounting.org_CNAME]
aws_route53_record.ses_dkim[2]: Refreshing state... [id=Z05958263TSNBU4JSXID1_4ngjy5faumusypdxako3jdie73lihmud._domainkey.branchaccounting.org_CNAME]
aws_api_gateway_resource.lambda_proxy["projects"]: Refreshing state... [id=zofyad]
aws_api_gateway_resource.lambda_proxy["reports"]: Refreshing state... [id=qpfkcg]
aws_api_gateway_resource.lambda_proxy["users"]: Refreshing state... [id=0s4etn]
aws_api_gateway_resource.lambda_proxy["donors"]: Refreshing state... [id=37l1nw]
aws_api_gateway_resource.lambda_proxy["auth"]: Refreshing state... [id=7tjm3k]
aws_api_gateway_resource.lambda_proxy["expenditures"]: Refreshing state... [id=2haqg7]
aws_api_gateway_method.lambda_methods["donors-POST"]: Refreshing state... [id=agm-btt3bl5139-ooaugc-POST]
aws_api_gateway_method.lambda_methods["expenditures-PATCH"]: Refreshing state... [id=agm-btt3bl5139-x3f6cx-PATCH]
aws_api_gateway_method.lambda_methods["users-OPTIONS"]: Refreshing state... [id=agm-btt3bl5139-r6frgh-OPTIONS]
aws_api_gateway_method.lambda_methods["expenditures-POST"]: Refreshing state... [id=agm-btt3bl5139-x3f6cx-POST]
aws_api_gateway_method.lambda_methods["auth-POST"]: Refreshing state... [id=agm-btt3bl5139-j2bjjp-POST]
aws_api_gateway_method.lambda_methods["reports-GET"]: Refreshing state... [id=agm-btt3bl5139-fbius2-GET]
aws_api_gateway_method.lambda_methods["auth-OPTIONS"]: Refreshing state... [id=agm-btt3bl5139-j2bjjp-OPTIONS]
aws_api_gateway_method.lambda_methods["users-DELETE"]: Refreshing state... [id=agm-btt3bl5139-r6frgh-DELETE]
aws_api_gateway_method.lambda_methods["auth-GET"]: Refreshing state... [id=agm-btt3bl5139-j2bjjp-GET]
aws_api_gateway_method.lambda_methods["projects-GET"]: Refreshing state... [id=agm-btt3bl5139-5rlpdk-GET]
aws_api_gateway_method.lambda_methods["expenditures-OPTIONS"]: Refreshing state... [id=agm-btt3bl5139-x3f6cx-OPTIONS]
aws_api_gateway_method.lambda_methods["users-GET"]: Refreshing state... [id=agm-btt3bl5139-r6frgh-GET]
aws_api_gateway_method.lambda_methods["donors-OPTIONS"]: Refreshing state... [id=agm-btt3bl5139-ooaugc-OPTIONS]
aws_api_gateway_method.lambda_methods["projects-OPTIONS"]: Refreshing state... [id=agm-btt3bl5139-5rlpdk-OPTIONS]
aws_api_gateway_method.lambda_methods["reports-OPTIONS"]: Refreshing state... [id=agm-btt3bl5139-fbius2-OPTIONS]
aws_api_gateway_method.lambda_methods["expenditures-GET"]: Refreshing state... [id=agm-btt3bl5139-x3f6cx-GET]
aws_api_gateway_method.lambda_methods["projects-POST"]: Refreshing state... [id=agm-btt3bl5139-5rlpdk-POST]
aws_api_gateway_method.lambda_methods["donors-GET"]: Refreshing state... [id=agm-btt3bl5139-ooaugc-GET]
aws_api_gateway_method.lambda_methods["users-PATCH"]: Refreshing state... [id=agm-btt3bl5139-r6frgh-PATCH]
aws_api_gateway_method.lambda_methods["users-POST"]: Refreshing state... [id=agm-btt3bl5139-r6frgh-POST]
aws_iam_role_policy.lambda_s3_objects: Refreshing state... [id=branch-lambda-role:branch-lambda-s3-objects]
aws_s3_bucket_public_access_block.reports_bucket_public_access: Refreshing state... [id=c4c-branch-generated-reports20260830181426405600000001]
aws_acm_certificate_validation.api[0]: Refreshing state... [id=2026-10-14 22:54:35.419 +0000 UTC]
aws_iam_role_policy_attachment.ci_apply_admin: Refreshing state... [id=branch-ci-apply/arn:aws:iam::aws:policy/AdministratorAccess]
aws_iam_role_policy.ci_preview: Refreshing state... [id=branch-ci-preview:preview-env]
aws_iam_role_policy_attachment.ci_plan_dsql_readonly: Refreshing state... [id=branch-ci-plan/arn:aws:iam::aws:policy/AmazonAuroraDSQLReadOnlyAccess]
aws_iam_role_policy.ci_plan_state_lock: Refreshing state... [id=branch-ci-plan:tfstate-lock]
aws_iam_role_policy_attachment.ci_plan_readonly: Refreshing state... [id=branch-ci-plan/arn:aws:iam::aws:policy/ReadOnlyAccess]
aws_acm_certificate_validation.frontend[0]: Refreshing state... [id=2026-10-14 22:54:31.121 +0000 UTC]
aws_api_gateway_method.cors_proxy_options["expenditures"]: Refreshing state... [id=agm-btt3bl5139-2haqg7-OPTIONS]
aws_api_gateway_method.cors_proxy_options["auth"]: Refreshing state... [id=agm-btt3bl5139-7tjm3k-OPTIONS]
aws_api_gateway_method.cors_proxy_options["donors"]: Refreshing state... [id=agm-btt3bl5139-37l1nw-OPTIONS]
aws_api_gateway_method.cors_proxy_options["reports"]: Refreshing state... [id=agm-btt3bl5139-qpfkcg-OPTIONS]
aws_api_gateway_method.cors_proxy_options["projects"]: Refreshing state... [id=agm-btt3bl5139-zofyad-OPTIONS]
aws_api_gateway_method.cors_proxy_options["users"]: Refreshing state... [id=agm-btt3bl5139-0s4etn-OPTIONS]
aws_api_gateway_method.lambda_proxy_any["projects"]: Refreshing state... [id=agm-btt3bl5139-zofyad-ANY]
aws_api_gateway_method.lambda_proxy_any["expenditures"]: Refreshing state... [id=agm-btt3bl5139-2haqg7-ANY]
aws_api_gateway_method.lambda_proxy_any["reports"]: Refreshing state... [id=agm-btt3bl5139-qpfkcg-ANY]
aws_api_gateway_method.lambda_proxy_any["auth"]: Refreshing state... [id=agm-btt3bl5139-7tjm3k-ANY]
aws_api_gateway_method.lambda_proxy_any["users"]: Refreshing state... [id=agm-btt3bl5139-0s4etn-ANY]
aws_api_gateway_method.lambda_proxy_any["donors"]: Refreshing state... [id=agm-btt3bl5139-37l1nw-ANY]
aws_s3_bucket_public_access_block.frontend: Refreshing state... [id=branch-frontend-404813129370]
aws_api_gateway_domain_name.api[0]: Refreshing state... [id=api.branchaccounting.org]
aws_s3_bucket_versioning.lambda_deployments: Refreshing state... [id=branch-lambda-deployments-404813129370]
aws_s3_bucket_server_side_encryption_configuration.lambda_deployments: Refreshing state... [id=branch-lambda-deployments-404813129370]
aws_s3_object.lambda_placeholder["expenditures"]: Refreshing state... [id=branch-lambda-deployments-404813129370/expenditures/initial.zip]
aws_s3_object.lambda_placeholder["users"]: Refreshing state... [id=branch-lambda-deployments-404813129370/users/initial.zip]
aws_s3_object.lambda_placeholder["auth"]: Refreshing state... [id=branch-lambda-deployments-404813129370/auth/initial.zip]
aws_s3_object.lambda_placeholder["projects"]: Refreshing state... [id=branch-lambda-deployments-404813129370/projects/initial.zip]
aws_s3_object.lambda_placeholder["donors"]: Refreshing state... [id=branch-lambda-deployments-404813129370/donors/initial.zip]
aws_s3_object.lambda_placeholder["reports"]: Refreshing state... [id=branch-lambda-deployments-404813129370/reports/initial.zip]
aws_cloudfront_distribution.frontend: Refreshing state... [id=EOTKQTE3WUELO]
aws_api_gateway_method_response.cors["expenditures"]: Refreshing state... [id=agmr-btt3bl5139-x3f6cx-OPTIONS-200]
aws_api_gateway_method_response.cors["users"]: Refreshing state... [id=agmr-btt3bl5139-r6frgh-OPTIONS-200]
aws_api_gateway_method_response.cors["reports"]: Refreshing state... [id=agmr-btt3bl5139-fbius2-OPTIONS-200]
aws_api_gateway_method_response.cors["donors-proxy"]: Refreshing state... [id=agmr-btt3bl5139-37l1nw-OPTIONS-200]
aws_api_gateway_method_response.cors["reports-proxy"]: Refreshing state... [id=agmr-btt3bl5139-qpfkcg-OPTIONS-200]
aws_api_gateway_method_response.cors["donors"]: Refreshing state... [id=agmr-btt3bl5139-ooaugc-OPTIONS-200]
aws_api_gateway_method_response.cors["auth-proxy"]: Refreshing state... [id=agmr-btt3bl5139-7tjm3k-OPTIONS-200]
aws_api_gateway_method_response.cors["projects-proxy"]: Refreshing state... [id=agmr-btt3bl5139-zofyad-OPTIONS-200]
aws_api_gateway_method_response.cors["projects"]: Refreshing state... [id=agmr-btt3bl5139-5rlpdk-OPTIONS-200]
aws_api_gateway_method_response.cors["expenditures-proxy"]: Refreshing state... [id=agmr-btt3bl5139-2haqg7-OPTIONS-200]
aws_api_gateway_method_response.cors["users-proxy"]: Refreshing state... [id=agmr-btt3bl5139-0s4etn-OPTIONS-200]
aws_api_gateway_method_response.cors["auth"]: Refreshing state... [id=agmr-btt3bl5139-j2bjjp-OPTIONS-200]
aws_api_gateway_integration.cors["expenditures-proxy"]: Refreshing state... [id=agi-btt3bl5139-2haqg7-OPTIONS]
aws_api_gateway_integration.cors["donors-proxy"]: Refreshing state... [id=agi-btt3bl5139-37l1nw-OPTIONS]
aws_api_gateway_integration.cors["auth-proxy"]: Refreshing state... [id=agi-btt3bl5139-7tjm3k-OPTIONS]
aws_api_gateway_integration.cors["projects"]: Refreshing state... [id=agi-btt3bl5139-5rlpdk-OPTIONS]
aws_api_gateway_integration.cors["expenditures"]: Refreshing state... [id=agi-btt3bl5139-x3f6cx-OPTIONS]
aws_api_gateway_integration.cors["users-proxy"]: Refreshing state... [id=agi-btt3bl5139-0s4etn-OPTIONS]
aws_api_gateway_integration.cors["reports"]: Refreshing state... [id=agi-btt3bl5139-fbius2-OPTIONS]
aws_api_gateway_integration.cors["reports-proxy"]: Refreshing state... [id=agi-btt3bl5139-qpfkcg-OPTIONS]
aws_api_gateway_integration.cors["users"]: Refreshing state... [id=agi-btt3bl5139-r6frgh-OPTIONS]
aws_api_gateway_integration.cors["donors"]: Refreshing state... [id=agi-btt3bl5139-ooaugc-OPTIONS]
aws_api_gateway_integration.cors["projects-proxy"]: Refreshing state... [id=agi-btt3bl5139-zofyad-OPTIONS]
aws_api_gateway_integration.cors["auth"]: Refreshing state... [id=agi-btt3bl5139-j2bjjp-OPTIONS]
aws_route53_record.api[0]: Refreshing state... [id=Z05958263TSNBU4JSXID1_api.branchaccounting.org_A]
data.aws_iam_policy_document.frontend_bucket: Reading...
data.aws_iam_policy_document.frontend_bucket: Read complete after 0s [id=1913669945]
aws_s3_bucket_cors_configuration.reports_bucket_cors: Refreshing state... [id=c4c-branch-generated-reports20260830181426405600000001]
aws_route53_record.frontend[0]: Refreshing state... [id=Z05958263TSNBU4JSXID1_branchaccounting.org_A]
aws_s3_bucket_policy.frontend: Refreshing state... [id=branch-frontend-404813129370]
aws_cognito_user_pool.branch_user_pool: Refreshing state... [id=us-east-2_ES8vlp7b4]
aws_iam_role_policy.lambda_cognito_admin: Refreshing state... [id=branch-lambda-role:branch-lambda-cognito-admin]
aws_cognito_user_pool_client.branch_client: Refreshing state... [id=26r3n4d9ttjp6fvhdg1erd2eli]
aws_lambda_function.functions["reports"]: Refreshing state... [id=branch-reports]
aws_lambda_function.functions["donors"]: Refreshing state... [id=branch-donors]
aws_lambda_function.functions["projects"]: Refreshing state... [id=branch-projects]
aws_lambda_function.functions["auth"]: Refreshing state... [id=branch-auth]
aws_lambda_function.functions["users"]: Refreshing state... [id=branch-users]
aws_lambda_function.functions["expenditures"]: Refreshing state... [id=branch-expenditures]
aws_iam_role_policy.ci_migrate: Refreshing state... [id=branch-ci-migrate:db-migrate]
aws_api_gateway_integration.lambda_proxy_integrations["auth"]: Refreshing state... [id=agi-btt3bl5139-7tjm3k-ANY]
aws_api_gateway_integration.lambda_proxy_integrations["reports"]: Refreshing state... [id=agi-btt3bl5139-qpfkcg-ANY]
aws_api_gateway_integration.lambda_proxy_integrations["projects"]: Refreshing state... [id=agi-btt3bl5139-zofyad-ANY]
aws_api_gateway_integration.lambda_proxy_integrations["donors"]: Refreshing state... [id=agi-btt3bl5139-37l1nw-ANY]
aws_api_gateway_integration.lambda_proxy_integrations["expenditures"]: Refreshing state... [id=agi-btt3bl5139-2haqg7-ANY]
aws_api_gateway_integration.lambda_proxy_integrations["users"]: Refreshing state... [id=agi-btt3bl5139-0s4etn-ANY]
aws_lambda_permission.api_gateway_permissions["users"]: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_lambda_permission.api_gateway_permissions["auth"]: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_lambda_permission.api_gateway_permissions["donors"]: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_lambda_permission.api_gateway_permissions["expenditures"]: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_lambda_permission.api_gateway_permissions["reports"]: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_lambda_permission.api_gateway_permissions["projects"]: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_api_gateway_integration.lambda_integrations["auth-POST"]: Refreshing state... [id=agi-btt3bl5139-j2bjjp-POST]
aws_api_gateway_integration.lambda_integrations["donors-POST"]: Refreshing state... [id=agi-btt3bl5139-ooaugc-POST]
aws_api_gateway_integration.lambda_integrations["users-GET"]: Refreshing state... [id=agi-btt3bl5139-r6frgh-GET]
aws_api_gateway_integration.lambda_integrations["donors-GET"]: Refreshing state... [id=agi-btt3bl5139-ooaugc-GET]
aws_api_gateway_integration.lambda_integrations["expenditures-PATCH"]: Refreshing state... [id=agi-btt3bl5139-x3f6cx-PATCH]
aws_api_gateway_integration.lambda_integrations["users-DELETE"]: Refreshing state... [id=agi-btt3bl5139-r6frgh-DELETE]
aws_api_gateway_integration.lambda_integrations["users-POST"]: Refreshing state... [id=agi-btt3bl5139-r6frgh-POST]
aws_api_gateway_integration.lambda_integrations["projects-GET"]: Refreshing state... [id=agi-btt3bl5139-5rlpdk-GET]
aws_api_gateway_integration.lambda_integrations["users-PATCH"]: Refreshing state... [id=agi-btt3bl5139-r6frgh-PATCH]
aws_api_gateway_integration.lambda_integrations["projects-POST"]: Refreshing state... [id=agi-btt3bl5139-5rlpdk-POST]
aws_api_gateway_integration.lambda_integrations["expenditures-POST"]: Refreshing state... [id=agi-btt3bl5139-x3f6cx-POST]
aws_api_gateway_integration.lambda_integrations["auth-GET"]: Refreshing state... [id=agi-btt3bl5139-j2bjjp-GET]
aws_api_gateway_integration.lambda_integrations["reports-GET"]: Refreshing state... [id=agi-btt3bl5139-fbius2-GET]
aws_api_gateway_integration.lambda_integrations["expenditures-GET"]: Refreshing state... [id=agi-btt3bl5139-x3f6cx-GET]
aws_api_gateway_integration_response.cors["users"]: Refreshing state... [id=agir-btt3bl5139-r6frgh-OPTIONS-200]
aws_api_gateway_integration_response.cors["auth"]: Refreshing state... [id=agir-btt3bl5139-j2bjjp-OPTIONS-200]
aws_api_gateway_integration_response.cors["auth-proxy"]: Refreshing state... [id=agir-btt3bl5139-7tjm3k-OPTIONS-200]
aws_api_gateway_integration_response.cors["users-proxy"]: Refreshing state... [id=agir-btt3bl5139-0s4etn-OPTIONS-200]
aws_api_gateway_integration_response.cors["donors"]: Refreshing state... [id=agir-btt3bl5139-ooaugc-OPTIONS-200]
aws_api_gateway_integration_response.cors["projects-proxy"]: Refreshing state... [id=agir-btt3bl5139-zofyad-OPTIONS-200]
aws_api_gateway_integration_response.cors["expenditures"]: Refreshing state... [id=agir-btt3bl5139-x3f6cx-OPTIONS-200]
aws_api_gateway_integration_response.cors["expenditures-proxy"]: Refreshing state... [id=agir-btt3bl5139-2haqg7-OPTIONS-200]
aws_api_gateway_integration_response.cors["projects"]: Refreshing state... [id=agir-btt3bl5139-5rlpdk-OPTIONS-200]
aws_api_gateway_integration_response.cors["reports-proxy"]: Refreshing state... [id=agir-btt3bl5139-qpfkcg-OPTIONS-200]
aws_api_gateway_integration_response.cors["reports"]: Refreshing state... [id=agir-btt3bl5139-fbius2-OPTIONS-200]
aws_api_gateway_integration_response.cors["donors-proxy"]: Refreshing state... [id=agir-btt3bl5139-37l1nw-OPTIONS-200]
aws_api_gateway_deployment.branch_deployment: Refreshing state... [id=f4ddhq]
aws_api_gateway_stage.branch_stage: Refreshing state... [id=ags-btt3bl5139-prod]
aws_api_gateway_base_path_mapping.api[0]: Refreshing state... [id=api.branchaccounting.org/]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
+/- create replacement and then destroy

Terraform will perform the following actions:

  # aws_api_gateway_deployment.branch_deployment must be replaced
+/- resource "aws_api_gateway_deployment" "branch_deployment" {
      ~ created_date = "2026-08-30T18:39:13Z" -> (known after apply)
      ~ id           = "f4ddhq" -> (known after apply)
      ~ triggers     = { # forces replacement
          ~ "redeploy" = "7542ba56fe81bd6c1670df6bfd57ba3046c08763" -> "131e666e1b020b84dc026207d7d9ac76833c5174"
        }
        # (3 unchanged attributes hidden)
    }

  # aws_api_gateway_integration.lambda_integrations["reports-POST"] will be created
  + resource "aws_api_gateway_integration" "lambda_integrations" {
      + cache_namespace         = (known after apply)
      + connection_type         = "INTERNET"
      + http_method             = "POST"
      + id                      = (known after apply)
      + integration_http_method = "POST"
      + passthrough_behavior    = (known after apply)
      + region                  = "us-east-2"
      + resource_id             = "fbius2"
      + rest_api_id             = "btt3bl5139"
      + timeout_milliseconds    = 29000
      + type                    = "AWS_PROXY"
      + uri                     = "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:404813129370:function:branch-reports/invocations"
    }

  # aws_api_gateway_method.lambda_methods["reports-POST"] will be created
  + resource "aws_api_gateway_method" "lambda_methods" {
      + api_key_required = false
      + authorization    = "NONE"
      + http_method      = "POST"
      + id               = (known after apply)
      + region           = "us-east-2"
      + resource_id      = "fbius2"
      + rest_api_id      = "btt3bl5139"
    }

  # aws_api_gateway_stage.branch_stage will be updated in-place
  ~ resource "aws_api_gateway_stage" "branch_stage" {
      ~ deployment_id         = "f4ddhq" -> (known after apply)
        id                    = "ags-btt3bl5139-prod"
        tags                  = {}
        # (15 unchanged attributes hidden)
    }

Plan: 3 to add, 1 to change, 1 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "tfplan"

Pushed by: @nourshoreibah, Action: pull_request

@github-actions

Copy link
Copy Markdown
Contributor

Database Types Check Complete

The database schema files were modified, but the regenerated TypeScript types are identical to the existing ones.

No changes were needed and the type definitions are already up to date.

@nourshoreibah nourshoreibah added the no-review The PR review bot won't run label Oct 16, 2026
@nourshoreibah
nourshoreibah marked this pull request as ready for review October 16, 2026 23:00
@nourshoreibah
nourshoreibah merged commit 7e62a4b into main Oct 16, 2026
21 checks passed
@nourshoreibah
nourshoreibah deleted the fix/high-severity-bug-sweep branch October 16, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-review The PR review bot won't run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant