René's URL Explorer Experiment


Title: Support approximate related locations by asgerf · Pull Request #19943 · github/codeql · GitHub

Open Graph Title: Support approximate related locations by asgerf · Pull Request #19943 · github/codeql

X Title: Support approximate related locations by asgerf · Pull Request #19943 · github/codeql

Description: Some queries could not be made diff-informed because they select an entity whose location is not a Location. Specifically this is true for the RegExpTerms inside a regular expression. This PR addresses this by adding the ability to filter based on a location containing the final selected location. We then filter based on the location of the entire RegExp literal, which is valid because it encloses the location of all its terms. Unfortunately the Ruby query still can't be made diff-informed because the locations of its RegExpTerms aren't correct when the regexp is parsed from a string arising from constant folding. But it fixes it for Python and Java. Initially in this PR the approximate location filtering was opt-in via a separate API, but after discussing with @jbj it is then made the default in a later commit.

Open Graph Description: Some queries could not be made diff-informed because they select an entity whose location is not a Location. Specifically this is true for the RegExpTerms inside a regular expression. This PR addre...

X Description: Some queries could not be made diff-informed because they select an entity whose location is not a Location. Specifically this is true for the RegExpTerms inside a regular expression. This PR addre...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:940b12f1-1112-cbc4-dc22-8c201c952779
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC7DA:18FB30:456242:5DC633:6A580308
html-safe-noncef35d8c27248b407bd756df5c1e53e94da0b434383e271549690c67702a8535fc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0RBOjE4RkIzMDo0NTYyNDI6NURDNjMzOjZBNTgwMzA4IiwidmlzaXRvcl9pZCI6Ijg5ODkyOTc4MTk5NTA1MTQ5NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac67d04b23f5470d85153a495bfe935c0858d9ad3132ffd853ea52cb4ebca173bf
hovercard-subject-tagpull_request:2632380639
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/19943/files
twitter:imagehttps://avatars.githubusercontent.com/u/316427?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/316427?s=400&v=4
og:image:altSome queries could not be made diff-informed because they select an entity whose location is not a Location. Specifically this is true for the RegExpTerms inside a regular expression. This PR addre...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None49c8c15fabcbf356d607a90ca115c13b273e42ff8b74155de050fd229a9b0121
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
release3fb1f684e7a833eb1b2d01d39875a2b52cb4fe9b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/19943/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F19943%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/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%2F19943%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/19943/files
Reloadhttps://github.com/github/codeql/pull/19943/files
Reloadhttps://github.com/github/codeql/pull/19943/files
Please reload this pagehttps://github.com/github/codeql/pull/19943/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 991 https://github.com/github/codeql/issues
Pull requests 430 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
jbjhttps://github.com/jbj
github:mainhttps://github.com/github/codeql/tree/main
asgerf:approximate-related-locationhttps://github.com/asgerf/codeql/tree/approximate-related-location
Conversation 9 https://github.com/github/codeql/pull/19943
Findings https://github.com/github/codeql/pull/19943/findings
Commits 11 https://github.com/github/codeql/pull/19943/commits
Checks 32 https://github.com/github/codeql/pull/19943/checks
Files changed https://github.com/github/codeql/pull/19943/files
Please reload this pagehttps://github.com/github/codeql/pull/19943/files
Support approximate related locations https://github.com/github/codeql/pull/19943/files#top
Show all changes 11 commits https://github.com/github/codeql/pull/19943/files
d1b4172 Shared: Factor out some helper predicates in alert filtering asgerf Jul 1, 2025 https://github.com/github/codeql/pull/19943/commits/d1b4172486960613b91421183d5f7e32d9ae76c2
8b34551 Shared: Add approximate version of getASelected{Source,Sink}Location asgerf Jul 1, 2025 https://github.com/github/codeql/pull/19943/commits/8b345518f4f2dc3cdcdcb9a9339a0b3ea2175536
d65da1f Ruby: enable for PolyReDos but document why it still doesnt work asgerf Jul 1, 2025 https://github.com/github/codeql/pull/19943/commits/d65da1f8a1bc92966c5ac1e6a67cc9a2d4f59233
a46b5f9 Python: enable diff-informedness for poly redos using approximate rel… asgerf Jul 1, 2025 https://github.com/github/codeql/pull/19943/commits/a46b5f9529e7cffb7cd1ceacdbbc766c7630362c
82d190f Java: use approximate related sink locations in polynomial redos asgerf Jul 1, 2025 https://github.com/github/codeql/pull/19943/commits/82d190f4bf298423b26bf9f2729e534d275638f4
4a2d795 Shared: Make approximate location filtering the default behaviour asgerf Jul 2, 2025 https://github.com/github/codeql/pull/19943/commits/4a2d7950760f783441057970f2b1f62b6c029336
bb45d06 Merge branch 'main' into approximate-related-location asgerf Jul 3, 2025 https://github.com/github/codeql/pull/19943/commits/bb45d0632b6672ceb4cd7864162c16e575c4c213
f1e9f0e Shared: improve join order in filterByLocation jbj Jul 9, 2025 https://github.com/github/codeql/pull/19943/commits/f1e9f0e323cf070dd20e3457ec6dc5d2d5bcdc3c
0d7a842 Shared: improve documentation in AlertFiltering jbj Jul 9, 2025 https://github.com/github/codeql/pull/19943/commits/0d7a842e2feb92462cb53de185e51e64e5bf1aa7
5a1246a Merge remote-tracking branch 'upstream/main' into approximate-related… jbj Jul 9, 2025 https://github.com/github/codeql/pull/19943/commits/5a1246a58682aa4a37b80947833c3b541f757ef9
3ffda2f Shared: Overhaul the AlertFiltering QLDoc jbj Jul 9, 2025 https://github.com/github/codeql/pull/19943/commits/3ffda2f341bdcc8e7337a076701473a3cd870568
Clear filters https://github.com/github/codeql/pull/19943/files
Please reload this pagehttps://github.com/github/codeql/pull/19943/files
Please reload this pagehttps://github.com/github/codeql/pull/19943/files
PolynomialReDoSQuery.qll https://github.com/github/codeql/pull/19943/files#diff-5c173c94ad1d9dd69ff77e8bcbf291cf76a2b60baf7389da499e77e3b4e74c35
PolynomialReDoSQuery.qll https://github.com/github/codeql/pull/19943/files#diff-6e44ed00cefdfe5ebda40562f7fc767e3fff55a64c448ad9dca7be123f430b10
PolynomialReDoSQuery.qll https://github.com/github/codeql/pull/19943/files#diff-1998e3dd797d578a73784d6a27da7bc8464fc59b3763599aff946656c0191116
AlertFiltering.qll https://github.com/github/codeql/pull/19943/files#diff-408f67e35f0cbb44108659897cee9c4cfce82a07ead7128a8794c56a9607aae7
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qllhttps://github.com/github/codeql/pull/19943/files#diff-5c173c94ad1d9dd69ff77e8bcbf291cf76a2b60baf7389da499e77e3b4e74c35
View file https://github.com/asgerf/codeql/blob/3ffda2f341bdcc8e7337a076701473a3cd870568/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/19943/{{ revealButtonHref }}
https://github.com/github/codeql/pull/19943/files#diff-5c173c94ad1d9dd69ff77e8bcbf291cf76a2b60baf7389da499e77e3b4e74c35
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSQuery.qllhttps://github.com/github/codeql/pull/19943/files#diff-6e44ed00cefdfe5ebda40562f7fc767e3fff55a64c448ad9dca7be123f430b10
View file https://github.com/asgerf/codeql/blob/3ffda2f341bdcc8e7337a076701473a3cd870568/python/ql/lib/semmle/python/security/dataflow/PolynomialReDoSQuery.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/19943/{{ revealButtonHref }}
https://github.com/github/codeql/pull/19943/files#diff-6e44ed00cefdfe5ebda40562f7fc767e3fff55a64c448ad9dca7be123f430b10
https://github.com/github/codeql/pull/19943/files#diff-6e44ed00cefdfe5ebda40562f7fc767e3fff55a64c448ad9dca7be123f430b10
https://github.com/github/codeql/blob/main/CODEOWNERS#L22
ruby/ql/lib/codeql/ruby/security/regexp/PolynomialReDoSQuery.qllhttps://github.com/github/codeql/pull/19943/files#diff-1998e3dd797d578a73784d6a27da7bc8464fc59b3763599aff946656c0191116
View file https://github.com/asgerf/codeql/blob/3ffda2f341bdcc8e7337a076701473a3cd870568/ruby/ql/lib/codeql/ruby/security/regexp/PolynomialReDoSQuery.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/19943/{{ revealButtonHref }}
https://github.com/github/codeql/pull/19943/files#diff-1998e3dd797d578a73784d6a27da7bc8464fc59b3763599aff946656c0191116
https://github.com/github/codeql/pull/19943/files#diff-1998e3dd797d578a73784d6a27da7bc8464fc59b3763599aff946656c0191116
https://github.com/github/codeql/blob/main/CODEOWNERS#L26
shared/util/codeql/util/AlertFiltering.qllhttps://github.com/github/codeql/pull/19943/files#diff-408f67e35f0cbb44108659897cee9c4cfce82a07ead7128a8794c56a9607aae7
View file https://github.com/asgerf/codeql/blob/3ffda2f341bdcc8e7337a076701473a3cd870568/shared/util/codeql/util/AlertFiltering.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/19943/{{ revealButtonHref }}
https://github.com/github/codeql/pull/19943/files#diff-408f67e35f0cbb44108659897cee9c4cfce82a07ead7128a8794c56a9607aae7
hvitvedhttps://github.com/hvitved
Jul 10, 2025https://github.com/github/codeql/pull/19943/files#r2197529270
Please reload this pagehttps://github.com/github/codeql/pull/19943/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/19943/files
jbjhttps://github.com/jbj
Jul 11, 2025https://github.com/github/codeql/pull/19943/files#r2199920574
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/19943/files
hvitvedhttps://github.com/hvitved
Jul 11, 2025https://github.com/github/codeql/pull/19943/files#r2199966029
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/19943/files
jbjhttps://github.com/jbj
Jul 11, 2025https://github.com/github/codeql/pull/19943/files#r2199986225
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
that were made a while agohttps://github.com/github/codeql-action/pull/2765
Please reload this pagehttps://github.com/github/codeql/pull/19943/files
hvitvedhttps://github.com/hvitved
Jul 11, 2025https://github.com/github/codeql/pull/19943/files#r2199993608
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/19943/files
https://github.com/github/codeql/pull/19943/files#diff-408f67e35f0cbb44108659897cee9c4cfce82a07ead7128a8794c56a9607aae7
https://github.com/github/codeql/pull/19943/files#diff-408f67e35f0cbb44108659897cee9c4cfce82a07ead7128a8794c56a9607aae7
https://github.com/github/codeql/pull/19943/files#diff-408f67e35f0cbb44108659897cee9c4cfce82a07ead7128a8794c56a9607aae7
Please reload this pagehttps://github.com/github/codeql/pull/19943/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.