René's URL Explorer Experiment


Title: Add CWE-295 query for C# (accepting any TLS certificate) by Copilot · Pull Request #22019 · github/codeql · GitHub

Open Graph Title: Add CWE-295 query for C# (accepting any TLS certificate) by Copilot · Pull Request #22019 · github/codeql

X Title: Add CWE-295 query for C# (accepting any TLS certificate) by Copilot · Pull Request #22019 · github/codeql

Description: C# lacked a CWE-295 (Improper Certificate Validation) query that other languages already ship. This adds one detecting TLS/SSL certificate validation callbacks that trust every certificate, enabling machine-in-the-middle attacks. Query New cs/accept-any-certificate (Security Features/CWE-295/AcceptAnyCertificate.ql), a path-problem dataflow query. Source: a callback that always returns true — a lambda/anonymous method, a method-group reference to a method that always returns true, or HttpClientHandler.DangerousAcceptAnyServerCertificateValidator. Sink: a value used as a certificate validation callback — assigned to, or passed as an argument of, a delegate type returning bool with a System.Net.Security.SslPolicyErrors parameter. Covers RemoteCertificateValidationCallback (ServicePointManager, HttpWebRequest, SslStream) and HttpClientHandler.ServerCertificateCustomValidationCallback. Acceptance is determined structurally: every returned value is the constant true, so callbacks that inspect SslPolicyErrors are not flagged. Supporting files .qhelp with good/bad samples, and a newQuery change note. Query test under query-tests/Security Features/CWE-295/ covering inline lambdas, block bodies, method groups, SslStream, variable indirection, and the built-in dangerous validator, plus negative cases that perform real validation. // Flagged: trusts any certificate handler.ServerCertificateCustomValidationCallback = (request, certificate, chain, errors) => true; // Not flagged: only trusts when validation succeeds handler.ServerCertificateCustomValidationCallback = (request, certificate, chain, errors) => errors == SslPolicyErrors.None; The query resolves into the default csharp-code-scanning suite via its metadata.

Open Graph Description: C# lacked a CWE-295 (Improper Certificate Validation) query that other languages already ship. This adds one detecting TLS/SSL certificate validation callbacks that trust every certificate, enablin...

X Description: C# lacked a CWE-295 (Improper Certificate Validation) query that other languages already ship. This adds one detecting TLS/SSL certificate validation callbacks that trust every certificate, enablin...

