René's URL Explorer Experiment


Title: [Java] CodeQL query to detect Log Injection by dellalibera · Pull Request #3882 · github/codeql · GitHub

Open Graph Title: [Java] CodeQL query to detect Log Injection by dellalibera · Pull Request #3882 · github/codeql

X Title: [Java] CodeQL query to detect Log Injection by dellalibera · Pull Request #3882 · github/codeql

Description: Log Injection query is available in c# query, javascript (experimental) query but it is not available in java query. I created a query to detect a log injection vulnerability in java code. This query addresses the scenario where user controlled input is logged-as is. Examples of scenarios detected: private final Logger log = LoggerFactory.getLogger(LogInjection.class); @GetMapping("/bad") public String bad(@RequestParam(value = "username", defaultValue = "name") String username) { log.warn("User:'{}'", username); return username; } Any feedback is welcome. I hope this will help.

Open Graph Description: Log Injection query is available in c# query, javascript (experimental) query but it is not available in java query. I created a query to detect a log injection vulnerability in java code. This que...

X Description: Log Injection query is available in c# query, javascript (experimental) query but it is not available in java query. I created a query to detect a log injection vulnerability in java code. This que...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f5a5e68c-a911-a1fa-9a0a-c89b66965bfe
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC5D8:31D4:24802D0:34BAD2D:6A4D1B23
html-safe-noncef2f364bf5bb5714320d02d273f8319163577ff38d89c22be9a858437b7a77ecb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUQ4OjMxRDQ6MjQ4MDJEMDozNEJBRDJEOjZBNEQxQjIzIiwidmlzaXRvcl9pZCI6IjExODY0NDk0NTk5MTY5MDUyNTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac26e29178af8caf346b620ba5128b4ec7429b2529ec38c1daa845f4adde01ef09
hovercard-subject-tagpull_request:443771087
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/3882/files
twitter:imagehttps://avatars.githubusercontent.com/u/43420907?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/43420907?s=400&v=4
og:image:altLog Injection query is available in c# query, javascript (experimental) query but it is not available in java query. I created a query to detect a log injection vulnerability in java code. This que...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonebcb4661e6fb4fe8b394c51ea02ccdb2236d40dc59afc75a3bbba50bf6517134c
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
releasefb70bd3c4b2bec429781b65419e912c66e2d5581
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/3882/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F3882%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%2F3882%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/3882/files
Reloadhttps://github.com/github/codeql/pull/3882/files
Reloadhttps://github.com/github/codeql/pull/3882/files
Please reload this pagehttps://github.com/github/codeql/pull/3882/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 987 https://github.com/github/codeql/issues
Pull requests 424 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
dellaliberahttps://github.com/dellalibera
github:mainhttps://github.com/github/codeql/tree/main
dellalibera:java/log-injectionhttps://github.com/dellalibera/codeql/tree/java/log-injection
Conversation 30 https://github.com/github/codeql/pull/3882
Findings https://github.com/github/codeql/pull/3882/findings
Commits 6 https://github.com/github/codeql/pull/3882/commits
Checks 0 https://github.com/github/codeql/pull/3882/checks
Files changed https://github.com/github/codeql/pull/3882/files
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
[Java] CodeQL query to detect Log Injection https://github.com/github/codeql/pull/3882/files#top
Show all changes 6 commits https://github.com/github/codeql/pull/3882/files
47579fd Add CodeQL query to detect Log Injection in Java code dellalibera Jul 2, 2020 https://github.com/github/codeql/pull/3882/commits/47579fd5ae1c4a90a87d31c8aa591c420b00a185
aa0dc9b Change message dellalibera Jul 2, 2020 https://github.com/github/codeql/pull/3882/commits/aa0dc9be01db87d16cd4a0c2cecb50cde524f8d0
bde715b Update java/ql/src/experimental/Security/CWE/CWE-117/LogInjection.help dellalibera Jul 3, 2020 https://github.com/github/codeql/pull/3882/commits/bde715bebfa9e5f311524750915f972d2e5baf33
e4a5154 Update java/ql/src/experimental/Security/CWE/CWE-117/LogInjection.help dellalibera Jul 3, 2020 https://github.com/github/codeql/pull/3882/commits/e4a5154b3db286634c0cb906dd8b6de1188d5706
5ddb15f Update .qhelp dellalibera Jul 3, 2020 https://github.com/github/codeql/pull/3882/commits/5ddb15fdd1e9debf1c24efa7a71c4cefbab2c65d
e9c8434 Update example dellalibera Jul 3, 2020 https://github.com/github/codeql/pull/3882/commits/e9c84349a49fd9c468201585e93b92ac3e75e6c5
Clear filters https://github.com/github/codeql/pull/3882/files
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
LogInjection.help https://github.com/github/codeql/pull/3882/files#diff-9b574568c841017e555142adb6b9fa6edaed5c42cbd1c81437bbdcce6fe912d4
LogInjection.ql https://github.com/github/codeql/pull/3882/files#diff-50f229bd2e22023b832ccf3f9b1954b9c132e0b1dbdda90bd131ff4d706bfa63
LogInjection.qll https://github.com/github/codeql/pull/3882/files#diff-c508eff5ee673de3535414728abbb815db3424900a661a5f2cebfc7f0cd771a8
LogInjection.java https://github.com/github/codeql/pull/3882/files#diff-ce527be3bc572b121e444c8cab6786a5f6a6ca1d7f384c55bc92fa91c373712a
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/experimental/Security/CWE/CWE-117/LogInjection.helphttps://github.com/github/codeql/pull/3882/files#diff-9b574568c841017e555142adb6b9fa6edaed5c42cbd1c81437bbdcce6fe912d4
View file https://github.com/dellalibera/codeql/blob/e9c84349a49fd9c468201585e93b92ac3e75e6c5/java/ql/src/experimental/Security/CWE/CWE-117/LogInjection.help
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3882/{{ revealButtonHref }}
smowtonhttps://github.com/smowton
Oct 20, 2020https://github.com/github/codeql/pull/3882/files#r508419977
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://owasp.org/www-community/attacks/Log_Injectionhttps://owasp.org/www-community/attacks/Log_Injection
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/experimental/Security/CWE/CWE-117/LogInjection.qlhttps://github.com/github/codeql/pull/3882/files#diff-50f229bd2e22023b832ccf3f9b1954b9c132e0b1dbdda90bd131ff4d706bfa63
View file https://github.com/dellalibera/codeql/blob/e9c84349a49fd9c468201585e93b92ac3e75e6c5/java/ql/src/experimental/Security/CWE/CWE-117/LogInjection.ql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3882/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/experimental/Security/CWE/CWE-117/LogInjection.qllhttps://github.com/github/codeql/pull/3882/files#diff-c508eff5ee673de3535414728abbb815db3424900a661a5f2cebfc7f0cd771a8
View file https://github.com/dellalibera/codeql/blob/e9c84349a49fd9c468201585e93b92ac3e75e6c5/java/ql/src/experimental/Security/CWE/CWE-117/LogInjection.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3882/{{ revealButtonHref }}
Marcono1234https://github.com/Marcono1234
Jul 3, 2020https://github.com/github/codeql/pull/3882/files#r449315555
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Log4j1https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Category.html#debug(java.lang.Object)
Log4j2https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Logger.html#debug-java.lang.CharSequence-
Log4j1https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Category.html#log(org.apache.log4j.Priority,%20java.lang.Object)
Log4j2https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Logger.html#log-org.apache.logging.log4j.Level-java.lang.CharSequence-
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
Marcono1234https://github.com/Marcono1234
Jul 3, 2020https://github.com/github/codeql/pull/3882/files#r449315959
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
JBoss Logginghttps://docs.jboss.org/jbosslogging/latest/org/jboss/logging/BasicLogger.html
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
smowtonhttps://github.com/smowton
Oct 20, 2020https://github.com/github/codeql/pull/3882/files#r508420522
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
smowtonhttps://github.com/smowton
Oct 20, 2020https://github.com/github/codeql/pull/3882/files#r508426950
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://github.com/github/codeql/blob/main/java/ql/src/experimental/Security/CWE/CWE-532/SensitiveInfoLog.ql#L31https://github.com/github/codeql/blob/main/java/ql/src/experimental/Security/CWE/CWE-532/SensitiveInfoLog.ql#L31
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
Marcono1234https://github.com/Marcono1234
Jul 3, 2020https://github.com/github/codeql/pull/3882/files#r449316965
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
org.apache.log4j.Categoryhttps://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Category.html
org.apache.logging.log4j.LogBuilderhttps://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/LogBuilder.html
org.slf4j.spi.LoggingEventBuilderhttp://www.slf4j.org/apidocs/org/slf4j/spi/LoggingEventBuilder.html
org.apache.commons.logging.Loghttps://commons.apache.org/proper/commons-logging/javadocs/api-release/org/apache/commons/logging/Log.html
org.jboss.logging.BasicLoggerhttps://docs.jboss.org/jbosslogging/latest/org/jboss/logging/BasicLogger.html
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
smowtonhttps://github.com/smowton
Oct 20, 2020https://github.com/github/codeql/pull/3882/files#r508429654
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
Marcono1234https://github.com/Marcono1234
Jul 3, 2020https://github.com/github/codeql/pull/3882/files#r449317877
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/experimental/Security/CWE/CWE-117/examples/LogInjection.javahttps://github.com/github/codeql/pull/3882/files#diff-ce527be3bc572b121e444c8cab6786a5f6a6ca1d7f384c55bc92fa91c373712a
View file https://github.com/dellalibera/codeql/blob/e9c84349a49fd9c468201585e93b92ac3e75e6c5/java/ql/src/experimental/Security/CWE/CWE-117/examples/LogInjection.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/3882/{{ revealButtonHref }}
Marcono1234https://github.com/Marcono1234
Jul 3, 2020https://github.com/github/codeql/pull/3882/files#r449318111
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/3882/files
Marcono1234https://github.com/Marcono1234
Jul 3, 2020https://github.com/github/codeql/pull/3882/files#r449710474
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/3882/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.