Commit a7670ca
🐛 Reject non-KMS ARNs in initAwsKmsKey to prevent misleading warnings
When scanning individual assets (S3 buckets, CloudTrail trails, etc.)
and a policy includes a bare `aws.kms.key` query, initAwsKmsKey falls
back to getAssetIdentifier and receives the asset's own ARN—which is
not a KMS ARN. Those ARNs then hit the cross-account code path (S3
ARNs have no account ID; org trail ARNs belong to a different account)
producing misleading "cross-account KMS keys are not supported yet"
warnings. This adds a service check after ARN parsing to reject
non-KMS ARNs early with a clear error message.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b0bccb5 commit a7670ca
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
334 | 345 | | |
335 | 346 | | |
336 | 347 | | |
| |||
0 commit comments