René's URL Explorer Experiment


Title: Java: Promote Unsafe certificate trust query from experimental by atorralba · Pull Request #6171 · github/codeql · GitHub

Open Graph Title: Java: Promote Unsafe certificate trust query from experimental by atorralba · Pull Request #6171 · github/codeql

X Title: Java: Promote Unsafe certificate trust query from experimental by atorralba · Pull Request #6171 · github/codeql

Description: PR to promote the Unsafe certificate trust query created in #3550 Changes Existing files were moved out of experimental The UnsafeCertTrust.qll file was created to contain most of the classes and predicates used by the query. Some classes that will probably be reusable by other queries were added to the Networking.qll and Encryption.qll libraries. The piece of logic that was handling flawed hostname verifications because of a missing (or wrong) SSL endpoint identification algorithm was refactored - now, a taint tracking configuration is used to properly detect established connections without a safe SSL configuration (see SslEndpointIdentificationFlowConfig). Changed tests to use InlineExpectationsTest and added some RabbitMQ stubs. Evaluation ➕ The following CVEs are now detected by the query: CVE-2020-11050 TooTallNate/Java-WebSocket@2dbe2d3 ✅ The following CVEs are still detected by the query: CVE-2018-17187 apache/qpid-proton-j@0cb8ca0 CVE-2018-11087 spring-projects/spring-amqp@444b74e CVE-2018-11775 apache/activemq@69fad2a ➡️ The following CVEs are now detected by the Insecure TrustManager query (#4879): CVE-2020-1929 apache/beam@a7dd23d ⚠️ The following CVEs are still not detected by the query: CVE-2018-10936 pgjdbc/pgjdbc@cdeeaca ❌ The following CVEs are no longer detected by the query: CVE-2018-8034 apache/tomcat@2835bb4. This is due to taint tracking now being used, and the flow being lost because of it crossing through a class field used in a nested class. To Consider The sources of SafeSslParametersFlowConfig are PostUpdateNodes because what characterizes them is the update done by setEndpointIdentificationAlgorithm. The predicate isSslSocket is an heuristic and could (probably) be improved. SslConnectionWithSafeSslParameters uses localFlow to add subsequent uses of the sanitizer. This is to correctly identify sanitizers that are added with the following pattern: SSLSocket socket = (SSLSocket) socketFactory.createSocket(); if (safe) { SSLParameters sslParameters = socket.getSSLParameters(); sslParameters.setEndpointIdentificationAlgorithm("HTTPS"); socket.setSSLParameters(sslParameters); } socket.getOutputStream(); where safe is a boolean that is (almost) always true (e.g. a configuration value that defaults to true, or something like socket instanceof SSLSocket). This is needed because the fix applied to several CVEs follows this pattern, e.g. a configuration value is added in order to give the user the option to revert to the old behavior (no forced hostname verification).

Open Graph Description: PR to promote the Unsafe certificate trust query created in #3550 Changes Existing files were moved out of experimental The UnsafeCertTrust.qll file was created to contain most of the classes and ...

