feat(aws): add iam_user_access_not_stale_to_sagemaker security check#11000
feat(aws): add iam_user_access_not_stale_to_sagemaker security check#11000HugoPBrito wants to merge 1 commit intomasterfrom
Conversation
Add new security check iam_user_access_not_stale_to_sagemaker for aws provider. Includes check implementation, metadata, and unit tests.
cc1b667 to
376710d
Compare
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
|
✅ All necessary |
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 |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #11000 +/- ##
===========================================
- Coverage 59.14% 20.44% -38.71%
===========================================
Files 8 852 +844
Lines 399 24723 +24324
===========================================
+ Hits 236 5054 +4818
- Misses 163 19669 +19506
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
5 package(s) affected
|
Context
Stale SageMaker permissions widen the blast radius of a credential compromise. An attacker who gains access to an IAM user with unused SageMaker permissions can access ML training data, models, endpoints, and notebooks — all without triggering expected usage patterns. This check helps enforce least privilege by detecting IAM users that hold SageMaker permissions but have not actually used the service recently.
Description
This check evaluates each IAM user that has SageMaker service permissions by inspecting IAM Access Advisor (service last accessed) data for the
sagemakernamespace. A user passes if they have accessed SageMaker within the configured threshold (default 90 days). A user fails if their last SageMaker access exceeds the threshold or if they have never accessed the service. The recommended remediation is to review the Access Advisor tab and remove or scope down any SageMaker policies that are no longer actively used.Steps to review
prowler/providers/aws/services/iam/iam_user_access_not_stale_to_sagemaker/prowler/compliance/aws/to ensure the check is correctly mapped to relevant requirementspoetry run pytest tests/providers/aws/services/iam/iam_user_access_not_stale_to_sagemaker/ -vChecklist
Community Checklist
SDK/CLI
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.