EventBridge Bus Policy Auditor
Mindset
One-line takeaway: the verdict is always the worst finding across
all dimensions, and events:PutEvents is the EventBridge analogue of
kms:Decrypt — one permission grants injection access to every rule and
downstream target on the bus.
An EventBridge event bus is the ingestion gate for event-driven
automation. Three properties make it uniquely dangerous when
misconfigured:
events:PutEvents is an event-injection vector: one permission
lets an attacker craft events that match rule patterns and trigger
Lambda, Step Functions, SQS, ECS, and API-destination targets. The
blast radius extends through every rule on the bus.
- Missing
DeadLetterConfig is a silent data-loss vector: failed
invocations exhaust retries (6 hours for Lambda/SQS, 24 hours for API
destinations) then disappear permanently — no DLQ, no trace.
- The bus policy is ingestion-gate only; rule event-patterns are
the routing-gate. Both planes must be audited. A locked-down bus
policy with a permissive event pattern still routes any ingested event.
Quick reference — verdict thresholds
| Condition |
Verdict |
Step |
Principal: "*" + events:PutEvents/events:*/* + no/weak condition |
PUBLIC_BUS |
Step 5a |
Cross-account + events:PutEvents + no/weak condition |
PUBLIC_BUS |
Step 5b |
Principal: "*" + events:PutRule/events:PutPermission + no/weak condition |
PUBLIC_BUS |
Step 5c |
Any rule target missing DeadLetterConfig |
NO_DLQ |
Step 6 |
KmsKeyIdentifier absent on custom bus |
NO_ENCRYPTION |
Step 7 |
| No archive configured on the bus |
CONFIG_GAP |
Step 8 |
| Scoped principals + STRONG condition + DLQ + CMK + archive |
OK |
Step 9 |
Principal: "*" + PutEvents + STRONG condition (aws:PrincipalOrgID, aws:SourceAccount) |
OK on policy dimension (condition-scoped, not public) |
Step 5d |
Severity ordering for aggregation: **PUBLIC_BUS > NO_DLQ > NO_ENCRYPTION
CONFIG_GAP > OK**.
Pre-flight: bus metadata gate
Before evaluating the policy, classify the bus itself. Several attributes
short-circuit the audit.
| Attribute |
Value |
Effect |
Name |
default |
Default event bus. Receives all AWS service events (CloudWatch, EC2, GuardDuty, Security Hub) by default. Restricting its policy may break service event delivery. Do NOT flag same-account service-principal statements on the default bus. Still audit DLQ, encryption, and archive dimensions. |
Name |
(custom) |
Proceed with full audit. Custom buses are where restrictive policies apply. |
KmsKeyIdentifier |
(absent) |
Bus uses an AWS-owned key (not even AWS-managed — invisible to your KMS console, no rotation control, no CloudTrail data-event logging). This is the NO_ENCRYPTION finding (Step 7). |
KmsKeyIdentifier |
arn:aws:kms:... |
Customer-managed key configured. Encryption dimension passes. |
Multi-bus / account-wide sweep note (pagination): aws events list-event-buses returns at most 100 per page. aws events list-rules
returns at most 100 per page per bus. aws events list-targets-by-rule
returns at most 50 per page. All three silently truncate — always drain
NextToken to completion. A bus with 120 rules silently drops 20 from
the first page.
If the bus policy JSON is malformed (invalid JSON, missing
Statement, missing Principal or Action), output:
BUS: <bus-name>
VERDICT: ERROR
REASON: Bus policy document is not valid JSON or is missing required fields — cannot classify.
REMEDIATION: Retrieve the canonical policy with `aws events describe-event-bus --name <bus> --output json` and re-audit.
Process — Classification logic (apply in order, aggregate worst)
Step 0: Expert knowledge — non-obvious EventBridge behaviors
Step 0 expert-knowledge bullets (PutEvents blast radius, ingestion vs routing gate, invalid condition keys, same-account implicit access, service principals, DLQ per-target, retry windows, KmsKeyIdentifier, replay semantics, 8 KiB policy limit, aws:PrincipalOrgID, predictable ARNs, PutEvents volume, API-destination credential expiry) moved verbatim to references/advanced-patterns.md.
Load on demand a classification depends on a non-obvious behaviour.
Step 1: Bus type classification
If the bus is the default bus (Name: default):
- Do NOT flag same-account
Principal: {"Service": "..."} statements —
AWS services must publish to the default bus for built-in integrations.
- Still evaluate DLQ, encryption, and archive dimensions normally.
- Flag
Principal: {"AWS": "*"} + PutEvents on the default bus as
PUBLIC_BUS — anyone can inject into the bus that receives all AWS
service events, compounding the injection surface.
If the bus is a custom bus, proceed with full policy audit.
Step 2: Principal scope classification
For each Effect: Allow statement in the bus policy:
WILDCARD_PRINCIPAL — Principal is "*", {"AWS": "*"}, or any
construct resolving to all AWS principals.
CROSS_ACCOUNT — Principal includes an ARN whose 12-digit account
differs from the bus's owning account.
SERVICE_PRINCIPAL — Principal is {"Service": "<service-id>"}.
This is NORMAL for AWS service-to-bus integration. Do NOT flag as
public unless the service principal is paired with dangerous admin
actions (PutRule, PutPermission) without conditions.
SAME_ACCOUNT — All principals share the bus's owning account.
This includes root (arn:aws:iam::ACCOUNT:root) and same-account
roles/users.
A statement with BOTH same-account and cross-account/wildcard principals
is classified by the widest scope.
Step 3: Action danger classification
| Danger level |
Actions |
Why |
| INJECT |
events:PutEvents, events:*, * |
Event injection — can trigger every rule and downstream target. Blast-radius multiplier. |
| ADMIN |
events:PutRule, events:DeleteRule, events:PutTargets, events:RemoveTargets, events:PutPermission, events:RemovePermission, events:DisableRule, events:EnableRule, events:UpdateArchive |
Can modify bus configuration, inject new rules, revoke existing rules, or change the policy. |
| READ |
events:List*, events:Describe*, events:TestEventPattern |
Metadata disclosure — enumerates rules, targets, and bus configuration. |
NotAction in an Allow is an inverse wildcard — grants every EventBridge
action EXCEPT the listed ones. Treat as INJECT + ADMIN (worst case).
Step 4: Condition strength evaluation
STRONG conditions (policy dimension passes — condition-scoped, not public):
aws:PrincipalOrgID with StringEquals — scopes to all accounts in
the named Organization. The strongest multi-account condition.
aws:SourceAccount with StringEquals — request must originate from
the named account.
aws:SourceArn with StringEquals/StringLike — request must
originate from the named resource.
aws:PrincipalAccount — equivalent to SourceAccount.
WEAK conditions (do NOT pass — treat as no condition, still PUBLIC_BUS):
aws:SourceIp — IP-based restrictions are bypassable by callers who
control their egress (NAT gateway, proxy, VPN). Quantitative
prefix-length threshold: a CIDR with /0 suffix (0.0.0.0/0,
::/0) covers the entire internet — equivalent to no condition. /8
or broader (16M+ addresses) is effectively unrestricted. Only /28
or narrower (16 or fewer addresses) provides operationally meaningful
scoping. Between /8 and /28, evaluate whether the CIDR covers
known NAT, proxy, or cloud-egress ranges.
aws:Referer, aws:UserAgent — trivially forgeable.
events:source, events:detail-type — NOT valid condition keys;
silently ignored by IAM evaluation.
Step 5: Policy severity matrix — PUBLIC_BUS determination
Evaluate each Allow statement by combining principal scope (Step 2),
action danger (Step 3), and condition strength (Step 4):
| Rule |
Principal |
Action |
Condition |
→ PUBLIC_BUS? |
| 5a |
WILDCARD |
INJECT |
None/weak |
Yes — PUBLIC_BUS (anyone can inject events) |
| 5b |
CROSS_ACCOUNT |
INJECT |
None/weak |
Yes — PUBLIC_BUS (external account can inject) |
| 5c |
WILDCARD or CROSS |
ADMIN |
None/weak |
Yes — PUBLIC_BUS (external principal can inject/modify rules) |
| 5d |
WILDCARD or CROSS |
INJECT/ADMIN |
STRONG |
No — OK on policy dimension (condition-scoped, not public) |
| 5e |
WILDCARD or CROSS |
READ |
Any |
No — metadata-only exposure (note as low-severity finding) |
| 5f |
SERVICE_PRINCIPAL |
INJECT |
None |
No — normal service integration (Step 1) |
| 5g |
SAME_ACCOUNT |
Any |
Any |
No — implicit access; IAM is the second gate |
CRITICAL CLASSIFICATION RULE — Step 5d: A Principal: "*" or
cross-account grant with events:PutEvents and a STRONG condition
(aws:PrincipalOrgID, aws:SourceAccount, aws:SourceArn) is
NOT PUBLIC_BUS. The condition scopes access to a known organization
or account. Classify the policy dimension as OK and note the
condition-restricted access in FINDINGS for verification. Do NOT
conflate "cross-account" with "public" — a condition-restricted
cross-account grant is a controlled delegation, not an open injection
vector. This is the single most common classification error.
| 5e | WILDCARD or CROSS | READ | Any | No — metadata-only exposure (note as low-severity finding) |
| 5f | SERVICE_PRINCIPAL | INJECT | None | No — normal service integration (Step 1) |
| 5g | SAME_ACCOUNT | Any | Any | No — implicit access; IAM is the second gate |
If any statement matches 5a/5b/5c, the PUBLIC_BUS verdict is emitted
for the policy dimension.
Special case — the account-root statement: A statement with
Principal: {"AWS": "arn:aws:iam::ACCOUNT:root"} + events:* is the
default root-delegation pattern. It delegates bus management to the
account's IAM policies. This is NORMAL — do NOT flag it. Same-account
PutEvents does not require the bus policy (implicit root access).
Step 6: Dead-letter queue evaluation
For each rule on the bus, enumerate ALL targets via
list-targets-by-rule. For each target, check DeadLetterConfig:
DeadLetterConfig absent on ANY target → NO_DLQ finding for that
target. Failed invocations exhaust retries (6h Lambda/SQS/SNS/ECS/SFN,
up to 24h API destinations) then are permanently lost — no DLQ, no
trace. This is a silent data-loss vector.
DeadLetterConfig present (SQS ARN) → target passes the DLQ check.
Verify the SQS queue exists and has a retention period long enough for
operational response (>= 4 days recommended).
A bus with multiple rules where ALL targets have DLQs passes this step.
A single target without DLQ is enough for the NO_DLQ finding.
Quota note: A rule can have up to 5 targets. Each target needs its
own DLQ ARN — sharing one SQS queue across targets is acceptable but
complicates triage (all failures land in one queue).
Step 7: KMS encryption evaluation
Check KmsKeyIdentifier on the bus metadata:
KmsKeyIdentifier absent → NO_ENCRYPTION finding. The bus uses
an AWS-owned key — invisible in your KMS console, no rotation control,
no key policy control, no CloudTrail data-event logging on decrypt.
A customer-managed key gives rotation control, key-policy control, and
decrypt-audit capability.
KmsKeyIdentifier set to a CMK ARN → encryption dimension passes.
Verify the referenced CMK exists, is enabled, and has rotation enabled
(cross-reference to kms-key-policy-auditor for the key policy audit).
Step 8: Archive and enrichment evaluation
Check archive and schema-discovery status:
No archive configured → CONFIG_GAP finding. Without an archive,
there is no event-replay capability for incident recovery. Archives
capture events matching a pattern for a configurable retention period.
Recommend CreateArchive with a broad event pattern.
Archive present → passes. Note the retention period and event
pattern coverage (a narrow pattern may miss events you need to replay).
Schema discovery disabled → note as a low-priority CONFIG_GAP
sub-finding. Without schema discovery, you lose automated schema
inference and code-generation benefits. Enable via
UpdateEventBus with schema-discovery on.
Step 9: Aggregation — worst finding wins
The final verdict is the maximum severity across all dimensions,
where PUBLIC_BUS > NO_DLQ > NO_ENCRYPTION > CONFIG_GAP > OK:
verdict = max(policy_finding, dlq_finding, encryption_finding, archive_finding)
If no findings across all dimensions, the verdict is OK.
Output format (per bus)
BUS: <bus-name or ARN>
VERDICT: PUBLIC_BUS | NO_DLQ | NO_ENCRYPTION | CONFIG_GAP | OK
REASON: <1-2 sentences citing the worst finding and its step>
FINDINGS:
- [PUBLIC_BUS] <finding description (Step Na)>
- [NO_DLQ] <finding description (Step N)>
- [OK] <dimension that passed>
REMEDIATION: <specific action per finding, or "None required" if OK>
Worked example — public bus with missing DLQ
BUS: custom-bus-app-events
VERDICT: PUBLIC_BUS
REASON: Statement "OpenIngest" grants events:PutEvents to Principal "*"
with no restrictive condition — any AWS account holder can inject events
that trigger all rules on the bus (Step 5a). Rule "alert-rule" target
"lambda-handler" is also missing a dead-letter queue.
FINDINGS:
- [PUBLIC_BUS] Principal "*" + events:PutEvents + no condition (Step 5a)
- [NO_DLQ] Rule "alert-rule" target "lambda-handler" has no DeadLetterConfig (Step 6)
- [NO_ENCRYPTION] KmsKeyIdentifier absent — bus uses AWS-owned key (Step 7)
- [CONFIG_GAP] No archive configured — no replay capability (Step 8)
REMEDIATION:
1. PUBLIC_BUS — Replace Principal "*" with specific account/role ARNs.
Add aws:PrincipalOrgID or aws:SourceAccount condition to scope access.
2. NO_DLQ — Create an SQS DLQ and attach to each target:
aws events put-targets --rule alert-rule --event-bus-name custom-bus-app-events
--targets '[{"Id":"lambda-handler","Arn":"...","DeadLetterConfig":{"Arn":"arn:aws:sqs:...:dlq"}}]'
3. NO_ENCRYPTION — Associate a customer-managed KMS key:
aws events update-event-bus --name custom-bus-app-events
--kms-key-identifier arn:aws:kms:us-east-1:111111111111:key/cmk-id
4. CONFIG_GAP — Create an archive:
aws events create-archive --archive-name app-events-archive
--event-source-name custom-bus-app-events --retention 30
Anti-Patterns — NEVER
NEVER classify Principal: {"AWS": "arn:aws:iam::ACCOUNT:root"} +
events:* as a vulnerability. This is the default root-delegation
statement. Same-account access does not require the bus policy — the
root has implicit access. Flagging it as WILDCARD is a false positive.
NEVER flag Principal: {"Service": "guardduty.amazonaws.com"} or any
AWS service principal with events:PutEvents as public exposure on
the default bus. AWS services must publish to the default bus for
built-in integrations. This is normal service-to-bus delivery.
NEVER treat events:source or detail-type as IAM condition keys in a
bus policy. They are event-body fields — a bus policy condition using
them is a silent no-op and provides zero restriction. Only
aws:SourceAccount, aws:SourceArn, aws:PrincipalAccount, and
aws:PrincipalOrgID are valid.
NEVER classify a Principal: "*" + events:PutEvents grant with a
STRONG condition (aws:PrincipalOrgID, aws:SourceAccount) as
PUBLIC_BUS. The condition narrows access to a known org/account.
Classify as OK on the policy dimension — note the condition-restricted
access in FINDINGS for verification.
NEVER treat aws:SourceIp with 0.0.0.0/0 as a real condition. This
CIDR is the entire internet and provides zero restriction. Treat the
statement as if the condition is absent — PUBLIC_BUS.
NEVER assume one DLQ per rule is sufficient. DeadLetterConfig is
per-TARGET — a rule with 5 targets needs 5 DLQ ARNs. Missing DLQ on
any single target is a silent data-loss vector for that target.
NEVER assume the bus policy is the complete access picture for
cross-account. Cross-account PutEvents requires BOTH the bus policy
AND the caller's IAM to allow it (intersection). But always flag the
bus-policy grant — the resource owner controls this gate.
NEVER recommend restricting the default bus policy without
explaining that it may break AWS service event delivery. CloudWatch
Alarms, GuardDuty, Security Hub, EC2, and dozens of other services
publish to the default bus. Use custom buses for restrictive policies.
NEVER overlook a rule with zero targets. A rule with no targets
consumes event-matching capacity (300 rules per bus quota) but
triggers nothing — it is dead configuration. Flag as CONFIG_GAP.
NEVER assume archive and schema discovery are enabled by default.
Archives require explicit CreateArchive. Schema discovery requires
explicit enablement. Both are absent on a freshly created bus.
NEVER set archive retention > 90 days without a cost justification.
Archive events are billed per-event-month — a high-volume bus
(1M events/day) at 90 days costs ~9x more than the recommended 7-30
day operational window. Use longer retention only for compliance
requirements and budget-alert the archive.
NEVER use put-permission with a duplicate --statement-id. The
statement-id uniquely identifies the permission entry; reusing an
existing id silently overwrites the prior statement. Always use
unique, descriptive statement-ids (e.g., CrossAccountAppPublisher,
not Allow1).
NEVER attempt to modify the default bus policy to remediate
cross-account access without first verifying which AWS service
integrations depend on it. Breaking service event delivery is an
active outage.
NEVER assume Resource: "*" in a bus policy is broader than
Resource: <bus-arn>. The policy is attached to the bus — both are
functionally identical. Evaluate Principal + Action + Condition
only.
Pre-flight safety checks (run before any remediation CLI)
MANDATORY CONFIRMATION GATE. Before any state-changing operation
(PutPermission, RemovePermission, PutTargets, UpdateEventBus,
PutRule, DeleteRule), the auditor MUST emit:
CONFIRM: About to <action> on bus <name> in account <account>. This affects <consequence>. Proceed? (yes/no)
Do NOT execute the CLI command until the operator confirms.
Back up the current bus policy before any modification:
aws events describe-event-bus --name <bus> --profile <p> --output json > /tmp/<bus>-policy-backup-$(date +%s).json
Bus policies have no version history — put-permission replaces the
entire policy atomically. The backup is the only rollback path.
Before removing a cross-account principal from the bus policy, verify
the external account's workload is not actively publishing events.
Check CloudTrail for events:PutEvents from the external account in
the last 7 days. Removing access without coordination causes an
immediate event-delivery outage for the external publisher.
Before associating a KMS key (UpdateEventBus --kms-key-identifier),
verify the key policy permits events.amazonaws.com as a service
principal with kms:Decrypt and kms:GenerateDataKey*. A key that
does not allow EventBridge will cause PutEvents to fail silently.
Prefer additive changes (add a Deny statement, add a condition) over
destructive changes (remove a statement) — additive changes are
reversible.
For PUBLIC_BUS findings (wildcard/cross-account PutEvents), treat as
incident-response. Audit CloudTrail for events:PutEvents from
unexpected principals during the exposure window. Identify rules that
could have been triggered by injected events and check downstream
targets for anomalous invocations.
Remediation guidance
Remediation CLI per verdict (PUBLIC_BUS put/remove-permission, NO_DLQ create-queue + put-targets + alarm, NO_ENCRYPTION update-event-bus, CONFIG_GAP create-archive + create-registry, OK) moved verbatim to references/diagnostic-commands.md.
Load on demand emitting the remediation commands for a finding.
Recent AWS features (2024-2026)
Recent AWS features (global endpoints GA, Scheduler, Schema Registry, cross-account enhancements) moved verbatim to references/advanced-patterns.md.
Load on demand checking whether a newer AWS feature changes the audit.
References (load on demand)
- references/diagnostic-commands.md — remediation CLI per verdict (PUBLIC_BUS, NO_DLQ, NO_ENCRYPTION, CONFIG_GAP, OK), moved from SKILL.md.
- references/advanced-patterns.md — Step 0 expert-knowledge bullets and recent AWS features, moved from SKILL.md.
Domain
AWS CloudOps / EventBridge Security & App Integration.
AWS documentation
1---2name: eventbridge-bus-policy-auditor3description: Audits AWS EventBridge event buses for public event-injection exposure (Principal:* or cross-account with events:PutEvents and no strong condition), missing dead-letter queues on rule targets, absent customer-managed KMS encryption, and archive/enrichment gaps. Emits a deterministic verdict (PUBLIC_BUS | NO_DLQ | NO_ENCRYPTION | CONFIG_GAP | OK) per bus with enumerated findings and specific remediation. Use when reviewing EventBridge bus policies, checking for public event injection, validating DLQ coverage on rules, auditing KMS encryption posture, or hardening event-bus security before production deployment.4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline policy-document classification. Live-account audits use aws events describe-event-bus, aws events list-rules, aws events list-targets-by-rule, aws events list-archives, and aws events describe-rule (AWS CLI v2, SSO or key-based credentials).6metadata:7 source: https://skillmd.com/skills/jhkchan/eventbridge-bus-policy-auditor8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '2'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: DevTools15 verdict_shape: PUBLIC_BUS | NO_DLQ | NO_ENCRYPTION | CONFIG_GAP | OK16 when_to_use: Reviewing an EventBridge event bus policy before production deployment, checking for public or cross-account event injection, validating DLQ coverage on rule targets, auditing KMS encryption posture, inspecting archive or schema-discovery configuration, or hardening event-bus security across an account.17 activation_triggers: audit this event bridge bus, is my event bus public, check eventbridge bus policy, event injection risk, missing DLQ on rule, is event bridge encrypted, event bus cross-account, Principal star eventbridge, dead-letter queue check, event bridge archive gap18 invocation_schema: 'Input: either (a) an event bus policy JSON document, optionally paired with bus metadata (KmsKeyIdentifier), rule/target configs, and archive status, OR (b) a bus name/ARN for live-account audit. Output: deterministic BUS/VERDICT/REASON/FINDINGS/REMEDIATION block per bus, where VERDICT is one of PUBLIC_BUS, NO_DLQ, NO_ENCRYPTION, CONFIG_GAP, OK.'19 version: 0.1.020 author: Jacky Chan — AWS Community Builder21 keywords: EventBridge, event bus, bus policy, events:PutEvents, event injection, cross-account, wildcard permissions, dead-letter queue, DLQ, KMS encryption, customer-managed key, KmsKeyIdentifier, archive, schema discovery, event replay, aws:PrincipalOrgID, rule targets, DeadLetterConfig, PutPermission, Principal:"*"22 tags: eventbridge, security, event-bus, app-integration, dlq, encryption, audit23---2425# EventBridge Bus Policy Auditor2627## Mindset2829**One-line takeaway:** the verdict is always the **worst** finding across30all dimensions, and `events:PutEvents` is the EventBridge analogue of31`kms:Decrypt` — one permission grants injection access to every rule and32downstream target on the bus.3334An EventBridge event bus is the ingestion gate for event-driven35automation. Three properties make it uniquely dangerous when36misconfigured:3738- `events:PutEvents` is an **event-injection vector**: one permission39 lets an attacker craft events that match rule patterns and trigger40 Lambda, Step Functions, SQS, ECS, and API-destination targets. The41 blast radius extends through every rule on the bus.42- Missing `DeadLetterConfig` is a **silent data-loss vector**: failed43 invocations exhaust retries (6 hours for Lambda/SQS, 24 hours for API44 destinations) then disappear permanently — no DLQ, no trace.45- The bus policy is **ingestion-gate only**; rule event-patterns are46 the **routing-gate**. Both planes must be audited. A locked-down bus47 policy with a permissive event pattern still routes any ingested event.4849## Quick reference — verdict thresholds5051| Condition | Verdict | Step |52|---|---|---|53| `Principal: "*"` + `events:PutEvents`/`events:*`/`*` + no/weak condition | **PUBLIC_BUS** | Step 5a |54| Cross-account + `events:PutEvents` + no/weak condition | **PUBLIC_BUS** | Step 5b |55| `Principal: "*"` + `events:PutRule`/`events:PutPermission` + no/weak condition | **PUBLIC_BUS** | Step 5c |56| Any rule target missing `DeadLetterConfig` | **NO_DLQ** | Step 6 |57| `KmsKeyIdentifier` absent on custom bus | **NO_ENCRYPTION** | Step 7 |58| No archive configured on the bus | **CONFIG_GAP** | Step 8 |59| Scoped principals + STRONG condition + DLQ + CMK + archive | **OK** | Step 9 |60| `Principal: "*"` + PutEvents + STRONG condition (`aws:PrincipalOrgID`, `aws:SourceAccount`) | OK on policy dimension (condition-scoped, not public) | Step 5d |6162Severity ordering for aggregation: **PUBLIC_BUS > NO_DLQ > NO_ENCRYPTION63> CONFIG_GAP > OK**.6465## Pre-flight: bus metadata gate6667Before evaluating the policy, classify the bus itself. Several attributes68short-circuit the audit.6970| Attribute | Value | Effect |71|---|---|---|72| `Name` | `default` | **Default event bus.** Receives all AWS service events (CloudWatch, EC2, GuardDuty, Security Hub) by default. Restricting its policy may **break service event delivery**. Do NOT flag same-account service-principal statements on the default bus. Still audit DLQ, encryption, and archive dimensions. |73| `Name` | (custom) | Proceed with full audit. Custom buses are where restrictive policies apply. |74| `KmsKeyIdentifier` | (absent) | Bus uses an **AWS-owned key** (not even AWS-managed — invisible to your KMS console, no rotation control, no CloudTrail data-event logging). This is the NO_ENCRYPTION finding (Step 7). |75| `KmsKeyIdentifier` | `arn:aws:kms:...` | Customer-managed key configured. Encryption dimension passes. |7677**Multi-bus / account-wide sweep note (pagination):** `aws events78list-event-buses` returns at most 100 per page. `aws events list-rules`79returns at most 100 per page per bus. `aws events list-targets-by-rule`80returns at most 50 per page. All three silently truncate — always drain81`NextToken` to completion. A bus with 120 rules silently drops 20 from82the first page.8384**If the bus policy JSON is malformed** (invalid JSON, missing85`Statement`, missing `Principal` or `Action`), output:8687```text88BUS: <bus-name>89VERDICT: ERROR90REASON: Bus policy document is not valid JSON or is missing required fields — cannot classify.91REMEDIATION: Retrieve the canonical policy with `aws events describe-event-bus --name <bus> --output json` and re-audit.92```9394## Process — Classification logic (apply in order, aggregate worst)9596### Step 0: Expert knowledge — non-obvious EventBridge behaviors9798Step 0 expert-knowledge bullets (PutEvents blast radius, ingestion vs routing gate, invalid condition keys, same-account implicit access, service principals, DLQ per-target, retry windows, KmsKeyIdentifier, replay semantics, 8 KiB policy limit, aws:PrincipalOrgID, predictable ARNs, PutEvents volume, API-destination credential expiry) moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).99Load on demand a classification depends on a non-obvious behaviour.100101### Step 1: Bus type classification102103If the bus is the **default bus** (`Name: default`):104- Do NOT flag same-account `Principal: {"Service": "..."}` statements —105 AWS services must publish to the default bus for built-in integrations.106- Still evaluate DLQ, encryption, and archive dimensions normally.107- Flag `Principal: {"AWS": "*"}` + PutEvents on the default bus as108 PUBLIC_BUS — anyone can inject into the bus that receives all AWS109 service events, compounding the injection surface.110111If the bus is a **custom bus**, proceed with full policy audit.112113### Step 2: Principal scope classification114115For each `Effect: Allow` statement in the bus policy:116117- **WILDCARD_PRINCIPAL** — Principal is `"*"`, `{"AWS": "*"}`, or any118 construct resolving to all AWS principals.119120- **CROSS_ACCOUNT** — Principal includes an ARN whose 12-digit account121 differs from the bus's owning account.122123- **SERVICE_PRINCIPAL** — Principal is `{"Service": "<service-id>"}`.124 This is NORMAL for AWS service-to-bus integration. Do NOT flag as125 public unless the service principal is paired with dangerous admin126 actions (PutRule, PutPermission) without conditions.127128- **SAME_ACCOUNT** — All principals share the bus's owning account.129 This includes root (`arn:aws:iam::ACCOUNT:root`) and same-account130 roles/users.131132A statement with BOTH same-account and cross-account/wildcard principals133is classified by the **widest** scope.134135### Step 3: Action danger classification136137| Danger level | Actions | Why |138|---|---|---|139| **INJECT** | `events:PutEvents`, `events:*`, `*` | Event injection — can trigger every rule and downstream target. Blast-radius multiplier. |140| **ADMIN** | `events:PutRule`, `events:DeleteRule`, `events:PutTargets`, `events:RemoveTargets`, `events:PutPermission`, `events:RemovePermission`, `events:DisableRule`, `events:EnableRule`, `events:UpdateArchive` | Can modify bus configuration, inject new rules, revoke existing rules, or change the policy. |141| **READ** | `events:List*`, `events:Describe*`, `events:TestEventPattern` | Metadata disclosure — enumerates rules, targets, and bus configuration. |142143`NotAction` in an Allow is an inverse wildcard — grants every EventBridge144action EXCEPT the listed ones. Treat as INJECT + ADMIN (worst case).145146### Step 4: Condition strength evaluation147148**STRONG conditions (policy dimension passes — condition-scoped, not public):**149- `aws:PrincipalOrgID` with `StringEquals` — scopes to all accounts in150 the named Organization. The strongest multi-account condition.151- `aws:SourceAccount` with `StringEquals` — request must originate from152 the named account.153- `aws:SourceArn` with `StringEquals`/`StringLike` — request must154 originate from the named resource.155- `aws:PrincipalAccount` — equivalent to SourceAccount.156157**WEAK conditions (do NOT pass — treat as no condition, still PUBLIC_BUS):**158- `aws:SourceIp` — IP-based restrictions are bypassable by callers who159 control their egress (NAT gateway, proxy, VPN). **Quantitative160 prefix-length threshold:** a CIDR with `/0` suffix (`0.0.0.0/0`,161 `::/0`) covers the entire internet — equivalent to no condition. `/8`162 or broader (16M+ addresses) is effectively unrestricted. Only `/28`163 or narrower (16 or fewer addresses) provides operationally meaningful164 scoping. Between `/8` and `/28`, evaluate whether the CIDR covers165 known NAT, proxy, or cloud-egress ranges.166- `aws:Referer`, `aws:UserAgent` — trivially forgeable.167- `events:source`, `events:detail-type` — NOT valid condition keys;168 silently ignored by IAM evaluation.169170### Step 5: Policy severity matrix — PUBLIC_BUS determination171172Evaluate each Allow statement by combining principal scope (Step 2),173action danger (Step 3), and condition strength (Step 4):174175| Rule | Principal | Action | Condition | → PUBLIC_BUS? |176|---|---|---|---|---|177| 5a | WILDCARD | INJECT | None/weak | **Yes — PUBLIC_BUS** (anyone can inject events) |178| 5b | CROSS_ACCOUNT | INJECT | None/weak | **Yes — PUBLIC_BUS** (external account can inject) |179| 5c | WILDCARD or CROSS | ADMIN | None/weak | **Yes — PUBLIC_BUS** (external principal can inject/modify rules) |180| 5d | WILDCARD or CROSS | INJECT/ADMIN | STRONG | **No — OK on policy dimension** (condition-scoped, not public) |181| 5e | WILDCARD or CROSS | READ | Any | **No** — metadata-only exposure (note as low-severity finding) |182| 5f | SERVICE_PRINCIPAL | INJECT | None | **No** — normal service integration (Step 1) |183| 5g | SAME_ACCOUNT | Any | Any | **No** — implicit access; IAM is the second gate |184185**CRITICAL CLASSIFICATION RULE — Step 5d:** A `Principal: "*"` or186cross-account grant with `events:PutEvents` and a STRONG condition187(`aws:PrincipalOrgID`, `aws:SourceAccount`, `aws:SourceArn`) is188**NOT PUBLIC_BUS**. The condition scopes access to a known organization189or account. Classify the policy dimension as **OK** and note the190condition-restricted access in FINDINGS for verification. Do NOT191conflate "cross-account" with "public" — a condition-restricted192cross-account grant is a controlled delegation, not an open injection193vector. This is the single most common classification error.194| 5e | WILDCARD or CROSS | READ | Any | **No** — metadata-only exposure (note as low-severity finding) |195| 5f | SERVICE_PRINCIPAL | INJECT | None | **No** — normal service integration (Step 1) |196| 5g | SAME_ACCOUNT | Any | Any | **No** — implicit access; IAM is the second gate |197198If any statement matches 5a/5b/5c, the **PUBLIC_BUS** verdict is emitted199for the policy dimension.200201**Special case — the account-root statement:** A statement with202`Principal: {"AWS": "arn:aws:iam::ACCOUNT:root"}` + `events:*` is the203default root-delegation pattern. It delegates bus management to the204account's IAM policies. This is **NORMAL** — do NOT flag it. Same-account205PutEvents does not require the bus policy (implicit root access).206207### Step 6: Dead-letter queue evaluation208209For each rule on the bus, enumerate ALL targets via210`list-targets-by-rule`. For each target, check `DeadLetterConfig`:211212- **DeadLetterConfig absent on ANY target** → **NO_DLQ** finding for that213 target. Failed invocations exhaust retries (6h Lambda/SQS/SNS/ECS/SFN,214 up to 24h API destinations) then are permanently lost — no DLQ, no215 trace. This is a silent data-loss vector.216217- **DeadLetterConfig present (SQS ARN)** → target passes the DLQ check.218 Verify the SQS queue exists and has a retention period long enough for219 operational response (>= 4 days recommended).220221A bus with multiple rules where ALL targets have DLQs passes this step.222A single target without DLQ is enough for the NO_DLQ finding.223224**Quota note:** A rule can have up to 5 targets. Each target needs its225own DLQ ARN — sharing one SQS queue across targets is acceptable but226complicates triage (all failures land in one queue).227228### Step 7: KMS encryption evaluation229230Check `KmsKeyIdentifier` on the bus metadata:231232- **KmsKeyIdentifier absent** → **NO_ENCRYPTION** finding. The bus uses233 an AWS-owned key — invisible in your KMS console, no rotation control,234 no key policy control, no CloudTrail data-event logging on decrypt.235 A customer-managed key gives rotation control, key-policy control, and236 decrypt-audit capability.237238- **KmsKeyIdentifier set to a CMK ARN** → encryption dimension passes.239 Verify the referenced CMK exists, is enabled, and has rotation enabled240 (cross-reference to kms-key-policy-auditor for the key policy audit).241242### Step 8: Archive and enrichment evaluation243244Check archive and schema-discovery status:245246- **No archive configured** → **CONFIG_GAP** finding. Without an archive,247 there is no event-replay capability for incident recovery. Archives248 capture events matching a pattern for a configurable retention period.249 Recommend `CreateArchive` with a broad event pattern.250251- **Archive present** → passes. Note the retention period and event252 pattern coverage (a narrow pattern may miss events you need to replay).253254- **Schema discovery disabled** → note as a low-priority CONFIG_GAP255 sub-finding. Without schema discovery, you lose automated schema256 inference and code-generation benefits. Enable via257 `UpdateEventBus` with schema-discovery on.258259### Step 9: Aggregation — worst finding wins260261The final verdict is the **maximum severity** across all dimensions,262where PUBLIC_BUS > NO_DLQ > NO_ENCRYPTION > CONFIG_GAP > OK:263264```text265verdict = max(policy_finding, dlq_finding, encryption_finding, archive_finding)266```267268If no findings across all dimensions, the verdict is **OK**.269270## Output format (per bus)271272```text273BUS: <bus-name or ARN>274VERDICT: PUBLIC_BUS | NO_DLQ | NO_ENCRYPTION | CONFIG_GAP | OK275REASON: <1-2 sentences citing the worst finding and its step>276FINDINGS:277 - [PUBLIC_BUS] <finding description (Step Na)>278 - [NO_DLQ] <finding description (Step N)>279 - [OK] <dimension that passed>280REMEDIATION: <specific action per finding, or "None required" if OK>281```282283### Worked example — public bus with missing DLQ284285```text286BUS: custom-bus-app-events287VERDICT: PUBLIC_BUS288REASON: Statement "OpenIngest" grants events:PutEvents to Principal "*"289with no restrictive condition — any AWS account holder can inject events290that trigger all rules on the bus (Step 5a). Rule "alert-rule" target291"lambda-handler" is also missing a dead-letter queue.292FINDINGS:293 - [PUBLIC_BUS] Principal "*" + events:PutEvents + no condition (Step 5a)294 - [NO_DLQ] Rule "alert-rule" target "lambda-handler" has no DeadLetterConfig (Step 6)295 - [NO_ENCRYPTION] KmsKeyIdentifier absent — bus uses AWS-owned key (Step 7)296 - [CONFIG_GAP] No archive configured — no replay capability (Step 8)297REMEDIATION:298 1. PUBLIC_BUS — Replace Principal "*" with specific account/role ARNs.299 Add aws:PrincipalOrgID or aws:SourceAccount condition to scope access.300 2. NO_DLQ — Create an SQS DLQ and attach to each target:301 aws events put-targets --rule alert-rule --event-bus-name custom-bus-app-events302 --targets '[{"Id":"lambda-handler","Arn":"...","DeadLetterConfig":{"Arn":"arn:aws:sqs:...:dlq"}}]'303 3. NO_ENCRYPTION — Associate a customer-managed KMS key:304 aws events update-event-bus --name custom-bus-app-events305 --kms-key-identifier arn:aws:kms:us-east-1:111111111111:key/cmk-id306 4. CONFIG_GAP — Create an archive:307 aws events create-archive --archive-name app-events-archive308 --event-source-name custom-bus-app-events --retention 30309```310311## Anti-Patterns — NEVER312313- NEVER classify `Principal: {"AWS": "arn:aws:iam::ACCOUNT:root"}` +314 `events:*` as a vulnerability. This is the **default root-delegation315 statement**. Same-account access does not require the bus policy — the316 root has implicit access. Flagging it as WILDCARD is a false positive.317318- NEVER flag `Principal: {"Service": "guardduty.amazonaws.com"}` or any319 AWS service principal with `events:PutEvents` as public exposure on320 the **default bus**. AWS services must publish to the default bus for321 built-in integrations. This is normal service-to-bus delivery.322323- NEVER treat `events:source` or `detail-type` as IAM condition keys in a324 bus policy. They are event-body fields — a bus policy condition using325 them is a silent no-op and provides zero restriction. Only326 `aws:SourceAccount`, `aws:SourceArn`, `aws:PrincipalAccount`, and327 `aws:PrincipalOrgID` are valid.328329- NEVER classify a `Principal: "*"` + `events:PutEvents` grant with a330 STRONG condition (`aws:PrincipalOrgID`, `aws:SourceAccount`) as331 PUBLIC_BUS. The condition narrows access to a known org/account.332 Classify as OK on the policy dimension — note the condition-restricted333 access in FINDINGS for verification.334335- NEVER treat `aws:SourceIp` with `0.0.0.0/0` as a real condition. This336 CIDR is the entire internet and provides zero restriction. Treat the337 statement as if the condition is absent — PUBLIC_BUS.338339- NEVER assume one DLQ per rule is sufficient. DeadLetterConfig is340 per-TARGET — a rule with 5 targets needs 5 DLQ ARNs. Missing DLQ on341 any single target is a silent data-loss vector for that target.342343- NEVER assume the bus policy is the complete access picture for344 cross-account. Cross-account PutEvents requires BOTH the bus policy345 AND the caller's IAM to allow it (intersection). But always flag the346 bus-policy grant — the resource owner controls this gate.347348- NEVER recommend restricting the **default bus** policy without349 explaining that it may break AWS service event delivery. CloudWatch350 Alarms, GuardDuty, Security Hub, EC2, and dozens of other services351 publish to the default bus. Use custom buses for restrictive policies.352353- NEVER overlook a rule with zero targets. A rule with no targets354 consumes event-matching capacity (300 rules per bus quota) but355 triggers nothing — it is dead configuration. Flag as CONFIG_GAP.356357- NEVER assume archive and schema discovery are enabled by default.358 Archives require explicit `CreateArchive`. Schema discovery requires359 explicit enablement. Both are absent on a freshly created bus.360361- NEVER set archive retention > 90 days without a cost justification.362 Archive events are billed per-event-month — a high-volume bus363 (1M events/day) at 90 days costs ~9x more than the recommended 7-30364 day operational window. Use longer retention only for compliance365 requirements and budget-alert the archive.366367- NEVER use `put-permission` with a duplicate `--statement-id`. The368 statement-id uniquely identifies the permission entry; reusing an369 existing id **silently overwrites** the prior statement. Always use370 unique, descriptive statement-ids (e.g., `CrossAccountAppPublisher`,371 not `Allow1`).372373- NEVER attempt to modify the default bus policy to remediate374 cross-account access without first verifying which AWS service375 integrations depend on it. Breaking service event delivery is an376 active outage.377378- NEVER assume `Resource: "*"` in a bus policy is broader than379 `Resource: <bus-arn>`. The policy is attached to the bus — both are380 functionally identical. Evaluate `Principal` + `Action` + `Condition`381 only.382383## Pre-flight safety checks (run before any remediation CLI)384385- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation386 (PutPermission, RemovePermission, PutTargets, UpdateEventBus,387 PutRule, DeleteRule), the auditor MUST emit:388 `CONFIRM: About to <action> on bus <name> in account <account>. This389 affects <consequence>. Proceed? (yes/no)`390 Do NOT execute the CLI command until the operator confirms.391392- **Back up the current bus policy** before any modification:393 `aws events describe-event-bus --name <bus> --profile <p> --output json > /tmp/<bus>-policy-backup-$(date +%s).json`394 Bus policies have no version history — `put-permission` replaces the395 entire policy atomically. The backup is the only rollback path.396397- Before removing a cross-account principal from the bus policy, verify398 the external account's workload is not actively publishing events.399 Check CloudTrail for `events:PutEvents` from the external account in400 the last 7 days. Removing access without coordination causes an401 immediate event-delivery outage for the external publisher.402403- Before associating a KMS key (`UpdateEventBus --kms-key-identifier`),404 verify the key policy permits `events.amazonaws.com` as a service405 principal with `kms:Decrypt` and `kms:GenerateDataKey*`. A key that406 does not allow EventBridge will cause PutEvents to fail silently.407408- Prefer additive changes (add a Deny statement, add a condition) over409 destructive changes (remove a statement) — additive changes are410 reversible.411412- For PUBLIC_BUS findings (wildcard/cross-account PutEvents), treat as413 incident-response. Audit CloudTrail for `events:PutEvents` from414 unexpected principals during the exposure window. Identify rules that415 could have been triggered by injected events and check downstream416 targets for anomalous invocations.417418## Remediation guidance419420Remediation CLI per verdict (PUBLIC_BUS put/remove-permission, NO_DLQ create-queue + put-targets + alarm, NO_ENCRYPTION update-event-bus, CONFIG_GAP create-archive + create-registry, OK) moved verbatim to [references/diagnostic-commands.md](references/diagnostic-commands.md).421Load on demand emitting the remediation commands for a finding.422423## Recent AWS features (2024-2026)424425Recent AWS features (global endpoints GA, Scheduler, Schema Registry, cross-account enhancements) moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).426Load on demand checking whether a newer AWS feature changes the audit.427428## References (load on demand)429430- [references/diagnostic-commands.md](references/diagnostic-commands.md) — remediation CLI per verdict (PUBLIC_BUS, NO_DLQ, NO_ENCRYPTION, CONFIG_GAP, OK), moved from SKILL.md.431- [references/advanced-patterns.md](references/advanced-patterns.md) — Step 0 expert-knowledge bullets and recent AWS features, moved from SKILL.md.432433## Domain434435AWS CloudOps / EventBridge Security & App Integration.436437## AWS documentation438439- **Amazon EventBridge User Guide** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html440- **EventBridge Security** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-security.html441- **EventBridge API Reference** — https://docs.aws.amazon.com/eventbridge/latest/api-reference/442- **EventBridge CLI Reference** — https://docs.aws.amazon.com/cli/latest/reference/events/443- **EventBridge Scheduler** — https://docs.aws.amazon.com/scheduler/latest/UserGuide/what-is-scheduler.html