René's URL Explorer Experiment


Title: False positive in `go/log-injection` · Issue #9016 · github/codeql · GitHub

Open Graph Title: False positive in `go/log-injection` · Issue #9016 · github/codeql

X Title: False positive in `go/log-injection` · Issue #9016 · github/codeql

Description: Description of the false positive 📄 Code snippet CodeQL reports (via GitHub integration) that the following log write receives unsanitized user input: switch eventType := sanitizeUserInput(event.Type); eventType { // ... default: h.logge...

Open Graph Description: Description of the false positive 📄 Code snippet CodeQL reports (via GitHub integration) that the following log write receives unsanitized user input: switch eventType := sanitizeUserInput(event.Ty...

X Description: Description of the false positive 📄 Code snippet CodeQL reports (via GitHub integration) that the following log write receives unsanitized user input: switch eventType := sanitizeUserInput(event.Ty...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"False positive in `go/log-injection`","articleBody":"**Description of the false positive**\r\n\r\n📄 [Code snippet](https://github.com/triggermesh/triggermesh/blob/c8ed975ea7d2538ff32c79884d319fc8f408532e/pkg/sources/adapter/slacksource/slack.go#L128-L148)\r\n\r\nCodeQL reports (via [GitHub integration](https://github.com/github/codeql-action)) that the following log write receives unsanitized user input:\r\n\r\n```go\r\nswitch eventType := sanitizeUserInput(event.Type); eventType {\r\n// ...\r\ndefault:\r\n\th.logger.Warn(\"Content not supported: \", strconv.Quote(eventType))  // \u003c-- false positive 'go/log-injection'\r\n}\r\n```\r\n\r\nThis is untrue.\r\nThe user input is explicitly sanitized at the beginning of the switch case (in fact, we fixed it earlier this year thanks to CodeQL! 🙌 ):\r\n\r\n```go\r\nvar newlineToSpace = strings.NewReplacer(\"\\n\", \" \", \"\\r\", \" \")\r\n\r\n// sanitizeUserInput removes unwanted characters from the given string.\r\n// It also guarantees the safe logging of data that potentially originates from\r\n// user input (CWE-117, https://cwe.mitre.org/data/definitions/117.html).\r\nfunc sanitizeUserInput(s string) string {\r\n\treturn newlineToSpace.Replace(s)\r\n}\r\n```","author":{"url":"https://github.com/antoineco","@type":"Person","name":"antoineco"},"datePublished":"2022-05-03T08:33:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/9016/codeql/issues/9016"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4a727bbc-b3f0-989c-1588-d1c5642bdc3a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCF7E:FC316:573951:760C52:696AAC2E
html-safe-nonce059b9b6ec6b5b5a41980119aa7df1145ac9f00730271b6049dfb4c1637b9e76d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjdFOkZDMzE2OjU3Mzk1MTo3NjBDNTI6Njk2QUFDMkUiLCJ2aXNpdG9yX2lkIjoiMjc5ODAzMDE3ODQ1MTM2OTAwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca155ff4805c6f328fce5e33249b2ee7b6341acd3c63461445b2e8a08fa56bf64
hovercard-subject-tagissue:1223822385
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/9016/issue_layout
twitter:imagehttps://opengraph.githubassets.com/51f9c421188d265d48d1cb55ecd40d9893d79a7e859228efb1d7af46243b50a1/github/codeql/issues/9016
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/51f9c421188d265d48d1cb55ecd40d9893d79a7e859228efb1d7af46243b50a1/github/codeql/issues/9016
og:image:altDescription of the false positive 📄 Code snippet CodeQL reports (via GitHub integration) that the following log write receives unsanitized user input: switch eventType := sanitizeUserInput(event.Ty...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameantoineco
hostnamegithub.com
expected-hostnamegithub.com
None3eaf9b8cf1badcd7041a8ad480b9d9b28bea0ef1cc821ca9ff20f2cc7f4fe4b9
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
releasedd9a979046e6382bd084e2bd873bf65f797125ff
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/issues/9016#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fissues%2F9016
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://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fissues%2F9016
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=github%2Fcodeql
Reloadhttps://github.com/github/codeql/issues/9016
Reloadhttps://github.com/github/codeql/issues/9016
Reloadhttps://github.com/github/codeql/issues/9016
github https://github.com/github
codeqlhttps://github.com/github/codeql
Notifications https://github.com/login?return_to=%2Fgithub%2Fcodeql
Fork 1.9k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Star 9.1k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Code https://github.com/github/codeql
Issues 918 https://github.com/github/codeql/issues
Pull requests 368 https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects 0 https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/github/codeql/security
Please reload this pagehttps://github.com/github/codeql/issues/9016
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 https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
New issuehttps://github.com/login?return_to=https://github.com/github/codeql/issues/9016
New issuehttps://github.com/login?return_to=https://github.com/github/codeql/issues/9016
False positive in go/log-injectionhttps://github.com/github/codeql/issues/9016#top
https://github.com/owen-mc
Gohttps://github.com/github/codeql/issues?q=state%3Aopen%20label%3A%22Go%22
false-positivehttps://github.com/github/codeql/issues?q=state%3Aopen%20label%3A%22false-positive%22
https://github.com/antoineco
https://github.com/antoineco
antoinecohttps://github.com/antoineco
on May 3, 2022https://github.com/github/codeql/issues/9016#issue-1223822385
Code snippethttps://github.com/triggermesh/triggermesh/blob/c8ed975ea7d2538ff32c79884d319fc8f408532e/pkg/sources/adapter/slacksource/slack.go#L128-L148
GitHub integrationhttps://github.com/github/codeql-action
owen-mchttps://github.com/owen-mc
Gohttps://github.com/github/codeql/issues?q=state%3Aopen%20label%3A%22Go%22
false-positivehttps://github.com/github/codeql/issues?q=state%3Aopen%20label%3A%22false-positive%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.