René's URL Explorer Experiment


Title: Python : Add Xpath injection query · Pull Request #3522 · github/codeql · GitHub

Open Graph Title: Python : Add Xpath injection query · Pull Request #3522 · github/codeql

X Title: Python : Add Xpath injection query · Pull Request #3522 · github/codeql

Description: This PR adds support for detecting Xpath injection in Python. I have included the ql files as well as the tests with this. However, I haven't included included the *.expected files as lxml is not stubbed into master yet. If someone could run depstubber and push the stubs, I would be able to complete my work. cc: @RasmusWL @tausbn

Open Graph Description: This PR adds support for detecting Xpath injection in Python. I have included the ql files as well as the tests with this. However, I haven't included included the *.expected files as lxml is n...

X Description: This PR adds support for detecting Xpath injection in Python. I have included the ql files as well as the tests with this. However, I haven't included included the *.expected files as lxml ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b198dcc8-1e4e-83ce-d0c9-13bbd518e11b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE360:77702:B2B88D:104B52C:6A4E1D26
html-safe-nonce093b2f48901b97add3cccc36d64329f24ae00b6efd3f3fe46462f90aa74117f7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzYwOjc3NzAyOkIyQjg4RDoxMDRCNTJDOjZBNEUxRDI2IiwidmlzaXRvcl9pZCI6IjkxMjgxNTE4MzYyOTY4NzkzOTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac5022051614d4ecef151d80e063974bf9e26bc3ffa73fee10cfe5e9ff9c7b272a
hovercard-subject-tagpull_request:420366931
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/3522/files
twitter:imagehttps://avatars.githubusercontent.com/u/10137?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10137?s=400&v=4
og:image:altThis PR adds support for detecting Xpath injection in Python. I have included the ql files as well as the tests with this. However, I haven't included included the *.expected files as lxml is n...
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
release5fe497b4815fcce3df76c0e246faa739a82c3124
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/3522/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F3522%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%2F3522%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/3522/files
Reloadhttps://github.com/github/codeql/pull/3522/files
Reloadhttps://github.com/github/codeql/pull/3522/files
Please reload this pagehttps://github.com/github/codeql/pull/3522/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 427 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
RasmusWLhttps://github.com/RasmusWL
github:masterhttps://github.com/github/codeql/tree/master
Conversation 36 https://github.com/github/codeql/pull/3522
Findings https://github.com/github/codeql/pull/3522/findings
Commits 4 https://github.com/github/codeql/pull/3522/commits
Checks 0 https://github.com/github/codeql/pull/3522/checks
Files changed https://github.com/github/codeql/pull/3522/files
Please reload this pagehttps://github.com/github/codeql/pull/3522/files
Python : Add Xpath injection query https://github.com/github/codeql/pull/3522/files#top
Show all changes 4 commits https://github.com/github/codeql/pull/3522/files
8c5a971 Python : Add Xpath injection query May 13, 2020 https://github.com/github/codeql/pull/3522/commits/8c5a97170d98279a3b6944f202b2d8245c626141
424e88d include sugestions from review Jun 7, 2020 https://github.com/github/codeql/pull/3522/commits/424e88d318b1a5fae565bae6a91be5f95b6789f9
ce1f0a3 Python: Minor fixup of qhelp for XPath injection RasmusWL Jun 10, 2020 https://github.com/github/codeql/pull/3522/commits/ce1f0a39acd2f764930c0d901eb7f0d0a6189943
a519132 add support for libxml2 Jun 21, 2020 https://github.com/github/codeql/pull/3522/commits/a519132407db1f89a3038b7479fa119b8e1fbc44
Clear filters https://github.com/github/codeql/pull/3522/files
Please reload this pagehttps://github.com/github/codeql/pull/3522/files
Please reload this pagehttps://github.com/github/codeql/pull/3522/files
xpath.qhelp https://github.com/github/codeql/pull/3522/files#diff-5aac4577d412c627dded5c00025399ce68c76f9bfe39792400adc4ad04df3d98
xpath.ql https://github.com/github/codeql/pull/3522/files#diff-f541fa060d130529219ec838d21c3530bfee23bc3a9467a9110afe8ef93149c7
xpathBad.py https://github.com/github/codeql/pull/3522/files#diff-665afd98ee74766e2fdf97d20eb5ba495d0ebbdf0f89a8017158d5200c160f74
xpathGood.py https://github.com/github/codeql/pull/3522/files#diff-986987bcd8b92c4d8866ff31858dd7759a78b0a1ac05a37c8fd20a005d08d64e
Xpath.qll https://github.com/github/codeql/pull/3522/files#diff-f5448f92b58336f5390f901b3ed6a4eb6a0a4d848c6367ca98bfe557c4c86f5a
options https://github.com/github/codeql/pull/3522/files#diff-40f585c4e73f74b6119fa06286ecd6cfc4c02246eb3dca46a5480720698cc328
xpath.expected https://github.com/github/codeql/pull/3522/files#diff-0ffc5c032705401361641e711e9ca777d3787881e3ea1d0c98bc84252783ea6d
xpath.py https://github.com/github/codeql/pull/3522/files#diff-a7b5021c6a4d8d4bbb0eb22230d50d697834bef37c3dd44dc5a379b5cbced03a
xpath.qlref https://github.com/github/codeql/pull/3522/files#diff-6433fb8a68ecb9d9768e43d20018fe0a70ddecfb65369fb7218849ab47758a7c
xpathBad.py https://github.com/github/codeql/pull/3522/files#diff-61960c5d8f3450539971cd68fd694f34fb8c5ea66de193a234513bb1be874a54
xpathFlow.py https://github.com/github/codeql/pull/3522/files#diff-0bb6cd0d49341927c8c589e60d42b950fc73e748e90af30d4a63b9d91fddfe9c
xpathGood.py https://github.com/github/codeql/pull/3522/files#diff-f1b99aa3782860701d6a73678e0786434844c6e8df898cb3a99f376cc9dea557
xpathSinks.expected https://github.com/github/codeql/pull/3522/files#diff-395c37e22fc2f67c4d50d999add7c0d9b33741a513bf451a4345960d0e6d2aaa
xpathSinks.ql https://github.com/github/codeql/pull/3522/files#diff-a518f86fa82a4cd19f4ce15b66741d40faae0149c5dca99e8cc56a42a5031ef5
__init__.py https://github.com/github/codeql/pull/3522/files#diff-94f80a0e17eb338994b534bdde037c7e57ef122f1394d4d0f9fd4ebfa119da28
__init__.py https://github.com/github/codeql/pull/3522/files#diff-32eee93d6cee0500fb672735c7b69b5aac7f7d9e4f91f26fecd911da4f5b4ffd
__init__.py https://github.com/github/codeql/pull/3522/files#diff-0d52b1f1f68009f296bdf7488c533dd38eb14606dec521c5ee937d4fc5967499
python/ql/src/experimental/CWE-643/xpath.qhelphttps://github.com/github/codeql/pull/3522/files#diff-5aac4577d412c627dded5c00025399ce68c76f9bfe39792400adc4ad04df3d98
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/src/experimental/CWE-643/xpath.qhelp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/src/experimental/CWE-643/xpath.qlhttps://github.com/github/codeql/pull/3522/files#diff-f541fa060d130529219ec838d21c3530bfee23bc3a9467a9110afe8ef93149c7
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/src/experimental/CWE-643/xpath.ql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/src/experimental/CWE-643/xpathBad.pyhttps://github.com/github/codeql/pull/3522/files#diff-665afd98ee74766e2fdf97d20eb5ba495d0ebbdf0f89a8017158d5200c160f74
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/src/experimental/CWE-643/xpathBad.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/src/experimental/CWE-643/xpathGood.pyhttps://github.com/github/codeql/pull/3522/files#diff-986987bcd8b92c4d8866ff31858dd7759a78b0a1ac05a37c8fd20a005d08d64e
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/src/experimental/CWE-643/xpathGood.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/src/experimental/semmle/python/security/injection/Xpath.qllhttps://github.com/github/codeql/pull/3522/files#diff-f5448f92b58336f5390f901b3ed6a4eb6a0a4d848c6367ca98bfe557c4c86f5a
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/src/experimental/semmle/python/security/injection/Xpath.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/test/experimental/CWE-643/optionshttps://github.com/github/codeql/pull/3522/files#diff-40f585c4e73f74b6119fa06286ecd6cfc4c02246eb3dca46a5480720698cc328
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/test/experimental/CWE-643/options
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/test/experimental/CWE-643/xpath.expectedhttps://github.com/github/codeql/pull/3522/files#diff-0ffc5c032705401361641e711e9ca777d3787881e3ea1d0c98bc84252783ea6d
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/test/experimental/CWE-643/xpath.expected
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/test/experimental/CWE-643/xpath.pyhttps://github.com/github/codeql/pull/3522/files#diff-a7b5021c6a4d8d4bbb0eb22230d50d697834bef37c3dd44dc5a379b5cbced03a
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/test/experimental/CWE-643/xpath.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/test/experimental/CWE-643/xpath.qlrefhttps://github.com/github/codeql/pull/3522/files#diff-6433fb8a68ecb9d9768e43d20018fe0a70ddecfb65369fb7218849ab47758a7c
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/test/experimental/CWE-643/xpath.qlref
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/test/experimental/CWE-643/xpathBad.pyhttps://github.com/github/codeql/pull/3522/files#diff-61960c5d8f3450539971cd68fd694f34fb8c5ea66de193a234513bb1be874a54
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/test/experimental/CWE-643/xpathBad.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/test/experimental/CWE-643/xpathFlow.pyhttps://github.com/github/codeql/pull/3522/files#diff-0bb6cd0d49341927c8c589e60d42b950fc73e748e90af30d4a63b9d91fddfe9c
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/test/experimental/CWE-643/xpathFlow.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
python/ql/test/experimental/CWE-643/xpathGood.pyhttps://github.com/github/codeql/pull/3522/files#diff-f1b99aa3782860701d6a73678e0786434844c6e8df898cb3a99f376cc9dea557
View file https://github.com/github/codeql/blob/a519132407db1f89a3038b7479fa119b8e1fbc44/python/ql/test/experimental/CWE-643/xpathGood.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3522/{{ revealButtonHref }}
Please reload this pagehttps://github.com/github/codeql/pull/3522/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.