-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
C#: Add query for insecure certificate validation #16824
base: main
Are you sure you want to change the base?
C#: Add query for insecure certificate validation #16824
Conversation
Hello intrigus-lgtm 👋 In the meantime, feel free to make changes to the pull request. If you'd like to maximize payout for your this and future submissions, here are a few general guidelines, that we might take into consideration when reviewing a submission.
Please note that these are guidelines, not rules. Since we have a lot of different types of submissions, the guidelines might vary for each submission. Happy hacking! |
I would like to reduce FPs by doing something similar to Java: codeql/java/ql/lib/semmle/code/java/security/UnsafeHostnameVerificationQuery.qll Lines 80 to 104 in f9ae44c
But as far as I know, there is no equivalent library for C#. |
@intrigus-lgtm Greetings, it seems that this query has many FPs due to two reasons.
if (!settings.ConnectivitySettings.TlsVerifyCert)
handler.ServerCertificateCustomValidationCallback = delegate { return true; }; I will ping the codeql C# team and hopefully they can point you in the right direction. |
@github/codeql-csharp Hi team, this query is ready for review. If you could help intrigus in removing some FPs that would be great. |
@github/codeql-csharp Hi team, we hoping to finish up the last remaining CodeQL bounties so it would be great if we could get some feedback on this PR. Thanks |
Thank you for the contribution @intrigus-lgtm and all the reviewing of PRs that you are doing :-) The PR has not yet been set to "Ready for review". Are you expecting a review of the code as is or just some recommendations?
Have you attempted to write this is a data flow query instead of a path problem? (where sources are callables, lambdas etc that returns true and sinks are writes to |
Hi @michaelnebel,
We ask bounty submitters (you can see the bounty process here) to keep their PRs in draft so that the CodeQL team doesn't get ahead of our team, whose job is to view the results and assign a score based on the criticality of the issue the query finds. This is one of the last few bounty submissions since we closed the bug bounty program, so future PRs should be business as usual.
Yup, that what I was hoping to eliminate. Certain settings (like disabling ssl) are very common in test files or example projects, but we don't want to alert on those. |
Hi @intrigus-lgtm
I have added some comments to #17603 which needs to be addressed after the commits are cherry picked onto this PR. Once again, thank you very much for looking into this and I apologise for the slow feedback loop and let me know if you any questions whatsoever. |
Hmm, that's weird; I have "Allow edits and access to secrets by maintainers" enabled.
Thanks for adding sanitizers and using stubs. I'm not too familiar with how .NET works so I copied the use of DLLs from other tests^^ |
@intrigus-lgtm : Great! Do you have enough to continue from here or do you have any questions/concerns? |
I think I can continue from here, but I'm pretty busy, so expect a slow(er) response. |
Hi @intrigus-lgtm. Please could you move this PR into ready-for-review? We're wrapping up our bounty program, so we'd like to move this one forward so that we can complete the process as quickly as possible. Thanks! |
No description provided.