-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(iam): improve disable credentials checks #2909
Conversation
@@ -3,40 +3,12 @@ | |||
from prowler.lib.check.models import Check, Check_Report_AWS | |||
from prowler.providers.aws.services.iam.iam_client import iam_client | |||
|
|||
maximum_expiration_days = 45 | |||
maximum_expiration_days = iam_client.audit_config.get("max_unused_access_keys_days") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting this line there makes the tests to fail, you have to move it under line 10.
And set a default value with the same value in config.yaml
.
https://docs.prowler.cloud/en/latest/developer-guide/checks/#using-the-audit-config
from prowler.lib.check.models import Check, Check_Report_AWS | ||
from prowler.providers.aws.services.iam.iam_client import iam_client | ||
|
||
maximum_expiration_days = iam_client.audit_config.get("max_console_access_days") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting this line there makes the tests to fail, you have to move it under line 10.
And set a default value with the same value in config.yaml
.
https://docs.prowler.cloud/en/latest/developer-guide/checks/#using-the-audit-config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
680d8d5
to
402ef76
Compare
Codecov Report
@@ Coverage Diff @@
## master #2909 +/- ##
==========================================
- Coverage 86.24% 86.18% -0.06%
==========================================
Files 540 539 -1
Lines 17496 17374 -122
==========================================
- Hits 15089 14974 -115
+ Misses 2407 2400 -7
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Description
Create two configurable checks for IAM credentials:
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.