Skip to content

fix(alerts): enumerate topic-scoped SNS actions — sns:* fails at apply - #62

Merged
arnoldcastro5000 merged 1 commit into
mainfrom
fix/sns-topic-policy-scoped-actions
Jul 7, 2026
Merged

arnoldcastro5000 merged 1 commit into
mainfrom
fix/sns-topic-policy-scoped-actions

Conversation

@loonvault-agent

Copy link
Copy Markdown
Contributor

First live apply of the detection pipeline failed at aws_sns_topic_policy.alerts:

InvalidParameter: Invalid parameter: Policy statement action out of service scope!

SNS rejects wildcard actions in topic policies: sns:* expands over account-level actions (CreateTopic, ListTopics, …) that cannot apply to a topic resource. AWS's own topic-policy examples (and the __default_policy SNS generates) always enumerate the topic-scoped set — so this does the same for the AllowAccountManagement statement. The AllowEventBridgePublish statement was already fine.

No behavioral change for any current caller: the explicit list covers everything the account principal actually does with this topic.

This class of bug is invisible to CI (static scans only, no AWS credentials — the error only exists at SetTopicAttributes time). Re-running just loonvault-apply after merge completes the remaining resources.

🤖 Generated with Claude Code

…cAttributes

First live apply failed: SNS rejects wildcard actions in topic policies
('Invalid parameter: Policy statement action out of service scope') because
sns:* sweeps in account-level actions (CreateTopic, ListTopics) that cannot
apply to a topic resource. Use the explicit topic-scoped set AWS's own
__default_policy uses. CI could not catch this — it only surfaces on apply.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@arnoldcastro5000
arnoldcastro5000 merged commit bdc2acb into main Jul 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant