René's URL Explorer Experiment


Title: Python: Model complementary MCP AST handler parameters as ai sources by Tito0015 · Pull Request #22750 · github/codeql · GitHub

Open Graph Title: Python: Model complementary MCP AST handler parameters as ai sources by Tito0015 · Pull Request #22750 · github/codeql

X Title: Python: Model complementary MCP AST handler parameters as ai sources by Tito0015 · Pull Request #22750 · github/codeql

Description: Summary This PR provides complementary native QL AST modeling for Python MCP and fastmcp handlers that still fall outside the API-graph baseline in Mcp.qll after #22703. Context & Positioning Following #22822 (legacy queries accept ActiveThreatModelSource), #22703 (now merged) models standard MCP/fastmcp handler parameters and transport sources via QL + MaD. This PR adds the remaining programmatic edge cases only, deduplicated with not isClientParameter(...). Handlers that MaD / the baseline still miss include: Stacked custom project decorators (e.g. @custom_telemetry above @mcp.tool()), via getADecorator(). Nested instance registrations (e.g. @self.mcp.tool()). @staticmethod MCP tools where the first parameter must not be treated as self. The complementary class McpHandlerParameter extends ThreatModelSource::Range with threat-model kind ai and source type MCP server handler parameter (baseline uses MCP handler parameter). Context parameters are excluded using the upstream isContextAnnotation() logic. Testing Merged upstream/main. Local test python/ql/test/library-tests/dataflow/remote-flow-sources/ passes (complementary sources only).

Open Graph Description: Summary This PR provides complementary native QL AST modeling for Python MCP and fastmcp handlers that still fall outside the API-graph baseline in Mcp.qll after #22703. Context & Positioning F...

