Skip to content

C#: HttpOnly and Secure cookie queries #5579

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
merged 16 commits into from Aug 9, 2021
Merged

C#: HttpOnly and Secure cookie queries #5579

merged 16 commits into from Aug 9, 2021

Conversation

ghost
Copy link

@ghost ghost commented Mar 31, 2021

Reworks Secure cookie detection for asp.net. Adds HttpOnly attribute check. Adds both attributes and various callbacks and policy settings support for asp.net core.

Copy link
Contributor

@tamasvajk tamasvajk left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution. I've added some comments inline. Also, can I ask you to merge the similar checks to Require HttpOnly and Require SSL respectively? I think it would be a lot cleaner for an end-user to have a single check than having 4 seperate queries:

  • httponly is set to false in asp.net
  • httponly is set to false in asp.net core
  • httponly is not set, and therefore has its default value false in asp.net
  • httponly is not set, and therefore has its default value false in asp.net core

for different variations of the same vulnerability.

@ghost
Copy link
Author

ghost commented Apr 14, 2021

I thought it would be easier to maintain and drop legacy .NET queries when needed. Anyway, here we go - single queries.

@ghost ghost requested a review from tamasvajk April 15, 2021 08:59
@ghost
Copy link
Author

ghost commented Apr 22, 2021

Ping

Copy link
Contributor

@tamasvajk tamasvajk left a comment

Choose a reason for hiding this comment

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

Sorry for the long waiting time. I've added some minor change requests. And in the meantime, I'm submitting the two queries to the Security Lab team for further review.

@ghost ghost requested a review from tamasvajk April 27, 2021 18:40
@ghost
Copy link
Author

ghost commented May 24, 2021

Is there anything I need to do?

@tamasvajk
Copy link
Contributor

@edvraa Sorry for the delay. @hvitved is going to have a final look at this PR too.

@hvitved hvitved added the no-change-note-required This PR does not need a change note label Jun 16, 2021
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

A few minor comments, otherwise LGTM.

@ghost ghost dismissed a stale review via 40e8a90 July 11, 2021 23:10
@ghost
Copy link
Author

ghost commented Jul 11, 2021

Rebased the pull request on top of main. Only the the last two commits are new. Please review.

@ghost ghost requested a review from hvitved July 11, 2021 23:12
hvitved
hvitved previously approved these changes Jul 14, 2021
@ghost
Copy link
Author

ghost commented Jul 26, 2021

Ping

@hvitved
Copy link
Contributor

hvitved commented Aug 2, 2021

AuthCookie.qll does not appear to be properly auto-formatted.

@ghost ghost requested a review from hvitved August 4, 2021 11:08
@hvitved hvitved removed the request for review from tamasvajk August 5, 2021 09:30
@tamasvajk tamasvajk merged commit c1cf2a1 into github:main Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# documentation no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants