Repository navigation
sec(test): replace the CUDly host account ID in frontend fixtures with a placeholder - #1557
Conversation
…h a placeholder The approval-details and settings-accounts jest fixtures used the non-placeholder AWS account ID of the CUDly host account (fixtures, the formatAccountLabel assertion and the Service overrides aria-label selector). Swap it for the allowlisted placeholder 444444444444, which neither file already uses, so the two-account fixtures stay distinct. The remaining occurrences, in the ci-cd-permissions Terraform state bucket name, are kept by owner decision D20 recorded on the issue. Closes LeanerCloud#43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): VERDICT: APPROVE Blocking:
Non-blocking:
Attacked:
Body-stale: none Reviewer: rG4. Bar while the maintainers are away (set by IAmJSD as acting owner): one approving independent review on the head, two for money, auth and security paths. |
govulncheck in the Docker image build now fails on these two advisories, both fixed in x/net v0.62.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): VERDICT: APPROVE Blocking:
Non-blocking:
Attacked: The head moved from Body-stale: the body doesn't mention the x/net bump (non-blocking). Reviewer: rG4. Bar while the maintainers are away (set by IAmJSD as acting owner): one approving independent review on the head, two for money, auth and security paths. |
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): VERDICT: APPROVE Blocking:
Non-blocking:
Attacked:
Body-stale:
Reviewer: rH1. Bar while the maintainers are away (set by IAmJSD as acting owner): one approving independent review on the head, two for money, auth and security paths. |
|
Local verification at |
|
Merged by IAmJSD's agent at IAmJSD's request (IAmJSD is acting owner while the maintainers are away), under the bar IAmJSD set: 2 approving independent review(s) on |
Summary
909626172446is the AWS account ID of the CUDly host account, not a placeholder. It was still in two frontend jest files:frontend/src/__tests__/approval-details.test.ts: 7 occurrences, in the host-account argument torenderApprovalDetailsBody, theCUDly host (...)cell assertion and theformatAccountLabelassertion.frontend/src/__tests__/settings-accounts.test.ts: 2 occurrences, in the account fixture and the matchingService overrides for CUDly host (...)aria-label selector.This PR replaces each one with
444444444444. That ID is in the.gitallowedplaceholder set and neither file used it before, so the two-account fixtures still have distinct IDs (the other account is123456789012). The PR only changes test data: no production code or selector logic changes.Remaining occurrences (kept on purpose)
After this change,
git grep 909626172446finds the ID in just three files. All three are in the ci-cd-permissions Terraform state bucket name:terraform/environments/aws/ci-cd-permissions/main.tfterraform/environments/aws/ci-cd-permissions/backend.hcl.exampleterraform/environments/aws/ci-cd-permissions/README.mdOwner decision D20 (recorded on #43) keeps these. The ID is already public in git history, an account ID on its own isn't a credential, and a partial backend config would make the manual bootstrap harder for no real gain. #1292 already replaced the copy in the UX review doc. With this PR, every item in the issue is either fixed or kept by D20, so the PR closes it.
Closes #43
Verification
Unit/fixture evidence only. This PR changes only test data, so there is no behavior to show failing before the fix. The regression check is the grep, and a mutation probe confirms the swapped fixtures still discriminate.
Mutation probe: I changed only the settings-accounts fixture's
external_idto555555555555and left the aria-label selector at444444444444.switching accounts swaps the modal titlethen failed (1 failed), which shows the fixture and selector are still coupled after the swap. I reverted the probe before committing.Combined-tree verification. This branch was tested together with the other queued branches on a local, never-pushed tree:
queue/platform@400d256b= origin/main7b86e386plus these heads, merged in this order:Linux, Go 1.26.9,
AWS_CONFIG_FILE=/dev/null AWS_SHARED_CREDENTIALS_FILE=/dev/null AWS_EC2_METADATA_DISABLED=true; Docker Postgres via testcontainers. The full suite ran onf7c48020, which differs from this tree only by test-only commits on fix/issue-30, fix/issue-713 and fix/issue-263 that replace placeholder account-number literals with named constants:go build ./...,go vet ./...,go vet -tags integration ./...and the fullgo test -race -short -count=1 ./....--build-tags integration.gocyclo -over 10is silent on the changed non-test files.-tags integration -count=1):internal/analytics,internal/api,internal/auth,internal/config,internal/database/postgres/migrations,internal/purchase,internal/schedulerandinternal/serverall pass. Migrations 000149, 000150 and 000151 apply in order on this tree.approval-details,settings-accounts,api) pass (221 tests).accountkey); fixed with named constants. Re-run on this tree: git-secrets, using the repo'sscripts/setup-git-secrets.shpatterns in a fresh repo with an isolated HOME, found nothing in the changed files, and a planted fake key was flagged.scripts/test-git-secrets-allowlist.sh: 183 PASS, 0 FAIL..tftest.hclfiles were not run locally (CI runs them). Nothing was applied to any cloud.Out of scope
Maintainer: please mirror the issue's triage labels onto this PR:
effort/s,impact/internal,priority/p2,severity/medium,triaged,type/security,urgency/this-quarter.🤖 Generated with Claude Code