X Description: Summary This PR provides complementary native QL AST modeling for Python MCP and fastmcp handlers that still fall outside the API-graph baseline in Mcp.qll after #22703. Context & Positioni...

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:3dcb20dc-93a5-a9a4-a0f4-d3ed3a4eb22c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD634:3E754C:21B2021:2C9F394:6AF98F1F
html-safe-nonce708cc3cc23790f851e5af4a6e85543d0005857568ce51a8de46c4918b1fb48de
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjM0OjNFNzU0QzoyMUIyMDIxOjJDOUYzOTQ6NkFGOThGMUYiLCJ2aXNpdG9yX2lkIjoiMjgxNDc4NTQ4MTU1NDM2NjIzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc8c745d4b9b2c66508c131a6ef0df6d1e765e050a552fc4f313bb8a02a34e54d
hovercard-subject-tagpull_request:4732186805
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/22750/files
twitter:imagehttps://avatars.githubusercontent.com/u/74791610?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/74791610?s=400&v=4
og:image:altSummary This PR provides complementary native QL AST modeling for Python MCP and fastmcp handlers that still fall outside the API-graph baseline in Mcp.qll after #22703. Context & Positioning F...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
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
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/22750/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F22750%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F22750%2Ffiles
Sign uphttps://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/22750/files
Reloadhttps://github.com/github/codeql/pull/22750/files
Reloadhttps://github.com/github/codeql/pull/22750/files
githubhttps://github.com/github
codeqlhttps://github.com/github/codeql
Codehttps://github.com/github/codeql
Issues1k (1k)https://github.com/github/codeql/issues
Pull requests516 (516)https://github.com/github/codeql/pulls
Discussionshttps://github.com/github/codeql/discussions
Actionshttps://github.com/github/codeql/actions
Projectshttps://github.com/github/codeql/projects
Security and qualityhttps://github.com/github/codeql/security
Insightshttps://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
Tito0015https://github.com/Tito0015
github:mainhttps://github.com/github/codeql/tree/main
Tito0015:feature/python-mcp-remote-sourceshttps://github.com/Tito0015/codeql/tree/feature/python-mcp-remote-sources
Conversation 25 https://github.com/github/codeql/pull/22750
Commits 7 https://github.com/github/codeql/pull/22750/commits
Checks 1 https://github.com/github/codeql/pull/22750/checks
Findings https://github.com/github/codeql/pull/22750/findings
Files changed https://github.com/github/codeql/pull/22750/files
Please reload this pagehttps://github.com/github/codeql/pull/22750/files
Python: Model complementary MCP AST handler parameters as ai sources https://github.com/github/codeql/pull/22750/files#top
Show all changes 7 commits https://github.com/github/codeql/pull/22750/files
5e30bf2 Python: model MCP and FastMCP server handler parameters as remote flo… Tito0015 Oct 4, 2026 https://github.com/github/codeql/pull/22750/commits/5e30bf27732527f4e13e37c4a0a0b4ba3bc8e475
d0a798c Python: restrict MCP remote sources to stacked and instance handlers Tito0015 Oct 15, 2026 https://github.com/github/codeql/pull/22750/commits/d0a798cf100de1a9bf765dd7f477f78734514e76
40805f5 Merge upstream/main into feature/python-mcp-remote-sources Tito0015 Nov 2, 2026 https://github.com/github/codeql/pull/22750/commits/40805f51fe03644c3b0c8e0b5ffab8c208ee1ee3
99cdc47 Python: model MCP handler params as ai threat-model sources Tito0015 Nov 4, 2026 https://github.com/github/codeql/pull/22750/commits/99cdc47cbd1b2514805a6df32adc7c9b382b4c85
9caec6c Merge upstream/main into feature/python-mcp-remote-sources Tito0015 Nov 4, 2026 https://github.com/github/codeql/pull/22750/commits/9caec6cc5f6d54611eea35b4110b37efd438b866
13f146e Merge upstream/main and align complementary MCP AST models Tito0015 Nov 14, 2026 https://github.com/github/codeql/pull/22750/commits/13f146e70913fe45729c41cb5795ebc2a471eb8f
208033b Merge upstream/main into feature/python-mcp-remote-sources Tito0015 Nov 14, 2026 https://github.com/github/codeql/pull/22750/commits/208033b584d6c4fe7022dcd00353654651e9adea
Clear filters https://github.com/github/codeql/pull/22750/files
Please reload this pagehttps://github.com/github/codeql/pull/22750/files
Please reload this pagehttps://github.com/github/codeql/pull/22750/files
supported-frameworks.rst https://github.com/github/codeql/pull/22750/files#diff-ba3babf93042166a4b4f726d8753922eafad7ddeb2d569df25ec204446569c77
2026-10-04-mcp-remote-sources.md https://github.com/github/codeql/pull/22750/files#diff-f69ac4df8a459eee1df912e89eea3f8696d03057ef8ef4a158b5de37a16db181
Mcp.qll https://github.com/github/codeql/pull/22750/files#diff-daaccb2759cc0d3e13a2adc46b0459b93d5ae6459eef3f58163226253f8666a9
RemoteFlowSources.expected https://github.com/github/codeql/pull/22750/files#diff-a68b653bf7a240258ef0757a1ea77ea57f62b7cc0e62b728db1396b3045f16ee
RemoteFlowSources.ql https://github.com/github/codeql/pull/22750/files#diff-574239772e7e8fbdc8c0af2ed86038a52cd33b00237fd32248aa7c775f94a7ba
mcp_test.py https://github.com/github/codeql/pull/22750/files#diff-8777a4d6b834e7fc2f3a3851c99f3d67a2d107502ece0b1f3b217819200cd0e0
https://github.com/github/codeql/blob/main/CODEOWNERS#L2
docs/codeql/reusables/supported-frameworks.rsthttps://github.com/github/codeql/pull/22750/files#diff-ba3babf93042166a4b4f726d8753922eafad7ddeb2d569df25ec204446569c77
View file https://github.com/github/codeql/blob/208033b584d6c4fe7022dcd00353654651e9adea/docs/codeql/reusables/supported-frameworks.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22750/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22750/files#diff-ba3babf93042166a4b4f726d8753922eafad7ddeb2d569df25ec204446569c77
https://github.com/github/codeql/pull/22750/files#diff-ba3babf93042166a4b4f726d8753922eafad7ddeb2d569df25ec204446569c77
https://github.com/github/codeql/blob/main/CODEOWNERS#L18
python/ql/lib/change-notes/2026-10-04-mcp-remote-sources.mdhttps://github.com/github/codeql/pull/22750/files#diff-f69ac4df8a459eee1df912e89eea3f8696d03057ef8ef4a158b5de37a16db181
View file https://github.com/github/codeql/blob/208033b584d6c4fe7022dcd00353654651e9adea/python/ql/lib/change-notes/2026-10-04-mcp-remote-sources.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22750/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L18
python/ql/lib/semmle/python/frameworks/Mcp.qllhttps://github.com/github/codeql/pull/22750/files#diff-daaccb2759cc0d3e13a2adc46b0459b93d5ae6459eef3f58163226253f8666a9
View file https://github.com/github/codeql/blob/208033b584d6c4fe7022dcd00353654651e9adea/python/ql/lib/semmle/python/frameworks/Mcp.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22750/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22750/files#diff-daaccb2759cc0d3e13a2adc46b0459b93d5ae6459eef3f58163226253f8666a9
https://github.com/github/codeql/pull/22750/files#diff-daaccb2759cc0d3e13a2adc46b0459b93d5ae6459eef3f58163226253f8666a9
https://github.com/github/codeql/pull/22750/files#diff-daaccb2759cc0d3e13a2adc46b0459b93d5ae6459eef3f58163226253f8666a9
https://github.com/github/codeql/pull/22750/files#diff-daaccb2759cc0d3e13a2adc46b0459b93d5ae6459eef3f58163226253f8666a9
https://github.com/github/codeql/blob/main/CODEOWNERS#L18
python/ql/test/library-tests/dataflow/remote-flow-sources/RemoteFlowSources.expectedhttps://github.com/github/codeql/pull/22750/files#diff-a68b653bf7a240258ef0757a1ea77ea57f62b7cc0e62b728db1396b3045f16ee
View file https://github.com/github/codeql/blob/208033b584d6c4fe7022dcd00353654651e9adea/python/ql/test/library-tests/dataflow/remote-flow-sources/RemoteFlowSources.expected
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22750/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L18
python/ql/test/library-tests/dataflow/remote-flow-sources/RemoteFlowSources.qlhttps://github.com/github/codeql/pull/22750/files#diff-574239772e7e8fbdc8c0af2ed86038a52cd33b00237fd32248aa7c775f94a7ba
View file https://github.com/github/codeql/blob/208033b584d6c4fe7022dcd00353654651e9adea/python/ql/test/library-tests/dataflow/remote-flow-sources/RemoteFlowSources.ql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22750/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L18
python/ql/test/library-tests/dataflow/remote-flow-sources/mcp_test.pyhttps://github.com/github/codeql/pull/22750/files#diff-8777a4d6b834e7fc2f3a3851c99f3d67a2d107502ece0b1f3b217819200cd0e0
View file https://github.com/github/codeql/blob/208033b584d6c4fe7022dcd00353654651e9adea/python/ql/test/library-tests/dataflow/remote-flow-sources/mcp_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22750/{{ revealButtonHref }}
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.