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

fix(iam_inline_policy_no_administrative_privileges): set resource id as the entity name #2820

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

MrCloudSec
Copy link
Member

Description

Set resource id as the entity name.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@MrCloudSec MrCloudSec requested a review from a team September 7, 2023 12:55
toniblyx
toniblyx previously approved these changes Sep 7, 2023
Copy link
Member

@toniblyx toniblyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jfagoagas jfagoagas added provider/aws Issues/PRs related with the AWS provider testing-pending labels Sep 19, 2023
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #2820 (ac66ecc) into master (1dfb72a) will decrease coverage by 0.11%.
Report is 34 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2820      +/-   ##
==========================================
- Coverage   86.24%   86.14%   -0.11%     
==========================================
  Files         538      539       +1     
  Lines       17292    17331      +39     
==========================================
+ Hits        14913    14929      +16     
- Misses       2379     2402      +23     
Files Changed Coverage Δ
.../iam_inline_policy_no_administrative_privileges.py 96.00% <100.00%> (ø)
prowler/providers/aws/services/iam/iam_service.py 80.14% <100.00%> (-0.75%) ⬇️

... and 12 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -10,7 +10,7 @@ def execute(self) -> Check_Report_AWS:
report = Check_Report_AWS(self.metadata())
report.region = iam_client.region
report.resource_arn = policy.arn
report.resource_id = policy.name
report.resource_id = policy.entity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? Please include an explanation in the PR body.

Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the inline policy it is not an unique resource and it may lead to duplicate finding IDs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see the "inline" part, totally agree then. Good catch!!

@jfagoagas jfagoagas self-requested a review September 22, 2023 10:58
Copy link
Member

@jfagoagas jfagoagas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔝

@jfagoagas jfagoagas merged commit 70fbf16 into master Sep 22, 2023
@jfagoagas jfagoagas deleted the fix-iam_inline_policy_no_administrative_privileges branch September 22, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants