feat(aws): add iam_policy_no_wildcard_marketplace_subscribe and iam_inline_policy_no_wildcard_marketplace_subscribe checks#10525
Conversation
…e security check Add new security check bedrock_marketplace_subscription_access_least_privilege for aws provider. Includes check implementation, metadata, and unit tests.
07db07d to
dca2b7c
Compare
|
✅ All necessary |
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10525 +/- ##
===========================================
- Coverage 59.88% 19.15% -40.74%
===========================================
Files 87 843 +756
Lines 2862 24007 +21145
===========================================
+ Hits 1714 4599 +2885
- Misses 1148 19408 +18260
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
🔒 Container Security ScanImage: 📊 Vulnerability Summary
4 package(s) affected
|
Compliance Mapping ReviewThis PR adds new checks. Please verify that they have been mapped to the relevant compliance framework requirements. New checks already mapped in this PR
Use the |
Context
Granting
aws-marketplace:Subscribeon all resources (*) allows any principal with the policy to subscribe to any AWS Marketplace product, including expensive Amazon Bedrock foundation models, without governance controls. This can lead to uncontrolled costs from unauthorized model subscriptions, shadow AI usage outside compliance boundaries, and unapproved model deployments.Description
Two new IAM checks that evaluate custom and inline IAM policies for overly broad
aws-marketplace:Subscribepermissions granted onResource: *:iam_policy_no_wildcard_marketplace_subscribe— Inspects customer-managed IAM policies (follows the same pattern asiam_policy_no_full_access_to_kms)iam_inline_policy_no_wildcard_marketplace_subscribe— Inspects inline IAM policies on users/roles/groups (follows the same pattern asiam_inline_policy_no_full_access_to_kms)Both checks:
aws-marketplace:Subscribe,aws-marketplace:*,*)Resource: *that negate the findingCompliance framework mappings added to 17 frameworks (AWS Well-Architected, NIST 800-53, FedRAMP, HIPAA, SOC2, ISO 27001, etc.) under least-privilege controls.
Steps to review
prowler/providers/aws/services/iam/iam_policy_no_wildcard_marketplace_subscribe/prowler/providers/aws/services/iam/iam_inline_policy_no_wildcard_marketplace_subscribe/prowler/compliance/aws/Checklist
Community Checklist
SDK/CLI
iam:ListPolicies,iam:GetPolicyVersion,iam:ListRolePolicies,iam:GetRolePolicy, etc.) already required by other IAM checks.License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.