Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS CloudWatch Log Resource Policy Confused Deputy Protection #1450

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

bcpenta
Copy link
Contributor

@bcpenta bcpenta commented Dec 12, 2024

Background

This policy ensures that AWS CloudWatch Log Resource Policies with service principals contain conditions to prevent cross-service confused deputy issues. Without these conditions (such as aws:SourceArn, aws:SourceAccount, aws:SourceOrgID, or aws:SourceOrgPaths), attackers may be able to exploit the resource policy to gain unauthorized access or misuse the service.

Changes

Added a new policy, AWS.CloudWatchLog.ConfusedDeputyProtection, to validate that CloudWatch Log Resource Policies containing service principals include at least one of the required conditions to mitigate the risk of confused deputy attacks.

Testing

Log Policy Without Required Conditions: Tests a policy with a service principal but no conditions (expected to fail).
Log Policy With Required Conditions: Tests a policy with a service principal and valid conditions (expected to pass).
Log Policy Without Service Principal: Tests a policy without a service principal (expected to pass).

@bcpenta bcpenta requested a review from a team as a code owner December 12, 2024 16:27
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