fix(security): replace real AWS account ID with placeholder - #1212
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughReplaces the real AWS account ID ChangesAccount ID example replacements
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
CI status note: the failing checks on this PR are pre-existing breakage on
PR #1220 tracks the main CI repair. Once it merges, a rebase/re-run here should go green. Independent re-verification on this branch (fresh worktree at
|
9ec1242 to
ce21e93
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
ce21e93 to
805de41
Compare
|
Rebased on current main to clear the migration 074 collision with #1261 (renumbered to 077 on main). Diff unchanged (4 files, +10/-10 string replacements). Local re-verification: Pre-existing main CI failures (Lint CodeRabbit hit a per-developer rate limit on the initial review pass and never produced findings. Re-pinging for a full review now (per project memory rule: always @coderabbitai full review |
|
✏️ Learnings added
✅ Action performedFull review finished. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
805de41 to
5aaeba0
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
bad44ff to
5958381
Compare
|
@coderabbitai review |
|
Merge-prep bot: rebased onto main (73166c2), resolved conflict in internal/email/sender.go (RecommendationSummary struct: kept HEAD's field layout, discarded PR's duplicate Payment/AccountLabel additions). Added fixup commit for gofmt alignment. Real account ID check: grep for 540659244915 in all affected files returned no matches. Gates: build_root=0 vet_email=0 gocyclo=0 lintnew_email=0 test_email=335 fe_test=0. |
✅ Action performedReview finished.
|
The production AWS account ID was committed in four tracked files (a sender.go doc comment, email template test fixtures, frontend settings-accounts test fixtures, and a known_issues UX review doc), violating the .gitallowed policy that only deliberate placeholders may appear in the repo. Replace every occurrence with the allowlisted placeholder 123456789012. No literal-absence regression test is added because such a test would re-embed the very ID it guards against; the git-secrets pre-commit/CI gate remains the enforcement point. The gate hole (bare 12-digit IDs in string labels and comments escape the registered key=value pattern) and the history-scrubbing decision are documented on the tracking issue. Verified: go build ./..., go test ./internal/email/... (335 passed), npx jest settings-accounts.test.ts (80 passed), git grep confirms zero remaining occurrences. Closes #1167
Conflict resolution left the two fields with inconsistent spacing; gofmt -w restores the tab-aligned column layout matching the rest of the struct.
5958381 to
df31f52
Compare
|
Rebased onto origin/main@27fdb06b5 (50 commits ahead of the original branch point). Resolved sender.go cleanly (main's email notification feature added new fields in the struct, the PR's formatting fix applied cleanly on top). Flake-fixed files (validator_test.go, fanout.go, fanout_test.go) now match main exactly. No real 12-digit AWS account IDs remain in target files (only the allowlisted placeholder 123456789012 and pre-existing fictional test IDs). Gates: go build ./... (0), go vet ./... (0), go test ./internal/email/... (0), scheduledauth -count=5 (0), TestFanOut -count=10 (0), gocyclo -over 10 (0), golangci-lint (0). New HEAD: df31f52. |
|
Merged to main on the substantive CI signal (all of Lint Code/Unit/Integration/Security/Build/E2E/Validate-Terraform green; the only red check is the non-blocking tflint/trivy pre-commit infra flake, which this repo's unprotected main does not gate on) closes #1167. replace a real AWS account ID with a placeholder. |
Problem
Closes #1167 (review finding HYG-02, P2).
The real production AWS account ID
540659244915was committed in four tracked files onmain:internal/email/sender.go(doc comment onAccountLabel)internal/email/template_renderers_test.go(fixture + assertions, 3 occurrences)frontend/src/__tests__/settings-accounts.test.ts(fixtures + aria-label selectors, 5 occurrences)known_issues/23_ux_review_2026_04_22.md(UX evidence quote)This violates the repo's own
.gitallowedpolicy, which states that only deliberate placeholders may appear in tracked files and that a real account ID landing in the repo must be treated as a leak, not allowlisted.Fix
Replace every occurrence with the already-allowlisted placeholder
123456789012. Test data shape and assertions are preserved in lockstep (the label still flows through rendering and is asserted in the output), so coverage is unchanged.No literal-absence regression test is added: such a test would have to re-embed the very ID it guards against. The git-secrets pre-commit/CI gate remains the enforcement point; the gate hole and follow-ups are documented on issue #1167:
--register-awsaccount-ID pattern only matches key/assignment shapes (aws_account_id = ...); bare 12-digit IDs in string labels, comments, andexternal_id: '...'fixtures escape it (confirmed by probing the registered patterns:grep -wword-boundary semantics reject matches starting mid-identifier, and label/comment shapes lack the required:/=immediately before the digits)..gitallowednote are owner decisions, left on the issue.909626172446, "CUDly host") exists in 3 tracked files; filed as a separate follow-up issue.Test evidence
go build ./...succeedsgo test ./internal/email/...passes (335 tests)cd frontend && npx jest src/__tests__/settings-accounts.test.tspasses (80 tests)git grep 540659244915returns no matches (exit 1)Summary by CodeRabbit
Tests
Documentation