sec(iac): scope SecretsManagerDescribe to specific actions (closes #430) - #817
Conversation
|
@coderabbitai review |
|
Warning Review limit reached
More reviews will be available in 14 minutes and 26 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe CI/CD permissions policy removes an overly permissive secrets manager statement. The standalone ChangesIAM Permission Restriction
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai review |
Rate Limit Exceeded
|
|
@coderabbitai full review Generated by Claude Code |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Fetch PR details
gh pr view 817 --repo LeanerCloud/CUDly
echo "---DIFF---"
gh pr diff 817 --repo LeanerCloud/CUDly
echo "---FILE CONTENT---"
cat terraform/environments/aws/ci-cd-permissions/policy_data.tf 2>/dev/null || echo "File not found locally"
echo "---ALL POLICY FILES---"
fd -e tf . terraform/ 2>/dev/null | head -30Length of output: 11627 🌐 Web query:
Length of output: 13380
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
|
Merge-prep: rebased onto origin/main (27fdb06), no conflicts. Non-Go PR; go vet on internal/... clean. @coderabbitai full review |
secretsmanager:ListSecrets on Resource="*" in SecretsManagerDescribe was a duplicate of the ListSecrets already in the SecretsManager block scoped to cudly-* ARNs. The wildcard grant let the CI/CD role enumerate all secret names in the account. Remove the over-privileged statement.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
SecretsManagerDescribeIAM policy block fromterraform/environments/aws/ci-cd-permissions/policy_data.tfsecretsmanager:ListSecretsonResource = "*", letting the CI/CD role enumerate all secret names in the accountsecretsmanager:ListSecretsis already present in theSecretsManagerblock scoped toarn:aws:secretsmanager:*:*:secret:cudly-*, so no functionality is lostTest plan
terraform fmt -checkpasses (no format changes needed)terraform validatepasses:Success! The configuration is valid.Summary by CodeRabbit