-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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): ARM FunctionAppHttpVersionLatest policy #6244
feat(arm): ARM FunctionAppHttpVersionLatest policy #6244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Job!
Please update the PR description with the relevent info, and fix the failing jobs.
name = "Ensure that 'HTTP Version' is the latest, if used to run the Function app" | ||
id = "CKV_AZURE_67" | ||
supported_resources = ("Microsoft.Web/sites/slots",) | ||
categories = [CheckCategories.GENERAL_SECURITY] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a tuple instead of a list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One suggestion
def __init__(self) -> None: | ||
name = "Ensure that 'HTTP Version' is the latest, if used to run the Function app" | ||
id = "CKV_AZURE_67" | ||
supported_resources = ("Microsoft.Web/sites/slots",) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supported_resources = ("Microsoft.Web/sites/slots",) | |
supported_resources = ("Microsoft.Web/sites/slots", "Microsoft.Web/sites") |
Sites can also have this set: https://learn.microsoft.com/en-us/azure/templates/microsoft.web/sites?pivots=deployment-language-arm-template#siteconfig-1
Can you add a UT for this?
I'll take care of that, thanks.
בתאריך יום ד׳, 8 במאי 2024 ב-12:07 מאת Taylor ***@***.***
>:
… ***@***.**** approved this pull request.
Looks good! One suggestion
------------------------------
In checkov/arm/checks/resource/FunctionAppHttpVersionLatest.py
<#6244 (comment)>
:
> @@ -0,0 +1,22 @@
+from checkov.arm.base_resource_value_check import BaseResourceValueCheck
+from checkov.common.models.enums import CheckCategories
+
+
+class FunctionAppHttpVersionLatest(BaseResourceValueCheck):
+
+ def __init__(self) -> None:
+ name = "Ensure that 'HTTP Version' is the latest, if used to run the Function app"
+ id = "CKV_AZURE_67"
+ supported_resources = ("Microsoft.Web/sites/slots",)
⬇️ Suggested change
- supported_resources = ("Microsoft.Web/sites/slots",)
+ supported_resources = ("Microsoft.Web/sites/slots", "Microsoft.Web/sites")
Sites can also have this set:
https://learn.microsoft.com/en-us/azure/templates/microsoft.web/sites?pivots=deployment-language-arm-template#siteconfig-1
Can you add a UT for this?
—
Reply to this email directly, view it on GitHub
<#6244 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BEDKZMCIB76U3W7C5M2B3D3ZBHTLVAVCNFSM6AAAAABHHR3YEKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANBVGA4DQMZQGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
* app cors test * function app version latest * function app version latest * function app version latest update validate * function app version latest update validate * function app version latest add supported resource --------- Co-authored-by: Rachel <bb50305030@gmail.com>
* app cors test * function app version latest * function app version latest * function app version latest update validate * function app version latest update validate * function app version latest add supported resource --------- Co-authored-by: Rachel <bb50305030@gmail.com>
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
Added new policies for -
FunctionAppHttpVersionLatest - CKV_AZURE_67
and AppServiceDisallowCORS - CKV_AZURE_57
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: