-
Notifications
You must be signed in to change notification settings - Fork 353
fix(query): fixed false positive for website with client certificate auth disabled and azure app service client certificate disabled #7537
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
Merged
cx-ricardo-jesus
merged 12 commits into
Checkmarx:master
from
cx-ricardo-jesus:fp_website_witch_client_certificate_auth_disabled_arm_http2_protocol
Jul 30, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cx-eduardo-semanas
previously approved these changes
Jul 14, 2025
Contributor
cx-eduardo-semanas
left a comment
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.
LGTM
…isabled_arm_http2_protocol
…isabled_arm_http2_protocol
cx-artur-ribeiro
approved these changes
Jul 25, 2025
Contributor
cx-artur-ribeiro
left a comment
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.
LGTM
cx-eduardo-semanas
approved these changes
Jul 29, 2025
Contributor
cx-eduardo-semanas
left a comment
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.
LGTM
…isabled_arm_http2_protocol
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reason for Proposed Changes
Website with Client Certificate Auth Disabled (ARM), currently return's a positive result however, it should not return this positive result if the application is using the HTTP/2 protocol(fieldsiteConfig.http20Enabledset totrue).Azure App Service Client Certificate Disabled, which is analog to the query that I mentioned on the first point and also return's a vulnerability when the client certificate is enabled but does not recognize thehttp2_enabledfield (if this field is set to true it should not return the vulnerability).Proposed Changes
not is_using_http2_protocol) that verifies if the resource has the HTTP/2 protocol set on true.is_using_http2_protocolauxiliar function that i created in order to do the verification, only checks, inside the properties of the resources, if they have a field calledhttp20Enabledset totrueand, if it that is the case it returns true.http20Enabledfield set totrue), it produces a positive result.negative3.bicep, has the fieldclientCertEnabledset tofalsewhich now, after the changes that i made should not return a vulnerability because it has also thehttp20Enabledfield set totrue.negative4.bicep, also has the fieldhttp20Enabledset totruebut, in this case, it does not have the propertyclientCertEnableddefined but, because is using the HTTP/2 protocol does not return a vulnerability.Azure App Service Client Certificate Disabledquery I only added two extra verification's to both first two policies that, check's if the HTTP/2 protocol is enabled and other verification using thehttp2_defined_to_falsehelper function which is only used to verify if thehttp2_enabledfield is defined and set to false, useful to return a different result on thekeyExpectedValueandkeyExpectedValueresult fields when the fieldsclient_cert_enabledandhttp2_enabledare both defined and set to true on the third new policy.client_cert_enabledset tofalseand the other negative test is with theclient_cert_enabledfield not defined and the HTTP/2 protocol enabled.client_cert_enabledandhttp2_enabledfield both defined and set to false.I submit this contribution under the Apache-2.0 license.