René's URL Explorer Experiment


Title: Python: Improve some flow summaries by hvitved · Pull Request #22101 · github/codeql · GitHub

Open Graph Title: Python: Improve some flow summaries by hvitved · Pull Request #22101 · github/codeql

X Title: Python: Improve some flow summaries by hvitved · Pull Request #22101 · github/codeql

Description: This PR rewrites some Python flow summaries into equivalent* but much more performant summaries. Some summaries, like builtins.enumerate, could be rewritten directly by making use of existing ContentSets, while others, such as builtins.dict, required adding support for "with content". *The flow summary for builtins.zip has been generalized by removing the restriction that only the first two arguments are taken into account. DCA looks excellent; we reduce analysis time on dask__dask by 95 %, but also recover the performance on saltstack__salt that was originally lost on #21888 (note that the performance lost on that PR for ytdl-org__youtube-dl was already recovered in #21941).

Open Graph Description: This PR rewrites some Python flow summaries into equivalent* but much more performant summaries. Some summaries, like builtins.enumerate, could be rewritten directly by making use of existing Conte...

X Description: This PR rewrites some Python flow summaries into equivalent* but much more performant summaries. Some summaries, like builtins.enumerate, could be rewritten directly by making use of existing Conte...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7d2b22e6-bb3a-fa18-465f-5574f5a68b6f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9F7C:3C81B0:8C69B2:CCFA61:6A4E14D0
html-safe-noncee16c25d28ba201bb5ea64e587f01fc7c2eff6848f09d2b75a924a921d12e46f9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjdDOjNDODFCMDo4QzY5QjI6Q0NGQTYxOjZBNEUxNEQwIiwidmlzaXRvcl9pZCI6IjU0NTY0ODg2NjY5NDY3MzczNjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac45d185b3ccdfade4dd84bc92a495e7d6f71ae7765fc26f3b99dc79c29048d480
hovercard-subject-tagpull_request:3969739111
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/22101/files
twitter:imagehttps://avatars.githubusercontent.com/u/3667920?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3667920?s=400&v=4
og:image:altThis PR rewrites some Python flow summaries into equivalent* but much more performant summaries. Some summaries, like builtins.enumerate, could be rewritten directly by making use of existing Conte...
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/22101/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F22101%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%2F22101%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/22101/files
Reloadhttps://github.com/github/codeql/pull/22101/files
Reloadhttps://github.com/github/codeql/pull/22101/files
Please reload this pagehttps://github.com/github/codeql/pull/22101/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
hvitvedhttps://github.com/hvitved
github:mainhttps://github.com/github/codeql/tree/main
hvitved:python/flow-summaries-improvementshttps://github.com/hvitved/codeql/tree/python/flow-summaries-improvements
Conversation 4 https://github.com/github/codeql/pull/22101
Findings https://github.com/github/codeql/pull/22101/findings
Commits 2 https://github.com/github/codeql/pull/22101/commits
Checks 10 https://github.com/github/codeql/pull/22101/checks
Files changed https://github.com/github/codeql/pull/22101/files
Please reload this pagehttps://github.com/github/codeql/pull/22101/files
Python: Improve some flow summaries https://github.com/github/codeql/pull/22101/files#top
Show all changes 2 commits https://github.com/github/codeql/pull/22101/files
a5444b5 Python: Improve some flow summaries hvitved Jul 1, 2026 https://github.com/github/codeql/pull/22101/commits/a5444b573a0d0b339491be118fcff946844ef3b1
2bf6031 Python: Update inline test expectations hvitved Jul 1, 2026 https://github.com/github/codeql/pull/22101/commits/2bf6031c0f6208352ef03245e95bee56af9ca674
Clear filters https://github.com/github/codeql/pull/22101/files
Please reload this pagehttps://github.com/github/codeql/pull/22101/files
Please reload this pagehttps://github.com/github/codeql/pull/22101/files
DataFlowPrivate.qll https://github.com/github/codeql/pull/22101/files#diff-80716eaf55e2581b856950d844a39de74e7015eb05fb3fb56ea89662c13e56fd
FlowSummaryImpl.qll https://github.com/github/codeql/pull/22101/files#diff-41f888ada99236a27f15ae4705ad4e2e77c7e8c5594a4ea18369b578880fa727
Stdlib.qll https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
test_builtins.py https://github.com/github/codeql/pull/22101/files#diff-4f9ab2f77399d28d484a06a7bb20f05c7c89869bf6ac89bbdd705f2d8a1663e1
orm_tests.py https://github.com/github/codeql/pull/22101/files#diff-8434b84f2ad644d65931ae1a848c6fb570670b386713690cf086f07a25417b4d
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qllhttps://github.com/github/codeql/pull/22101/files#diff-80716eaf55e2581b856950d844a39de74e7015eb05fb3fb56ea89662c13e56fd
View file https://github.com/hvitved/codeql/blob/2bf6031c0f6208352ef03245e95bee56af9ca674/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22101/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22101/files#diff-80716eaf55e2581b856950d844a39de74e7015eb05fb3fb56ea89662c13e56fd
https://github.com/github/codeql/pull/22101/files#diff-80716eaf55e2581b856950d844a39de74e7015eb05fb3fb56ea89662c13e56fd
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qllhttps://github.com/github/codeql/pull/22101/files#diff-41f888ada99236a27f15ae4705ad4e2e77c7e8c5594a4ea18369b578880fa727
View file https://github.com/hvitved/codeql/blob/2bf6031c0f6208352ef03245e95bee56af9ca674/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22101/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22101/files#diff-41f888ada99236a27f15ae4705ad4e2e77c7e8c5594a4ea18369b578880fa727
https://github.com/github/codeql/pull/22101/files#diff-41f888ada99236a27f15ae4705ad4e2e77c7e8c5594a4ea18369b578880fa727
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/lib/semmle/python/frameworks/Stdlib.qllhttps://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
View file https://github.com/hvitved/codeql/blob/2bf6031c0f6208352ef03245e95bee56af9ca674/python/ql/lib/semmle/python/frameworks/Stdlib.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22101/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
owen-mchttps://github.com/owen-mc
Jul 1, 2026https://github.com/github/codeql/pull/22101/files#r3505446605
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/22101/files
hvitvedhttps://github.com/hvitved
Jul 1, 2026https://github.com/github/codeql/pull/22101/files#r3505551687
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/22101/files
owen-mchttps://github.com/owen-mc
Jul 1, 2026https://github.com/github/codeql/pull/22101/files#r3505988586
Please reload this pagehttps://github.com/github/codeql/pull/22101/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/22101/files
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/pull/22101/files#diff-cac9a82bbea79b64358a082adcd1d176aa565091e6c6391c3b61cbb1bf784971
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/test/library-tests/dataflow/coverage/test_builtins.pyhttps://github.com/github/codeql/pull/22101/files#diff-4f9ab2f77399d28d484a06a7bb20f05c7c89869bf6ac89bbdd705f2d8a1663e1
View file https://github.com/hvitved/codeql/blob/2bf6031c0f6208352ef03245e95bee56af9ca674/python/ql/test/library-tests/dataflow/coverage/test_builtins.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22101/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22101/files#diff-4f9ab2f77399d28d484a06a7bb20f05c7c89869bf6ac89bbdd705f2d8a1663e1
https://github.com/github/codeql/pull/22101/files#diff-4f9ab2f77399d28d484a06a7bb20f05c7c89869bf6ac89bbdd705f2d8a1663e1
https://github.com/github/codeql/blob/main/CODEOWNERS#L19
python/ql/test/library-tests/frameworks/django-orm/testapp/orm_tests.pyhttps://github.com/github/codeql/pull/22101/files#diff-8434b84f2ad644d65931ae1a848c6fb570670b386713690cf086f07a25417b4d
View file https://github.com/hvitved/codeql/blob/2bf6031c0f6208352ef03245e95bee56af9ca674/python/ql/test/library-tests/frameworks/django-orm/testapp/orm_tests.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22101/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22101/files#diff-8434b84f2ad644d65931ae1a848c6fb570670b386713690cf086f07a25417b4d
https://github.com/github/codeql/pull/22101/files#diff-8434b84f2ad644d65931ae1a848c6fb570670b386713690cf086f07a25417b4d
Please reload this pagehttps://github.com/github/codeql/pull/22101/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.