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(arm): add CKV_AZURE_191 to ensure that Managed identity provider is enabled for Azure Event Grid Topic #6496

Conversation

RachelBorzi
Copy link
Contributor

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

Description

Added new policy for -
EventgridTopicIdentityProviderEnabled - CKV_AZURE_191
Fixes # (issue)

New/Edited policies (Delete if not relevant)

Description

policy to ensure that Managed identity provider is enabled for Azure Event Grid Topic

Fix

How does someone fix the issue in code and/or in runtime?

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

# Regular checks of the monitored path allow Azure App Service to route traffic based on availability."
name = "Ensure that App Service configures health check"
id = "CKV_AZURE_213"
supported_resources = ('Microsoft.Web/sites', 'Microsoft.Web/sites/slots',)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can add Microsoft.Web/sites/config to the supported resource_types.

supported_resources = ("Microsoft.EventGrid/topics",)
categories = (CheckCategories.IAM,)
super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)

Copy link
Contributor

Choose a reason for hiding this comment

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

should be missing_block_result passed, as the default value here is false.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was wrong, shouldnt be missing_block_result=CheckResult.PASSED

return "properties/publicNetworkAccess"

def get_expected_value(self) -> str:
return "disabled"
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be Upper Case -> Disabled and Enabled.

Copy link
Contributor

@ChanochShayner ChanochShayner left a comment

Choose a reason for hiding this comment

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

Nice, please fix my comments.

Copy link
Contributor

@ChanochShayner ChanochShayner left a comment

Choose a reason for hiding this comment

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

Nice!

return "properties/disableLocalAuth"

def get_expected_value(self) -> bool:
return False
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return False
return True

supported_resources = ("Microsoft.EventGrid/topics",)
categories = (CheckCategories.IAM,)
super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)

Copy link
Contributor

Choose a reason for hiding this comment

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

I was wrong, shouldnt be missing_block_result=CheckResult.PASSED

@ChanochShayner ChanochShayner merged commit 6193d44 into bridgecrewio:main Jul 24, 2024
41 checks passed
dtrouillet pushed a commit to dtrouillet/checkov_severity that referenced this pull request Jul 24, 2024
… is enabled for Azure Event Grid Topic (bridgecrewio#6496)

* feat(ARM): AppServiceSetHealthCheck CKV_AZURE_213

* feat(arm): CKV_AZURE_193

* feat(arm): CKV_AZURE_192

* feat(arm): CKV_AZURE_191

* fix

* fix

* git commit -m "Remove check

* Update checkov/arm/checks/resource/EventgridTopicLocalAuthentication.py

---------

Co-authored-by: Rachel <bb50305030@gmail.com>
Co-authored-by: ChanochShayner <57212002+ChanochShayner@users.noreply.github.com>
dtrouillet pushed a commit to dtrouillet/checkov_severity that referenced this pull request Jul 24, 2024
… is enabled for Azure Event Grid Topic (bridgecrewio#6496)

* feat(ARM): AppServiceSetHealthCheck CKV_AZURE_213

* feat(arm): CKV_AZURE_193

* feat(arm): CKV_AZURE_192

* feat(arm): CKV_AZURE_191

* fix

* fix

* git commit -m "Remove check

* Update checkov/arm/checks/resource/EventgridTopicLocalAuthentication.py

---------

Co-authored-by: Rachel <bb50305030@gmail.com>
Co-authored-by: ChanochShayner <57212002+ChanochShayner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants