René's URL Explorer Experiment


Title: Codemod: path-traversal-join Semgrep · Issue #685 · pixee/codemodder-python · GitHub

Open Graph Title: Codemod: path-traversal-join Semgrep · Issue #685 · pixee/codemodder-python

X Title: Codemod: path-traversal-join Semgrep · Issue #685 · pixee/codemodder-python

Description: running semgrep on pygoat ❯❱ python.django.security.injection.path-traversal.path-traversal-join.path-traversal-join Data from request is passed to os.path.join() and to open(). This is a path traversal vulnerability, which can lead to s...

Open Graph Description: running semgrep on pygoat ❯❱ python.django.security.injection.path-traversal.path-traversal-join.path-traversal-join Data from request is passed to os.path.join() and to open(). This is a path trav...

X Description: running semgrep on pygoat ❯❱ python.django.security.injection.path-traversal.path-traversal-join.path-traversal-join Data from request is passed to os.path.join() and to open(). This is a path trav...

Opengraph URL: https://github.com/pixee/codemodder-python/issues/685

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Codemod: path-traversal-join Semgrep","articleBody":"running semgrep on pygoat\r\n```\r\n ❯❱ python.django.security.injection.path-traversal.path-traversal-join.path-traversal-join\r\n          Data from request is passed to os.path.join() and to open(). This is a path traversal vulnerability,\r\n          which can lead to sensitive data being leaked. To mitigate, consider using os.path.abspath or       \r\n          os.path.realpath or Path library.                                                                   \r\n          Details: https://sg.run/Dovo                                                                        \r\n                                                                                                              \r\n          916┆ file=request.POST[\"blog\"]\r\n          917┆ try :\r\n          918┆     dirname = os.path.dirname(__file__)\r\n          919┆     filename = os.path.join(dirname, file)\r\n          920┆     file = open(filename,\"r\")\r\n          921┆     data = file.read()\r\n          922┆     return render(request,\"Lab/ssrf/ssrf_lab.html\",{\"blog\":data})\r\n          923┆ except:\r\n          924┆     return render(request, \"Lab/ssrf/ssrf_lab.html\", {\"blog\": \"No blog found\"})\r\n   \r\n```\r\n\r\nI don't believe we currently have a codemod for this pattern, but we could use deterministically try to implement the suggestion semgrep is giving us.","author":{"url":"https://github.com/clavedeluna","@type":"Person","name":"clavedeluna"},"datePublished":"2024-07-01T11:50:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/685/codemodder-python/issues/685"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6541aa3a-f854-4372-5e28-805b32896bab
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB968:29B36B:B8F1E2:103B72E:6970BC18
html-safe-nonce15086967877eeb9ce4cc08258dd85946ee2fd5efca4bb08d6c7729dfa0e6b321
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTY4OjI5QjM2QjpCOEYxRTI6MTAzQjcyRTo2OTcwQkMxOCIsInZpc2l0b3JfaWQiOiI3OTk0NzEwMzM2MjM1MTU4NTUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9971ad91a93e1b8fa9c5eb164159e9b80510a5df55e7aed6ef661cce80e1fe4a
hovercard-subject-tagissue:2383634258
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pixee/codemodder-python/685/issue_layout
twitter:imagehttps://opengraph.githubassets.com/83d30059d7fd8f452e687854c5f50ba5830d104cc28561af435084d04fee0314/pixee/codemodder-python/issues/685
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/83d30059d7fd8f452e687854c5f50ba5830d104cc28561af435084d04fee0314/pixee/codemodder-python/issues/685
og:image:altrunning semgrep on pygoat ❯❱ python.django.security.injection.path-traversal.path-traversal-join.path-traversal-join Data from request is passed to os.path.join() and to open(). This is a path trav...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameclavedeluna
hostnamegithub.com
expected-hostnamegithub.com
Nonebb43a7bc61aba1b91c3c5cf8e7d00342e1e77a0cfe55a141222dbd7f9782d26f
turbo-cache-controlno-preview
go-importgithub.com/pixee/codemodder-python git https://github.com/pixee/codemodder-python.git
octolytics-dimension-user_id101823672
octolytics-dimension-user_loginpixee
octolytics-dimension-repository_id682639394
octolytics-dimension-repository_nwopixee/codemodder-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id682639394
octolytics-dimension-repository_network_root_nwopixee/codemodder-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release34817b01ad7cdf8b2beb35ea7b0e2a7609004eff
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/pixee/codemodder-python/issues/685#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpixee%2Fcodemodder-python%2Fissues%2F685
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpixee%2Fcodemodder-python%2Fissues%2F685
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=pixee%2Fcodemodder-python
Reloadhttps://patch-diff.githubusercontent.com/pixee/codemodder-python/issues/685
Reloadhttps://patch-diff.githubusercontent.com/pixee/codemodder-python/issues/685
Reloadhttps://patch-diff.githubusercontent.com/pixee/codemodder-python/issues/685
pixee https://patch-diff.githubusercontent.com/pixee
codemodder-pythonhttps://patch-diff.githubusercontent.com/pixee/codemodder-python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpixee%2Fcodemodder-python
Fork 10 https://patch-diff.githubusercontent.com/login?return_to=%2Fpixee%2Fcodemodder-python
Star 43 https://patch-diff.githubusercontent.com/login?return_to=%2Fpixee%2Fcodemodder-python
Code https://patch-diff.githubusercontent.com/pixee/codemodder-python
Issues 26 https://patch-diff.githubusercontent.com/pixee/codemodder-python/issues
Pull requests 3 https://patch-diff.githubusercontent.com/pixee/codemodder-python/pulls
Actions https://patch-diff.githubusercontent.com/pixee/codemodder-python/actions
Projects 0 https://patch-diff.githubusercontent.com/pixee/codemodder-python/projects
Wiki https://patch-diff.githubusercontent.com/pixee/codemodder-python/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/pixee/codemodder-python/security
Please reload this pagehttps://patch-diff.githubusercontent.com/pixee/codemodder-python/issues/685
Insights https://patch-diff.githubusercontent.com/pixee/codemodder-python/pulse
Code https://patch-diff.githubusercontent.com/pixee/codemodder-python
Issues https://patch-diff.githubusercontent.com/pixee/codemodder-python/issues
Pull requests https://patch-diff.githubusercontent.com/pixee/codemodder-python/pulls
Actions https://patch-diff.githubusercontent.com/pixee/codemodder-python/actions
Projects https://patch-diff.githubusercontent.com/pixee/codemodder-python/projects
Wiki https://patch-diff.githubusercontent.com/pixee/codemodder-python/wiki
Security https://patch-diff.githubusercontent.com/pixee/codemodder-python/security
Insights https://patch-diff.githubusercontent.com/pixee/codemodder-python/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/pixee/codemodder-python/issues/685
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/pixee/codemodder-python/issues/685
Codemod: path-traversal-join Semgrephttps://patch-diff.githubusercontent.com/pixee/codemodder-python/issues/685#top
new-codemodDescription for a new codemodhttps://github.com/pixee/codemodder-python/issues?q=state%3Aopen%20label%3A%22new-codemod%22
semgrephttps://github.com/pixee/codemodder-python/issues?q=state%3Aopen%20label%3A%22semgrep%22
https://github.com/clavedeluna
https://github.com/clavedeluna
clavedelunahttps://github.com/clavedeluna
on Jul 1, 2024https://github.com/pixee/codemodder-python/issues/685#issue-2383634258
new-codemodDescription for a new codemodhttps://github.com/pixee/codemodder-python/issues?q=state%3Aopen%20label%3A%22new-codemod%22
semgrephttps://github.com/pixee/codemodder-python/issues?q=state%3Aopen%20label%3A%22semgrep%22
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.