fix(security): replace real AWS account ID with placeholder#1212
fix(security): replace real AWS account ID with placeholder#1212cristim wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 16 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?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 credits. 🚦 How do rate 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 see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 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.
|
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
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. |
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