Skip to content

Comments

Adds CodeQL query to check for insecure RequestValidationMode in ASP.NET#2356

Merged
calumgrant merged 10 commits intogithub:masterfrom
cldrn:ASPNetRequestValidationMode
Dec 4, 2019
Merged

Adds CodeQL query to check for insecure RequestValidationMode in ASP.NET#2356
calumgrant merged 10 commits intogithub:masterfrom
cldrn:ASPNetRequestValidationMode

Conversation

@cldrn
Copy link
Contributor

@cldrn cldrn commented Nov 16, 2019

The requestValidationMode attribute in ASP.NET is used to configure built-in validations to protect applications against code injections. Downgrading or disabling this configuration is not recommended. The default value 4.5 is the only recommended value as previous versions only test a subset of requests.

This PR includes a CodeQL query to detect applications with insecure values for requestValidationMode:
https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.httpruntimesection.requestvalidationmode?view=netframework-4.8

@calumgrant calumgrant force-pushed the ASPNetRequestValidationMode branch from ef88084 to 5833b15 Compare November 28, 2019 10:06
@calumgrant
Copy link
Contributor

Hi Paulino, Many thanks for your contribution, we really appreciate it. As you may have seen, I have added a few more commits to this PR in order to get it production ready for final review. I think this way would be easiest, in particular because external contributors don't have all the tools needed to author tests - we are working on that feature.

@jf205
Copy link
Contributor

jf205 commented Nov 28, 2019

Hi @cldrn! I'll carry out a quick editorial review of the docs for this query later today.

Copy link
Contributor

@jf205 jf205 left a comment

Choose a reason for hiding this comment

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

Just a couple of docs suggestions from me 👍

cldrn and others added 4 commits November 29, 2019 22:38
…nMode.qhelp


built in to built-in

Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com>
…nMode.qhelp


Rephrasing.

Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com>
…nMode.qhelp


Missing comma.

Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com>
…nMode.ql


Added missing quotes.

Co-Authored-By: James Fletcher <42464962+jf205@users.noreply.github.com>
@cldrn
Copy link
Contributor Author

cldrn commented Nov 30, 2019

Thanks for the feedback and help!

calumgrant
calumgrant previously approved these changes Dec 2, 2019
…dationMode

# Conflicts:
#	change-notes/1.24/analysis-csharp.md
Copy link
Contributor

@calumgrant calumgrant left a comment

Choose a reason for hiding this comment

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

Changes LGTM.

@calumgrant calumgrant merged commit 73c8888 into github:master Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants