Repository navigation
fix(integration-platform): attribute AWS check findings to their AWS account (multi-account) - #3065
Merged
Merged
Conversation
…account
Customer connected 3 AWS accounts; the "S3 — default encryption enabled" check
showed 31 buckets with no indication of which account each belongs to, and it
was unclear how the other accounts are covered. Checks already run per
connection (1 AWS account = 1 connection), so all accounts ARE scanned — but the
account was never surfaced in the findings, so the UI shows a merged, unlabeled
list.
All six AWS checks (s3, cloudtrail, ec2, iam, kms, rds) emit through the shared
emitOutcomes(), so stamp the account there in one place: derive the 12-digit
account id from the connection's roleArn (awsAccountIdFromCtx, moved to shared)
and add it to every finding's evidence (awsAccountId) and visible description
("… (AWS account 123456789012)"). No schema/API/UI/migration needed — the
account now shows per result regardless of how the UI groups them, which also
makes it clear all connected accounts are covered.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ongside the account Build on the account-attribution stamp: when the customer named the connection (the "Connection Name" field, e.g. "Production AWS" — stored in credentials and mirrored to connection.metadata), surface that real label too. The finding description becomes "… (AWS account 123456789012 — Production AWS)" and evidence gains awsConnectionName. This is the customer's OWN label — we do not infer prod/stage from AWS (no reliable signal); falls back to the account id alone when no name is set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
🎉 This PR is included in version 3.74.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Jun 9, 2026
claudfuen
pushed a commit
that referenced
this pull request
Jun 11, 2026
# [3.78.0](v3.77.0...v3.78.0) (2026-06-11) ### Bug Fixes * guard optimistic state sync and align picker page cap (cubic on [#3095](#3095)) ([c39011f](c39011f)) * **integration-platform:** isolate per-subscription wildcard scan + graceful subscription picker ([62fd692](62fd692)) * **integration-platform:** make multi-subscription scanning strictly opt-in ([c1bce47](c1bce47)) * **integration-platform:** stamp account attribution on account-level AWS findings ([1493c5c](1493c5c)), closes [#3086](#3086) [#3065](#3065) * **integration-platform:** surface real read errors in azure/gcp checks (CS-534 part 1) ([91135b2](91135b2)) * **integration-platform:** surface real read errors in cloudtrail/kms/iam/ec2/rds checks (CS-533) ([5d7e2a0](5d7e2a0)), closes [#3075](#3075) * **integration-platform:** surface the subscription scan cap as an explicit finding ([e6dda8c](e6dda8c)) * **integrations:** gate the Add-account CTA on integration:create RBAC ([6c35625](6c35625)) * resolve cubic findings from the production deploy review ([#3087](#3087)) ([9f30138](9f30138)) * **trust-portal:** resync custom-framework state + mark response fields nullable ([ec5ba44](ec5ba44)) * **trust-portal:** validate allowed-emails body with a DTO ([06ed9bd](06ed9bd)) * **trust:** gate certificate drag-and-drop behind the read-only permission ([086bf7c](086bf7c)) * **trust:** reset the certificate file input on every selection, not only success ([7d51e2c](7d51e2c)) * **trust:** resolve 4 cubic findings from the production deploy review ([c2b9122](c2b9122)) * **trust:** return 400 not 500 on malformed PUT /custom-frameworks body ([bb30749](bb30749)) ### Features * **integration-platform:** scan all enabled Azure subscriptions (CS-534 part 2) ([9912b9a](9912b9a)) * **trust-portal:** add per-email NDA-bypass allowlist ([3e3ed70](3e3ed70)) * **trust-portal:** display custom frameworks on the trust portal ([e9ed93d](e9ed93d))
eshan-singh78
pushed a commit
to eshan-singh78/comp-es
that referenced
this pull request
Jun 25, 2026
… AWS findings Cubic flagged on PR trycompai#3086 that the new iam.ts password-policy finding bypasses the shared attribution path — in a multi-account org the merged task panel shows it with no way to tell which AWS account it belongs to. The same gap existed in every account-level direct ctx.fail finding: could-not-assume-role (shared.ts), the S3/EC2/RDS/ KMS/CloudTrail aggregate could-not-verify findings, and both iam.ts findings. Route all 9 sites through emitOutcomes, which stamps awsAccountId + awsConnectionName into evidence and appends the account label to the description (same as every per-resource finding since PR trycompai#3065). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Customer report (Dustin)
On the "S3 — default encryption enabled" evidence check he sees 31 buckets passing but with no indication of which of his 3 AWS accounts each belongs to, and it's unclear how the other accounts are covered.
Root cause (verified)
s3.tsalready derived the account id (accountIdFromCtx→roleArn) for its own logic, yet evidence was just{bucket, encrypted}. The UI groups by check and shows no account → a merged, unlabeled list. So "which instance?" and "how do I add it for another instance?" are really one gap: no per-account attribution.Fix
All six AWS checks (s3, cloudtrail, ec2, iam, kms, rds) emit through the shared
emitOutcomes(), so I stamp the account there in one place:awsAccountIdFromCtx()(moved toshared.ts, exported) derives the 12-digit account id from the connection'sroleArn.evidence.awsAccountIdand the account appended to the visible description:… (AWS account 123456789012).So each result shows its account regardless of how the UI groups them, which also makes it clear all connected accounts are covered. No schema/API/UI change or migration. Key-auth connections (no role ARN) are left unattributed gracefully.
Tests
aws-checks.test.ts(bun):awsAccountIdFromCtxextraction + malformed/missing → null;emitOutcomesstamps account into evidence + description on pass and fail, preserves original evidence, and leaves findings unattributed when there's no role ARN. 41 pass; package builds + typechecks clean.Caveats / notes
emitOutcomes). The rare directctx.fail()error paths (e.g. "Could not assume AWS role", "Could not verify S3 encryption") are not stamped — edge cases, can follow up if needed.🤖 Generated with Claude Code
Summary by cubic
Fixes multi-account AWS check findings by attributing each result to its AWS account, and shows the customer's connection name when set. Adds the account ID (and connection name) to evidence and descriptions so users can see which account each resource belongs to, with no schema or UI changes.
awsAccountIdFromCtx()(fromroleArn) and used across all AWS checks.emitOutcomes()stampsawsAccountIdand optionalawsConnectionNameinto evidence and appends "(AWS account … — name)" to pass/fail descriptions.roleArn.Written for commit 69c84c8. Summary will update on new commits.