-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add check for disabled CSRF protection in Spring #2586
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
Conversation
felicitymay
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.
Thanks for including a help file with your query. Generally it looks good but I've made a few suggestions with the aim of simplifying the English (shorter sentence) and clarifying a few things.
Fix the help according to review comments.
|
Thanks for reviewing this PR. I applied your suggestions. |
felicitymay
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.
Thanks for those changes. On re-reading the qhelp file, I realized that one of my suggestions had removed the context from the start of the Recommendation section. 😞
I've made a suggestion to fix this. Apart from this issue, the text looks ready to merge.
|
Could you also run autoformat on the QL code? (That's available in the right-click menu in VSCode) |
Fix help and correct formatting.
|
I corrected the help and formatted the QL code. |
felicitymay
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.
Thanks for correcting the help 😄
Spring has built-in CSRF protection. However, it's possible to disable it, which most likely makes the application vulnerable to Cross-Site Request Forgery (CWE-352).
Spring CSRF protection can be disabled via Java configuration (more details here):
This PR adds a CodeQL check which finds all invocations of
CsrfConfigurer.disable()method.