feat(terraform): Ensure the default IP Restriction action for SCM is set to "Deny"
User description
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
Fixes #6114
New/Edited policies (Delete if not relevant)
Description
Check that ensure that the default IP Restriction action for SCM is set to "Deny"
Fix
Set "scm_ip_restriction_default_action" to "Deny"
Checklist:
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [X] 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
Generated description
Dear maintainer, below is a concise technical summary of the changes proposed in this PR:
Implement a new check AppServiceIPResctrictionDefaultActionSCMDeny to ensure that the default IP restriction action for SCM in Azure App Services is set to 'Deny'. This check is integrated into the Checkov framework and applies to both azurerm_linux_web_app and azurerm_windows_web_app resources. The check inspects the site_config block for the scm_ip_restriction_default_action key. Additionally, test cases are added to verify the functionality of this check, ensuring it correctly identifies compliant and non-compliant configurations.
| Topic | Details | |||
|---|---|---|---|---|
| SCM IP Restriction | Implement a new check AppServiceIPResctrictionDefaultActionSCMDeny to ensure the default IP restriction action for SCM is set to 'Deny'.Modified files (1)
Latest Contributors(0)
| |||
| Testing SCM Restriction | Add test cases to verify the new check AppServiceIPResctrictionDefaultActionSCMDeny for Azure App Services.Modified files (2)
Latest Contributors(0)
|
Dear Checkov Team,
Would it be possible to have a status on this PR please?
Kind Regards, Thomas
@tdefise Thanks for you contribution Please fix the lint errors