René's URL Explorer Experiment


Title: Python: add new shared-SSA-backed SSA adapter (additive) by yoff · Pull Request #21923 · github/codeql · GitHub

Open Graph Title: Python: add new shared-SSA-backed SSA adapter (additive) by yoff · Pull Request #21923 · github/codeql

X Title: Python: add new shared-SSA-backed SSA adapter (additive) by yoff · Pull Request #21923 · github/codeql

Description: Summary Preparatory refactor for the shared-CFG dataflow migration (#21894). Based on #21921 — merge that first. Adds the new Python SSA adapter additively, without changing any production behaviour. Library addition semmle.python.dataflow.new.internal.SsaImpl — Python SSA implementation built on the new (shared) CFG. Mirrors the Java SSA adapter at java/ql/lib/semmle/code/java/dataflow/internal/SsaImpl.qll: an InputSig is defined in terms of positional (BasicBlock, int) variable references, and the shared codeql.ssa.Ssa::Make module is then instantiated. SourceVariable is the AST-level Py::Variable. Variable references are looked up via the new CFG facade's NameNode.defines/uses/deletes predicates (added in the preceding PR), which themselves are one-line bridges to AST-level Name.defines/uses/deletes. Implicit-entry definitions are inserted for non-local/global/builtin reads, captured variables, and (when needed) parameters. Test additions library-tests/dataflow-new-ssa/ — exercises the new SSA over a representative test corpus and checks expected def/use chains. library-tests/dataflow-new-ssa-vs-legacy/ — runs both new SSA and legacy ESSA over the same corpus and diffs the results, so any semantic divergence shows up as a test failure. Production impact None. The new SSA adapter has zero callers in lib/ and src/ — the legacy ESSA SSA (semmle/python/essa/*) remains the default. The dataflow library is not migrated yet; that lands in #21894 (which will shrink considerably once this stack merges). Verification All 367 lib/ + src/ + consistency-queries/ queries compile clean. All 641 ControlFlow + PointsTo + dataflow + essa + consistency library-tests pass. Both new dataflow-new-ssa[/vs-legacy] test packs pass. Notes for reviewers SsaImpl.qll is the only non-test addition; ~290 LOC. Mostly the InputSig glue + the implicit-entry-definition logic. The vs-legacy test is the easiest way to spot semantic differences: any new divergence will show up as a diff in CmpTest.expected.

Open Graph Description: Summary Preparatory refactor for the shared-CFG dataflow migration (#21894). Based on #21921 — merge that first. Adds the new Python SSA adapter additively, without changing any production behaviou...

X Description: Summary Preparatory refactor for the shared-CFG dataflow migration (#21894). Based on #21921 — merge that first. Adds the new Python SSA adapter additively, without changing any production behaviou...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f60a47ad-ab69-a2c4-498e-25039b52b7db
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id84D6:37ACD:1E94DDA:29FA5E6:6A4EC56D
html-safe-nonce41125c56a1d25b5bd1f7303c65b58dbd7881385f82c129138473346b52555bba
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEQ2OjM3QUNEOjFFOTREREE6MjlGQTVFNjo2QTRFQzU2RCIsInZpc2l0b3JfaWQiOiI2MDA4NjkwMjI4NDg2NjUzMjkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac03c992d43d19f498e2b147579bc8d9b933245061fd7a0fb53069b69e6b2ea6fb
hovercard-subject-tagpull_request:3780780626
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/21923/files
twitter:imagehttps://avatars.githubusercontent.com/u/647347?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/647347?s=400&v=4
og:image:altSummary Preparatory refactor for the shared-CFG dataflow migration (#21894). Based on #21921 — merge that first. Adds the new Python SSA adapter additively, without changing any production behaviou...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c
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
releasee6a744804e8e70f97b4d5a18a94dcc63db22f97a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/21923/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F21923%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%2F21923%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/21923/files
Reloadhttps://github.com/github/codeql/pull/21923/files
Reloadhttps://github.com/github/codeql/pull/21923/files
Please reload this pagehttps://github.com/github/codeql/pull/21923/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 423 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
yoffhttps://github.com/yoff
yoff/python-add-new-cfg-libraryhttps://github.com/github/codeql/tree/yoff/python-add-new-cfg-library
yoff/python-add-new-ssahttps://github.com/github/codeql/tree/yoff/python-add-new-ssa
Conversation 7 https://github.com/github/codeql/pull/21923
Findings https://github.com/github/codeql/pull/21923/findings
Commits 1 https://github.com/github/codeql/pull/21923/commits
Checks 6 https://github.com/github/codeql/pull/21923/checks
Files changed 8 https://github.com/github/codeql/pull/21923/files
Python: add new shared-SSA-backed SSA adapter (additive) https://github.com/github/codeql/pull/21923/files#top
Show all changes 1 commit https://github.com/github/codeql/pull/21923/files
aec819f Python: add new shared-SSA-backed SSA adapter Copilot Jun 1, 2026 https://github.com/github/codeql/pull/21923/commits/aec819f3c94c8975842778ec5fcf52bd9319fd69
Clear filters https://github.com/github/codeql/pull/21923/files
Please reload this pagehttps://github.com/github/codeql/pull/21923/files
Please reload this pagehttps://github.com/github/codeql/pull/21923/files
2026-05-19-add-shared-ssa.md https://github.com/github/codeql/pull/21923/files#diff-1d0f30b727425a8d38ce0375c342f600931555c12ae54c9687e96f6359e8c639
SsaImpl.qll https://github.com/github/codeql/pull/21923/files#diff-db0b64bd620397d7e34a7209f5e7776bad0e65b7e1e4113a1dd61709fa5d0e30
CmpTest.expected https://github.com/github/codeql/pull/21923/files#diff-7782657f83bd4633a894ae324894e6a6d90b9b19d11ccf89bc931ac11aa37194
CmpTest.ql https://github.com/github/codeql/pull/21923/files#diff-59dfd431346e9be2f7d47b143833d9afcac802de5934c31cf5203f46fe2b2b69
test.py https://github.com/github/codeql/pull/21923/files#diff-52ebd099784330239a7492196cd997fde8fdaf3ac77e463ae7ffdc28d16fdac3
SsaTest.expected https://github.com/github/codeql/pull/21923/files#diff-03da5f7ac2acbccfd46e0acbe0cd22d03520ed858d6c0e137f0fa909ecbc635a
SsaTest.ql https://github.com/github/codeql/pull/21923/files#diff-246975f784833d60b5236fc7f2309c09c6cef0961f5f8da7cee4934bcbb1986c
test.py https://github.com/github/codeql/pull/21923/files#diff-dd3e05f287bfc0f58a9013b77fc3e39c56491d9596608371c66408fff9970c62
https://github.com/github/codeql/blob/yoff/python-add-new-cfg-library/CODEOWNERS#L19
python/ql/lib/change-notes/2026-05-19-add-shared-ssa.mdhttps://github.com/github/codeql/pull/21923/files#diff-1d0f30b727425a8d38ce0375c342f600931555c12ae54c9687e96f6359e8c639
View file https://github.com/github/codeql/blob/aec819f3c94c8975842778ec5fcf52bd9319fd69/python/ql/lib/change-notes/2026-05-19-add-shared-ssa.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/21923/{{ revealButtonHref }}
aschackmullhttps://github.com/aschackmull
Jul 8, 2026https://github.com/github/codeql/pull/21923/files#r3543148244
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/21923/files
Please reload this pagehttps://github.com/github/codeql/pull/21923/files
Please reload this pagehttps://github.com/github/codeql/pull/21923/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.