X Description: PR to promote the Unsafe certificate trust query created in #3550 Changes Existing files were moved out of experimental The UnsafeCertTrust.qll file was created to contain most of the classes and ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:b6390807-a25d-1777-ddc3-73fe6f2b07e2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA588:1C6A96:4CE5A43:665B7CF:6A655792
html-safe-nonce951fdc1ba68666ce3b4c4b69367a3e66a3a3b9d8ff3728b536516073afcfde05
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTg4OjFDNkE5Njo0Q0U1QTQzOjY2NUI3Q0Y6NkE2NTU3OTIiLCJ2aXNpdG9yX2lkIjoiNTg2NDc5NDc4MzgyNDA0MTg3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4bc5185b02f8c8ed14df2bce1dd17e8df770e5d31b602048a04497450d5cd4fa
hovercard-subject-tagpull_request:679033775
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
twitter:imagehttps://avatars.githubusercontent.com/u/11612352?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/11612352?s=400&v=4
og:image:altPR to promote the Unsafe certificate trust query created in #3550 Changes Existing files were moved out of experimental The UnsafeCertTrust.qll file was created to contain most of the classes and ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release309153364422b3c499922d1a2a6404910a58ed8e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F6171%2Fcommits%2Fe842acf9e0da32247eb8cb5c3497f634af9207f1
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
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
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/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/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/enterprise/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%2F6171%2Fcommits%2Fe842acf9e0da32247eb8cb5c3497f634af9207f1
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%2Fcommits&source=header-repo&source_repo=github%2Fcodeql
Reloadhttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
Reloadhttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
Reloadhttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
Please reload this pagehttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
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.9k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Code https://github.com/github/codeql
Issues 995 https://github.com/github/codeql/issues
Pull requests 439 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
atorralbahttps://github.com/atorralba
github:mainhttps://github.com/github/codeql/tree/main
atorralba:atorralba/promote-unsafe-certificate-trusthttps://github.com/atorralba/codeql/tree/atorralba/promote-unsafe-certificate-trust
Conversation 37 https://github.com/github/codeql/pull/6171
Findings https://github.com/github/codeql/pull/6171/findings
Commits 26 https://github.com/github/codeql/pull/6171/commits
Checks 0 https://github.com/github/codeql/pull/6171/checks
Files changed https://github.com/github/codeql/pull/6171/files
Please reload this pagehttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
Java: Promote Unsafe certificate trust query from experimental https://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1#top
Show all changes 26 commits https://github.com/github/codeql/pull/6171/files
e0f4c73 Move from experimental atorralba Jun 21, 2021 https://github.com/github/codeql/pull/6171/commits/e0f4c73aedf5ae47e9d935477ac6eaacbdd5f22b
4313baf Big refactor: atorralba Jun 21, 2021 https://github.com/github/codeql/pull/6171/commits/4313baf6228885378fa85612ebd61a8581e97a19
02d0fa9 Minor changes in QLDocs and a sanitizer's type atorralba Jun 22, 2021 https://github.com/github/codeql/pull/6171/commits/02d0fa91889d5e34a451363dd2b790bc33aba5d6
e43fff2 Use InlineExpectationsTest atorralba Jun 22, 2021 https://github.com/github/codeql/pull/6171/commits/e43fff2d3026c10778969e6c68e83610af8f08fd
5d4cd70 Adjusted sources and sanitizer of UnsafeCertTrust taint tracking config atorralba Jun 22, 2021 https://github.com/github/codeql/pull/6171/commits/5d4cd70f8cdc9877abb0cac828f2b16a74179e62
e842acf Improve qhelp atorralba Jun 23, 2021 https://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
4508945 Fix assumption regarding when an SSLSocket does the TLS handhsake atorralba Jun 23, 2021 https://github.com/github/codeql/pull/6171/commits/4508945f85371bde2e31aee70d5fe741112cf1ae
64518bf Handle a specific pass-by-reference flow issue atorralba Jun 23, 2021 https://github.com/github/codeql/pull/6171/commits/64518bf91a32cb98bebe19ef9a049497400e9147
19d1a78 Generalize sanitizer using local flow atorralba Jun 23, 2021 https://github.com/github/codeql/pull/6171/commits/19d1a780cabff7b9a0d2b8463f84ed7b42ebf679
9e93aec Add spurious test case atorralba Jun 28, 2021 https://github.com/github/codeql/pull/6171/commits/9e93aecf756f028336ba034bc1e17185882448bd
5997b87 Add change note atorralba Jun 28, 2021 https://github.com/github/codeql/pull/6171/commits/5997b874de9321b5c9f5d270322136191b99d6a0
c24520c Adjust qhelp after rebase atorralba Jun 28, 2021 https://github.com/github/codeql/pull/6171/commits/c24520cb75d1e797a8e227476cdde528d8c16a49
68fe3dd Fix conflicts in experimental query atorralba Jun 28, 2021 https://github.com/github/codeql/pull/6171/commits/68fe3dd9f4120598b5d42d8d89550087f49f38b7
698fd64 Adjust test after rebase atorralba Jun 28, 2021 https://github.com/github/codeql/pull/6171/commits/698fd64f7f9e72ad1cf7345435d2896966175fb1
e9712f0 Add missing QLDoc atorralba Jun 29, 2021 https://github.com/github/codeql/pull/6171/commits/e9712f04a435831e418f1e966a2d0f10e97dcb62
999acb0 Improve qhelp references atorralba Jul 1, 2021 https://github.com/github/codeql/pull/6171/commits/999acb00213b2b039a86035b6346d32c669403a8
4d20710 Fix QLDoc atorralba Jul 1, 2021 https://github.com/github/codeql/pull/6171/commits/4d207101e274bdd0c62b82800be9623f01f4ee15
d9e98ce Consider setSslContextFactory and fix tests atorralba Jul 1, 2021 https://github.com/github/codeql/pull/6171/commits/d9e98ceaccb028df29e759edf49f6e23958e46b9
1e2a956 Remove unused stub atorralba Jul 1, 2021 https://github.com/github/codeql/pull/6171/commits/1e2a956a30afb263feb699b0f6729f79b18b7890
000a544 Decouple UnsafeCertTrust.qll to reuse the taint tracking configuration atorralba Jul 21, 2021 https://github.com/github/codeql/pull/6171/commits/000a5447298416ddd5e3d843e1a4f123d9077ca2
c16181d QLDocs atorralba Jul 21, 2021 https://github.com/github/codeql/pull/6171/commits/c16181dd2f9c944b4fe26908e2cffc1cb5ed49f9
9ffc5ab Update java/ql/src/semmle/code/java/security/UnsafeCertTrustQuery.qll atorralba Jul 26, 2021 https://github.com/github/codeql/pull/6171/commits/9ffc5ab1839decc10361f8d35e4fab9debe290dc
0302058 Apply suggestions from code review atorralba Jul 29, 2021 https://github.com/github/codeql/pull/6171/commits/03020582afb8c59c352d5591db9cd14697c227ac
101ad77 Move things around after rebase atorralba Nov 12, 2021 https://github.com/github/codeql/pull/6171/commits/101ad777e3430f0be2bc983d4564fffdf50b730d
e442e50 Apply suggestions from code review atorralba Jan 19, 2022 https://github.com/github/codeql/pull/6171/commits/e442e50e6becbc970cd34fcc6a4d640ca29f222d
695e77a Simplify isSslSocket predicate atorralba Jan 19, 2022 https://github.com/github/codeql/pull/6171/commits/695e77a21996fa77e8900093ad272506e9b6f911
Clear filters https://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
Please reload this pagehttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
Please reload this pagehttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
Prev https://github.com/github/codeql/pull/6171/commits/5d4cd70f8cdc9877abb0cac828f2b16a74179e62
Next https://github.com/github/codeql/pull/6171/commits/4508945f85371bde2e31aee70d5fe741112cf1ae
Please reload this pagehttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
https://github.com/atorralba
atorralbahttps://github.com/github/codeql/commits?author=atorralba
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/Security/CWE/CWE-273/UnsafeCertTrust.qhelphttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1#diff-c62c775281685dced293e347414baa5a119ddef53b56988b1fdf6be3026bd282
View file https://github.com/atorralba/codeql/blob/e842acf9e0da32247eb8cb5c3497f634af9207f1/java/ql/src/Security/CWE/CWE-273/UnsafeCertTrust.qhelp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/6171/commits/{{ revealButtonHref }}
https://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1#diff-c62c775281685dced293e347414baa5a119ddef53b56988b1fdf6be3026bd282
Please reload this pagehttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
Please reload this pagehttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
Please reload this pagehttps://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1
https://github.com/github/codeql/pull/6171/commits/e842acf9e0da32247eb8cb5c3497f634af9207f1#diff-c62c775281685dced293e347414baa5a119ddef53b56988b1fdf6be3026bd282
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.