Opengraph URL: https://github.com/github/codeql/pull/22019

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c13d69fb-98bd-39b4-27ac-dcce6454490c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9720:34ED9:794536:B1F33B:6A4E151F
html-safe-nonce14cde12c213b49f840abff89b3097b44abf747947ad0d9d74798bdc34d035ae9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzIwOjM0RUQ5Ojc5NDUzNjpCMUYzM0I6NkE0RTE1MUYiLCJ2aXNpdG9yX2lkIjoiMjE0NDQzNzU1MTYwMjk5NjUxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7a9726ccd9c7b518dcef9e68ad597e6421932fdf837715413d69a03f140275db
hovercard-subject-tagpull_request:3899264685
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codeql/pull/22019/files
twitter:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
og:image:altC# lacked a CWE-295 (Improper Certificate Validation) query that other languages already ship. This adds one detecting TLS/SSL certificate validation callbacks that trust every certificate, enablin...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql git https://github.com/github/codeql.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id143040428
octolytics-dimension-repository_nwogithub/codeql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143040428
octolytics-dimension-repository_network_root_nwogithub/codeql
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseea9187571e3edc5f2780f750631138669441ca50
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/22019/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F22019%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F22019%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fcodeql
Reloadhttps://github.com/github/codeql/pull/22019/files
Reloadhttps://github.com/github/codeql/pull/22019/files
Reloadhttps://github.com/github/codeql/pull/22019/files
Please reload this pagehttps://github.com/github/codeql/pull/22019/files
github https://github.com/github
codeqlhttps://github.com/github/codeql
Notifications https://github.com/login?return_to=%2Fgithub%2Fcodeql
Fork 2k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Star 9.8k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Code https://github.com/github/codeql
Issues 986 https://github.com/github/codeql/issues
Pull requests 426 https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality 0 https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Code https://github.com/github/codeql
Issues https://github.com/github/codeql/issues
Pull requests https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
Copilothttps://github.com/apps/copilot-swe-agent
mainhttps://github.com/github/codeql/tree/main
copilot/add-cwe-295-query-for-csharphttps://github.com/github/codeql/tree/copilot/add-cwe-295-query-for-csharp
Conversation 4 https://github.com/github/codeql/pull/22019
Findings https://github.com/github/codeql/pull/22019/findings
Commits 3 https://github.com/github/codeql/pull/22019/commits
Checks 15 https://github.com/github/codeql/pull/22019/checks
Files changed https://github.com/github/codeql/pull/22019/files
Please reload this pagehttps://github.com/github/codeql/pull/22019/files
Add CWE-295 query for C# (accepting any TLS certificate) https://github.com/github/codeql/pull/22019/files#top
Show all changes 3 commits https://github.com/github/codeql/pull/22019/files
677afff Add CWE-295 C# query for accepting any TLS certificate Copilot Jun 10, 2026 https://github.com/github/codeql/pull/22019/commits/677afff7af4f6f81ec23b9760a139ee89e04717b
3d9e8a2 Combine best of PR #1643: handle += compound assignment and ignore de… Copilot Jul 2, 2026 https://github.com/github/codeql/pull/22019/commits/3d9e8a2886ebf54126b415e940f62890a44c2517
c7cac96 Convert to inline expectations test owen-mc Jul 3, 2026 https://github.com/github/codeql/pull/22019/commits/c7cac9629bd242973da75be97eed1515dcfa7cef
Clear filters https://github.com/github/codeql/pull/22019/files
Please reload this pagehttps://github.com/github/codeql/pull/22019/files
Please reload this pagehttps://github.com/github/codeql/pull/22019/files
AcceptAnyCertificate.cs https://github.com/github/codeql/pull/22019/files#diff-23d8f4ac16a497baabc2931632ab733c91d8307b780a1e645f1cb4a57c3e2a09
AcceptAnyCertificate.qhelp https://github.com/github/codeql/pull/22019/files#diff-9429396b38d20e0366a1fe6e9b2ee83a3121e8d976559a77143ae7b81fccc405
AcceptAnyCertificate.ql https://github.com/github/codeql/pull/22019/files#diff-297d95da3eefbb85193544aa676038154650fb643612987681c9642490be4880
2026-06-10-accept-any-certificate.md https://github.com/github/codeql/pull/22019/files#diff-1b5c56c03928f80c9f32fa062ab647faab8e5f349c380f061646d30c51c2155a
AcceptAnyCertificate.expected https://github.com/github/codeql/pull/22019/files#diff-cc645514d835db9a6208668b23946d4a8863b59619b4a879ec68134c0fcd567d
AcceptAnyCertificate.qlref https://github.com/github/codeql/pull/22019/files#diff-2fd828657fea00d2b7fb8af135cca3c5ef031855751025b89e83203af0d630ca
Test.cs https://github.com/github/codeql/pull/22019/files#diff-9d27d9c6f4febbb24c2596ca57a2ad79943a32da5e21e16d08f16c481e14f697
options https://github.com/github/codeql/pull/22019/files#diff-dbf0a0a4d8d673081f2942e1972efcc9013dc20e98da08d922e46a5b88560c4d
https://github.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/src/Security Features/CWE-295/AcceptAnyCertificate.cshttps://github.com/github/codeql/pull/22019/files#diff-23d8f4ac16a497baabc2931632ab733c91d8307b780a1e645f1cb4a57c3e2a09
View file https://github.com/github/codeql/blob/c7cac9629bd242973da75be97eed1515dcfa7cef/csharp/ql/src/Security%20Features/CWE-295/AcceptAnyCertificate.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22019/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/src/Security Features/CWE-295/AcceptAnyCertificate.qhelphttps://github.com/github/codeql/pull/22019/files#diff-9429396b38d20e0366a1fe6e9b2ee83a3121e8d976559a77143ae7b81fccc405
View file https://github.com/github/codeql/blob/c7cac9629bd242973da75be97eed1515dcfa7cef/csharp/ql/src/Security%20Features/CWE-295/AcceptAnyCertificate.qhelp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22019/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/src/Security Features/CWE-295/AcceptAnyCertificate.qlhttps://github.com/github/codeql/pull/22019/files#diff-297d95da3eefbb85193544aa676038154650fb643612987681c9642490be4880
View file https://github.com/github/codeql/blob/c7cac9629bd242973da75be97eed1515dcfa7cef/csharp/ql/src/Security%20Features/CWE-295/AcceptAnyCertificate.ql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22019/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/src/change-notes/2026-06-10-accept-any-certificate.mdhttps://github.com/github/codeql/pull/22019/files#diff-1b5c56c03928f80c9f32fa062ab647faab8e5f349c380f061646d30c51c2155a
View file https://github.com/github/codeql/blob/c7cac9629bd242973da75be97eed1515dcfa7cef/csharp/ql/src/change-notes/2026-06-10-accept-any-certificate.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22019/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L7
.../query-tests/Security Features/CWE-295/AcceptAnyCertificate/AcceptAnyCertificate.expectedhttps://github.com/github/codeql/pull/22019/files#diff-cc645514d835db9a6208668b23946d4a8863b59619b4a879ec68134c0fcd567d
View file https://github.com/github/codeql/blob/c7cac9629bd242973da75be97eed1515dcfa7cef/csharp/ql/test/query-tests/Security%20Features/CWE-295/AcceptAnyCertificate/AcceptAnyCertificate.expected
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22019/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L7
...est/query-tests/Security Features/CWE-295/AcceptAnyCertificate/AcceptAnyCertificate.qlrefhttps://github.com/github/codeql/pull/22019/files#diff-2fd828657fea00d2b7fb8af135cca3c5ef031855751025b89e83203af0d630ca
View file https://github.com/github/codeql/blob/c7cac9629bd242973da75be97eed1515dcfa7cef/csharp/ql/test/query-tests/Security%20Features/CWE-295/AcceptAnyCertificate/AcceptAnyCertificate.qlref
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22019/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/test/query-tests/Security Features/CWE-295/AcceptAnyCertificate/Test.cshttps://github.com/github/codeql/pull/22019/files#diff-9d27d9c6f4febbb24c2596ca57a2ad79943a32da5e21e16d08f16c481e14f697
View file https://github.com/github/codeql/blob/c7cac9629bd242973da75be97eed1515dcfa7cef/csharp/ql/test/query-tests/Security%20Features/CWE-295/AcceptAnyCertificate/Test.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22019/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/test/query-tests/Security Features/CWE-295/AcceptAnyCertificate/optionshttps://github.com/github/codeql/pull/22019/files#diff-dbf0a0a4d8d673081f2942e1972efcc9013dc20e98da08d922e46a5b88560c4d
View file https://github.com/github/codeql/blob/c7cac9629bd242973da75be97eed1515dcfa7cef/csharp/ql/test/query-tests/Security%20Features/CWE-295/AcceptAnyCertificate/options
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22019/{{ revealButtonHref }}
Please reload this pagehttps://github.com/github/codeql/pull/22019/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.