René's URL Explorer Experiment


Title: Go: Tainted data does not propagate data flow after append function · Issue #14116 · github/codeql · GitHub

Open Graph Title: Go: Tainted data does not propagate data flow after append function · Issue #14116 · github/codeql

X Title: Go: Tainted data does not propagate data flow after append function · Issue #14116 · github/codeql

Description: Go: v1.19.1 linux/amd64 CodeQL: v2.11.0 Question: Query the data flow results from the input parameter in the source function to the name parameter in the sink function. package main import ( "fmt" ) type info struct { name string } func...

Open Graph Description: Go: v1.19.1 linux/amd64 CodeQL: v2.11.0 Question: Query the data flow results from the input parameter in the source function to the name parameter in the sink function. package main import ( "fmt"...

X Description: Go: v1.19.1 linux/amd64 CodeQL: v2.11.0 Question: Query the data flow results from the input parameter in the source function to the name parameter in the sink function. package main import ( "...

Opengraph URL: https://github.com/github/codeql/issues/14116

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Go: Tainted data does not propagate data flow after append function","articleBody":"Go: v1.19.1 linux/amd64\r\nCodeQL: v2.11.0\r\n\r\nQuestion: Query the data flow results from the `input` parameter in the `source` function to the `name` parameter in the `sink` function.\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n)\r\n\r\ntype info struct {\r\n\tname string\r\n}\r\nfunc main() {\r\n\tsource(\"input\")\r\n}\r\n\r\nfunc source(input string) {\r\n\tvar data []info\r\n\tdata = append(data, info{\r\n\t\tname: input,\r\n\t})\r\n\tdao(data)\r\n\r\n}\r\n\r\nfunc dao(data []info) {\r\n\tfor _, item := range data {\r\n\t\tname := item.name\r\n\t\tsink(name)\r\n\t}\r\n}\r\n\r\nfunc sink(name string) {\r\n\tfmt.Println(name)\r\n}\r\n\r\n```\r\n\r\n\r\nThe following is my query statement. After execution, I did not get the expected results.\r\n\r\n\u003cimg width=\"1828\" alt=\"append_struct_result\" src=\"https://github.com/github/codeql/assets/48125429/bd01e325-adc9-4187-8e6e-1b60c7542d91\">\r\n\r\n\r\n```codeql\r\n/**\r\n * @kind path-problem\r\n */\r\n\r\nimport go\r\nimport DataFlow::PathGraph\r\n\r\nclass Configuration extends TaintTracking::Configuration {\r\n  Configuration() { this = \"Configuration\" }\r\n\r\n  override predicate isSource(DataFlow::Node source) {\r\n    exists(Function func | func.getName() = \"source\" | func.getParameter(0) = source.asParameter())\r\n  }\r\n\r\n  override predicate isSink(DataFlow::Node sink) {\r\n    exists(DataFlow::CallNode call | call.getTarget().getName() = \"sink\" |\r\n      call.getArgument(0) = sink\r\n    )\r\n  }\r\n}\r\n\r\nfrom Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink\r\nwhere cfg.hasFlowPath(source, sink)\r\nselect sink.getNode(), source, sink, \"Source: $@ , Sink: $@ .\", source.getNode(), source.toString(),\r\n  sink.getNode(), sink.toString()\r\n```\r\n\r\n\r\nWhen I debug using `DataFlow::PartialPathGraph`, it seems that the tainted data does not propagate the data flow after passing through the `append` function.\r\n\r\n\u003cimg width=\"1797\" alt=\"append_struct_partial\" src=\"https://github.com/github/codeql/assets/48125429/f2365c7b-2bff-4e0e-83ad-9c669e49cb05\">\r\n\r\n\r\n```codeql\r\n/**\r\n * @kind path-problem\r\n */\r\n\r\nimport go\r\nimport DataFlow::PartialPathGraph\r\n\r\nclass Configuration extends TaintTracking::Configuration {\r\n  Configuration() { this = \"Configuration\" }\r\n\r\n  override predicate isSource(DataFlow::Node source) {\r\n    exists(Function func | func.getName() = \"source\" | func.getParameter(0) = source.asParameter())\r\n  }\r\n\r\n  override predicate isSink(DataFlow::Node sink) {\r\n    exists(DataFlow::CallNode call | call.getTarget().getName() = \"sink\" |\r\n      call.getArgument(0) = sink\r\n    )\r\n  }\r\n\r\n  override int explorationLimit() { result = 5 }\r\n}\r\n\r\nfrom Configuration cfg, DataFlow::PartialPathNode source, DataFlow::PartialPathNode sink\r\nwhere cfg.hasPartialFlow(source, sink, _)\r\nselect sink.getNode(), source, sink, \"Source: $@ , Sink: $@ .\", source.getNode(), source.toString(), sink.getNode(), sink.toString()\r\n```\r\n\r\n\r\nHow to solve this problem?\r\n\r\n\r\n","author":{"url":"https://github.com/Jokuuy","@type":"Person","name":"Jokuuy"},"datePublished":"2023-09-01T03:42:17Z","url":"https://github.com/github/codeql/issues/14116"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0e1c2804-c8b4-37d4-5253-9923aa186216
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCA98:3CC0D9:89209F:BC46DA:6AF85B24
html-safe-nonce309e6e7bbb57fe081fe3e485ff83e1fe6b08411ac382e6ef7aac7ac809695d32
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTk4OjNDQzBEOTo4OTIwOUY6QkM0NkRBOjZBRjg1QjI0IiwidmlzaXRvcl9pZCI6IjYzMTYxMTgzNzgzMTgxNTg2MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbee854229f9518528bcdc850a042fef56d9a0c88e47c137675d0d88fa9d6449c
hovercard-subject-tagissue:1876663748
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/github/codeql/14116/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4e5d72230b09e6051fb9d8c6eea14d691159f230d328f70e82ee34b08b9919aa/github/codeql/issues/14116
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4e5d72230b09e6051fb9d8c6eea14d691159f230d328f70e82ee34b08b9919aa/github/codeql/issues/14116
og:image:altGo: v1.19.1 linux/amd64 CodeQL: v2.11.0 Question: Query the data flow results from the input parameter in the source function to the name parameter in the sink function. package main import ( "fmt"...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJokuuy
hostnamegithub.com
expected-hostnamegithub.com
None5713ecd83001b2f55c3509fb7a292bf7d66d0f167c7ae87a9f7eaec5a52bf8db
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release653be32ff5c755082a4db662491bfbbcfc9112c1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/github/codeql/issues/14116#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fissues%2F14116
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%2Fissues%2F14116
Sign uphttps://github.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=github%2Fcodeql
Reloadhttps://github.com/github/codeql/issues/14116
Reloadhttps://github.com/github/codeql/issues/14116
Reloadhttps://github.com/github/codeql/issues/14116
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
https://github.com/github/codeql
New issuehttps://github.com/login?return_to=https://github.com/github/codeql/issues/14116
New issuehttps://github.com/login?return_to=https://github.com/github/codeql/issues/14116
Go: Tainted data does not propagate data flow after append functionhttps://github.com/github/codeql/issues/14116#top
questionFurther information is requestedhttps://github.com/github/codeql/issues?q=state%3Aopen%20label%3A%22question%22
https://github.com/Jokuuy
Jokuuyhttps://github.com/Jokuuy
on Sep 1, 2023https://github.com/github/codeql/issues/14116#issue-1876663748
https://private-user-images.githubusercontent.com/48125429/264931436-bd01e325-adc9-4187-8e6e-1b60c7542d91.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTQ2NjE0NTYsIm5iZiI6MTc5NDY2MTE1NiwicGF0aCI6Ii80ODEyNTQyOS8yNjQ5MzE0MzYtYmQwMWUzMjUtYWRjOS00MTg3LThlNmUtMWI2MGM3NTQyZDkxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjExMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYxMTE0VDEyNTkxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjYmZmNWZmYjU2ZDVhNTQ5ZjczNTE5MDc2OTcxNjIyMjQ1M2RjZDA5Y2QyZTljYzRhYjRkYzEzMGUzNzFlYjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.-m7HfJFrXYVy0Y7Th0i-dV_JX6a4MPV3LZg1Q766vJM
https://private-user-images.githubusercontent.com/48125429/264930527-f2365c7b-2bff-4e0e-83ad-9c669e49cb05.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTQ2NjE0NTYsIm5iZiI6MTc5NDY2MTE1NiwicGF0aCI6Ii80ODEyNTQyOS8yNjQ5MzA1MjctZjIzNjVjN2ItMmJmZi00ZTBlLTgzYWQtOWM2NjllNDljYjA1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjExMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYxMTE0VDEyNTkxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI3ZDA2Mjk0ZDkwNTAyYmE2MGU2NzhmMTYxYzI4YjA5ZmQ0NDI1NzMzNjljYzRiZWZkNDA5MWQ3NzVjMDdhNjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.DaOqDC5x-vaO5nmlKX-xY3bJPSTubvdOinMCPxBfzaA
Jokuuyhttps://github.com/Jokuuy
questionFurther information is requestedhttps://github.com/github/codeql/issues?q=state%3Aopen%20label%3A%22question%22
on Sep 1, 2023https://github.com/github/codeql/issues/14116#event-10252630263
https://github.com/MathiasVP
MathiasVPhttps://github.com/MathiasVP
on Sep 1, 2023https://github.com/github/codeql/issues/14116#issuecomment-1702584004
@Jokuuyhttps://github.com/Jokuuy
https://github.com/github/codeql/blob/main/go/ql/lib/semmle/go/frameworks/Stdlib.qll#L53https://github.com/github/codeql/blob/main/go/ql/lib/semmle/go/frameworks/Stdlib.qll#L53
https://github.com/owen-mc
owen-mchttps://github.com/owen-mc
on Jan 23, 2025https://github.com/github/codeql/issues/14116#issuecomment-2609644511
#16413https://github.com/github/codeql/pull/16413
Sign up for freehttps://github.com/signup?return_to=https://github.com/github/codeql/issues/14116
Sign in to commenthttps://github.com/login?return_to=https://github.com/github/codeql/issues/14116
questionFurther information is requestedhttps://github.com/github/codeql/issues?q=state%3Aopen%20label%3A%22question%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.