bridgecrewio / checkov

Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew.
https://www.checkov.io/
Apache License 2.0
6.75k stars 1.08k forks source link

feat(arm): add FunctionAppsEnableAuthentication - Checking if a certain field exists #6250

Closed rutiNalenger closed 1 month ago

rutiNalenger commented 2 months ago

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

[//]: # "

PR Title

Be aware that we use the title to create changelog automatically and therefore only allow specific prefixes
- break:    to indicate a breaking change, this supersedes any of the types
- feat:     to indicate new features or checks
- fix:      to indicate a bugfix or handling of edge cases of existing checks
- docs:     to indicate an update to our documentation
- chore:    to indicate adjustments to workflow files or dependency updates
- platform: to indicate a change needed for the platform
Additionally a scope is needs to be added to the prefix, which indicates the targeted framework, in doubt choose 'general'.
#    
Allowed prefixs:
ansible|argo|arm|azure|bicep|bitbucket|circleci|cloudformation|dockerfile|github|gha|gitlab|helm|kubernetes|kustomize|openapi|sast|sca|secrets|serverless|terraform|general|graph|terraform_plan|terraform_json
#
ex.
feat(terraform): add CKV_AWS_123 to ensure that VPC Endpoint Service is configured for Manual Acceptance

"

Description

adds a FunctionAppsEnableAuthentication

Description

I added a test that checks whether a value with a value of true is found under a certain field

Fix

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

Checklist:

rutiNalenger commented 2 months ago

update the branch

ChanochShayner commented 1 month ago

Looks good! If you can add authsettingsV2 that would be helpful. You would have to check that if you're looking at auth v1, look at properties/enabled, if it's auth v2, look at properties/platformenabled.

@tsmithv11 I don't see any relevant field in Microsoft.Web sites/config 'web' for this, just platform/enabled in v2. Am I right?

tsmithv11 commented 1 month ago

Looks good! If you can add authsettingsV2 that would be helpful. You would have to check that if you're looking at auth v1, look at properties/enabled, if it's auth v2, look at properties/platformenabled.

@tsmithv11 I don't see any relevant field in Microsoft.Web sites/config 'web' for this, just platform/enabled in v2. Am I right?

Yeah, correct, properties/platform/enabled