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

feat(Azure): Entra service with two checks #3510

Merged
merged 12 commits into from Mar 8, 2024

Conversation

puchy22
Copy link
Contributor

@puchy22 puchy22 commented Mar 7, 2024

Context

Add new Microsoft Entra service and checks for Azure. The core code of the service was provided by my partner @pedrooot 🚀

Description

Add this checks with his respective unit tests:

  • entra_policy_ensure_default_user_cannot_create_tenants
  • entra_policy_ensure_default_user_cannot_create_apps

License

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

@puchy22 puchy22 requested a review from a team as a code owner March 7, 2024 11:25
@github-actions github-actions bot added the provider/azure Issues/PRs related with the Azure provider label Mar 7, 2024
@puchy22 puchy22 changed the title feat(Azure): Entra service with two basic checks feat(Azure): Entra service with two checks Mar 7, 2024
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 91.76471% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 85.98%. Comparing base (fcb2df9) to head (a28393c).
Report is 4 commits behind head on master.

Files Patch % Lines
...er/providers/azure/services/entra/entra_service.py 85.71% 6 Missing ⚠️
prowler/providers/azure/azure_provider.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3510      +/-   ##
==========================================
+ Coverage   85.89%   85.98%   +0.08%     
==========================================
  Files         670      674       +4     
  Lines       20826    20894      +68     
==========================================
+ Hits        17889    17965      +76     
+ Misses       2937     2929       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jfagoagas jfagoagas added the backport-v3 Pending to port to Prowler v3 branch label Mar 7, 2024
jfagoagas
jfagoagas previously approved these changes Mar 8, 2024
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.

Great job @puchy22 @pedrooot !!! Thanks!

report.subscription = "All"
report.resource_name = "Default Authorization Policy"
report.resource_id = "Default Authorization Policy"
report.status_extended = "Tenants creation is not disabled for non-admin users."
Copy link
Member

Choose a reason for hiding this comment

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

Check this status extended please.

)
except Exception as error:
logger.error(
f"ERROR: {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
f"ERROR: {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"

)
except Exception as error:
logger.error(
f"ERROR: {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
f"ERROR: {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"

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 33884db into prowler-cloud:master Mar 8, 2024
11 checks passed
@sergargar sergargar removed the backport-v3 Pending to port to Prowler v3 branch label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/azure Issues/PRs related with the Azure provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants