✓ Human-authored analysis; AI used for formatting and proofreading.
A security team runs Prowler on every account in their AWS Organization. Each account produces a report. Each report shows findings for that account's resources. The team aggregates findings by severity across accounts and calls the result organizational posture.
That aggregation is meaningless. It tells you each room in the building has a working smoke detector. It doesn't tell you whether the fire doors between rooms are locked.
Cross-account security isn't the sum of per-account security. It's a separate set of invariants that must hold across account boundaries. Per-account tools cannot even express most of these invariants, because the properties they need to check span resources owned by different accounts.
This article names the invariants, groups them by failure mode, and shows how to verify each one from configuration snapshots without running code in any account.
The problem of bridging the gap
AWS designed multi-account architecture to provide blast-radius isolation. An attacker who compromises Account A should not be able to reach Account B. That isolation depends on invariants at the boundary: trust policies, resource policies, cross-account sharing grants, organization-level governance, and centralized logging.
Every one of these is a configuration property. Every one can be checked from a snapshot. And every one is invisible to a tool that looks at one account at a time.
The failure mode is always the same: a per-account scanner reports no findings for Account A and no findings for Account B, while the bridge between them is wide open.
Invariant Class 1: Audit trail integrity across accounts
An attacker compromises a member account, stops CloudTrail logging in that account, deletes their traces, and resumes logging. The security team never sees the gap because the central log archive either doesn't exist or doesn't cover this account.
The invariants:
- Every trail is an organization trail, or centralized replication exists
- Trail destination bucket is in a different account than the trail
- Member accounts cannot stop their own organization trail
- Log files have WORM protection (Object Lock + MFA Delete + deny-delete policy)
Single check is insufficient. A trail can exist (check passes), be an org trail (check passes), and write to a bucket in the same account it monitors (check passes on the trail, fails on the organizational invariant). The invariant is a conjunction across accounts.
In Stave, this is the cloudtrail_cross_account_gap chain with four controls, threshold 2-of-4. When any two of the cross-account aggregation gaps coexist, the audit trail is structurally compromisable.
id: cloudtrail_cross_account_gap controls: - CTL.CLOUDTRAIL.ORG.001 - CTL.CLOUDTRAIL.CENTRAL.SAMEACCOUNT.001 - CTL.CLOUDTRAIL.ORG.MEMBERCANSTOP.001 - CTL.CLOUDTRAIL.REPLICATION.001 escalation_threshold: 2 compound_severity: high postconditions: - audit_trail_destroyed The individual controls fire independently. The chain fires when the compound condition holds. The 2-of-4 threshold means partial centralization (org trail exists but in the same account, or org trail exists but members can stop it) still triggers. The invariant is: centralization is present, not just nominally configured.
Invariant Class 2: Cross-account trust without compensating controls
A developer in Account A needs to assume a role in Account B. The trust policy says "Principal": {"AWS": "arn:aws:iam::111111111111:root"} which is the entire Account A. No ExternalId or MFA condition. Now every principal in Account A can assume that role. An attacker who steals a developer's access key in Account A gets high-privilege access in Account B with no second factor.
The invariants:
- Cross-account trust policies require ExternalId or source conditions
- IAM users in the trusting account all have MFA enabled
- The role's permissions follow least privilege (not
*:*)
Again, a conjunction. Missing ExternalId alone is documented bad practice. Missing MFA alone is documented bad practice. But together they form a complete attack chain: leaked key in Account A becomes unchallenged role assumption in Account B.
id: iam_cross_account_unscoped_assume controls: - CTL.IAM.IDENTITY.BLASTRADIUS.002 - CTL.IAM.CONSOLE.MFA.001 escalation_threshold: 2 compound_severity: critical postconditions: - cross_account_injection The severity escalation from the individual controls (each high) to the chain (critical) reflects the compound risk. Neither control alone describes cross-account compromise. Together they describe a complete path.
Invariant Class 3: The confused deputy
A SaaS vendor asks you to create an IAM role they can assume from their account. You set the trust policy to allow their account ID. They told you to add an ExternalId, but you forgot, or you used a guessable value. Another customer of the same vendor, or an attacker, can now assume your role by calling sts:AssumeRole with your role ARN. They don't even need to know your account ID; role ARNs are guessable.
The invariants:
- Cross-account roles have a trust policy with an ExternalId condition
- The ExternalId is not a default or guessable value
- The role's permissions are scoped to what the vendor actually needs
- CloudTrail records AssumeRole events so unauthorized assumptions are visible
id: confused_deputy_path controls: - CTL.IAM.TRUST.EXTERNALID.001 - CTL.IAM.TRUST.CONFUSEDDEPUTY.001 - CTL.CLOUDTRAIL.ENABLED.001 escalation_threshold: 2 compound_severity: high The confused deputy is a cross-account problem by definition. It only exists when Account A trusts Account B. A per-account scanner can check "does this role have an ExternalId?" but cannot determine whether the ExternalId is cryptographically random (a property of how the trust was established, not of the current configuration) or whether the role's permissions are proportional to the vendor's needs (a property of the relationship).
Invariant Class 4: Key material shared across accounts
A KMS key is shared with 12 accounts for cross-account encryption. Three of those accounts were decommissioned last year and no longer exist in the organization. The key policy still references them. The account IDs could be reassigned. An attacker who acquires a recycled account ID inherits the key grants from the original account.
The invariants:
- Cross-account KMS grants reference only active accounts
- The number of sharing accounts is bounded (blast radius)
- Cross-account access has conditions (encryption context, VIA service)
id: kms_crossaccount_risk controls: - CTL.KMS.CROSSACCOUNT.BLASTRADIUS.001 - CTL.KMS.CROSSACCOUNT.DECOMMISSIONED.001 - CTL.KMS.POLICY.CROSSACCOUNT.001 escalation_threshold: 2 compound_severity: high The decommissioned-account check is the one that per-account tools structurally miss. The key lives in Account A. The stale reference points to Account X, which no longer exists. Account A's scanner sees the key and its policy but has no way to know whether Account X still exists. That's an organization-level fact. The invariant requires correlating the key policy with the organization's account inventory.
Invariant Class 5: Centralized governance controls
The security team believes SCPs prevent member accounts from disabling GuardDuty, stopping CloudTrail, or deleting VPC Flow Logs. The SCP exists but is attached to the wrong OU. Or it exists and is attached correctly but has a condition that exempts the account's admin role. Or it exists, is attached, has no exemption. But the member account created a second trail and stopped the first one, which the SCP doesn't cover.
The invariants:
- Organization trail exists and is governed by the management account
- Member accounts cannot stop organization-level trails
- SCPs deny destructive security actions across all member accounts
- The SCP coverage matches the actual OU structure
These are organization-level invariants. A member account's scanner cannot see SCPs. It cannot see OU membership. It cannot verify that a governance control covers it. It can only see the resources in its own account and infer incorrectly that the absence of findings means the presence of governance.
Why chains, not individual checks
The pattern across all five classes is the same. No individual control captures the cross-account invariant. The invariant is always a conjunction: condition A in Account X AND condition B in Account Y AND condition C at the organization level must all hold simultaneously.
A scanner that reports findings per-resource gives you: finding for the KMS key (overbroad policy), finding for the IAM role (missing ExternalId), finding for the trail (same-account bucket). Three findings in three accounts. The security team triages them independently. Nobody sees the compound path because the compound path isn't a finding. It's an invariant that spans the three findings.
Stave's chain engine addresses this directly. A chain is a named set of controls with a threshold. It fires when the threshold count of controls have findings on the same logical resource group. The chain carries its own severity (always equal to or higher than the individual controls), its own preconditions (what must be true for the chain to be meaningful), and its own postconditions (what the attacker achieves if the chain holds).
The chain is the invariant. The controls are the detection. The threshold is the tolerance.
The verification model
All of this operates on configuration snapshots, not live API calls. The verification sequence:
- Collect configuration from each account (CloudTrail
DescribeTrails, IAMGetAccountAuthorizationDetails, KMSListKeys+GetKeyPolicy, OrganizationsListAccounts) - Normalize into observations (
obs.v0.1schema — timestamped property maps per resource) - Evaluate controls (CEL predicates over properties — boolean per resource)
- Evaluate chains (threshold over control findings — boolean per resource group)
Steps 3 and 4 are deterministic. Given the same snapshot, they produce the same findings. Given the same findings, they produce the same chains. No runtime access to any account is needed. No credentials beyond "read your own configuration" are consumed. The verification is air-gapped, reproducible, and auditable.
The count today: 312 controls that reason across account boundaries. 73 chains that combine them into compound invariants. Together they cover audit trail integrity, cross-account trust, confused deputy, key material sharing, centralized governance, backup isolation, resource sharing (RAM, S3, SNS, SQS, EBS, RDS, KMS, Secrets Manager), federation trust, and organization-level service configurations.
Per-Account Coverage vs Organizational Coverage
If your security program evaluates accounts individually and aggregates the results, you have per-account coverage. You do not have organizational coverage. The fire doors are unchecked.
The minimum viable cross-account invariant set is:
- Audit trail: centralized, immutable, cross-account, un-stoppable by member accounts
- Trust boundaries: all cross-account roles scoped, conditioned, MFA-gated
- Shared resources: all cross-account grants reference active accounts, bounded blast radius, conditioned access
- Governance: SCP coverage matches OU structure, no member-account override paths
These are configuration properties. They don't require behavioral detection, ML or an agent running in each account. They require a snapshot of the configuration and a set of predicates that say what must be true.
The predicates are the specification. The snapshot is the evidence. The evaluation is the proof. Everything else is commentary.
Stave is an open-source configuration verifier that evaluates these invariants from snapshots. The chain definitions shown in this article are from the production catalog.