René's URL Explorer Experiment


Title: False positive: Mistaking Username as password if they are set in the same tuple · Issue #16976 · github/codeql · GitHub

Open Graph Title: False positive: Mistaking Username as password if they are set in the same tuple · Issue #16976 · github/codeql

X Title: False positive: Mistaking Username as password if they are set in the same tuple · Issue #16976 · github/codeql

Description: Description of the false positive Sometimes when a variable either stores a tuple containing a password and a username and then the username is logged into a file directly after the tuple is split, codeql assumes the username variable is...

Open Graph Description: Description of the false positive Sometimes when a variable either stores a tuple containing a password and a username and then the username is logged into a file directly after the tuple is split,...

X Description: Description of the false positive Sometimes when a variable either stores a tuple containing a password and a username and then the username is logged into a file directly after the tuple is split,...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"False positive: Mistaking Username as password if they are set in the same tuple","articleBody":"**Description of the false positive**\r\n\r\nSometimes when a variable either stores a tuple containing a password and a username and then the username is logged into a file directly after the tuple is split, codeql assumes the username variable is a password, thus reporting Clear-text storage of sensitive information\r\n\r\n**Code samples or links to source code**\r\n\r\n```text\r\nStep 1 ControlFlowNode for Subscript\r\nSource\r\n[DataBase.py:845](https://github.com/DefinetlyNotAI/Test-generator/blob/813d517b26e7c3a25b0781d187d5ce3b42cad172/DataBase.py#L845-L845)\r\n\r\n        api = config[\"api\"]\r\n        username = config[\"username\"]\r\n        password = config[\"password\"]\r\n        exclusion_titles = config[\"exclusion_titles\"]\r\n        return api, username, password, exclusion_titles\r\n    except Exception as e:\r\nStep 2 ControlFlowNode for password\r\n[DataBase.py:845](https://github.com/DefinetlyNotAI/Test-generator/blob/813d517b26e7c3a25b0781d187d5ce3b42cad172/DataBase.py#L845-L845)\r\n\r\n        api = config[\"api\"]\r\n        username = config[\"username\"]\r\n        password = config[\"password\"]\r\n        exclusion_titles = config[\"exclusion_titles\"]\r\n        return api, username, password, exclusion_titles\r\n    except Exception as e:\r\nStep 3 ControlFlowNode for Tuple\r\n[DataBase.py:847](https://github.com/DefinetlyNotAI/Test-generator/blob/813d517b26e7c3a25b0781d187d5ce3b42cad172/DataBase.py#L847-L847)\r\n        username = config[\"username\"]\r\n        password = config[\"password\"]\r\n        exclusion_titles = config[\"exclusion_titles\"]\r\n        return api, username, password, exclusion_titles\r\n    except Exception as e:\r\n        return f\"ERROR {e} \u0026\u0026 520\"\r\n\r\nStep 4 ControlFlowNode for read_api()\r\n[DataBase.py:966](https://github.com/DefinetlyNotAI/Test-generator/blob/813d517b26e7c3a25b0781d187d5ce3b42cad172/DataBase.py#L966-L966)\r\n            - str: If the API is invalid, returns a formatted error message.\r\n            \"\"\"\r\n            # Initialize the UserManager and API values\r\n            temp = read_api()\r\n            if isinstance(temp, str):\r\n                if check_ERROR(temp):\r\n                    return temp\r\nStep 5 ControlFlowNode for temp\r\n[DataBase.py:966](https://github.com/DefinetlyNotAI/Test-generator/blob/813d517b26e7c3a25b0781d187d5ce3b42cad172/DataBase.py#L966-L966)\r\n            - str: If the API is invalid, returns a formatted error message.\r\n            \"\"\"\r\n            # Initialize the UserManager and API values\r\n            temp = read_api()\r\n            if isinstance(temp, str):\r\n                if check_ERROR(temp):\r\n                    return temp\r\nStep 6 ControlFlowNode for username\r\n[DataBase.py:971](https://github.com/DefinetlyNotAI/Test-generator/blob/813d517b26e7c3a25b0781d187d5ce3b42cad172/DataBase.py#L971-L971)\r\n                if check_ERROR(temp):\r\n                    return temp\r\n            else:\r\n                api, username, password, exclusion_titles = temp\r\n\r\n            if api == \"REC\":\r\n                log.info(\r\nStep 7 ControlFlowNode for Fstring\r\n[DataBase.py:975](https://github.com/DefinetlyNotAI/Test-generator/blob/813d517b26e7c3a25b0781d187d5ce3b42cad172/DataBase.py#L975-L975)\r\n\r\n            if api == \"REC\":\r\n                log.info(\r\n                    f\"A request has been made to generate an exam by the user {username}\"\r\n                )\r\n                if um.verify_password(username, password):\r\n                    DATA = exam_generator(username)\r\nStep 8 ControlFlowNode for message\r\n[DataBase.py:504](https://github.com/DefinetlyNotAI/Test-generator/blob/813d517b26e7c3a25b0781d187d5ce3b42cad172/DataBase.py#L504-L504)\r\n\r\n        return time\r\n\r\n    def info(self, message):\r\n        \"\"\"\r\n        Writes an informational message to the log file.\r\nStep 9 ControlFlowNode for Fstring\r\n\r\n[DataBase.py:515](https://github.com/DefinetlyNotAI/Test-generator/blob/813d517b26e7c3a25b0781d187d5ce3b42cad172/DataBase.py#L515-L515)\r\n            None\r\n        \"\"\"\r\n        with open(self.filename, \"a\") as f:\r\n            f.write(f\"INFO: {message} at {self.timestamp()}\\n\")\r\nThis expression stores  as clear text.\r\n\r\n    def error(self, message):\r\n        \"\"\"\r\n```\r\n\r\n**URL to the alert on GitHub code scanning (optional)**\r\n\r\nhttps://github.com/DefinetlyNotAI/Test-generator/security/code-scanning/50","author":{"url":"https://github.com/DefinetlyNotAI","@type":"Person","name":"DefinetlyNotAI"},"datePublished":"2024-07-14T15:46:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/16976/codeql/issues/16976"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2570b57f-5dd3-5c44-3387-156ba4ae37c5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8122:6456C:141C63D:1BC22FC:6A4DE6C4
html-safe-nonce3787b89315fc09111aa6d87f204282391d6859484a66db285c70849a09b8445f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTIyOjY0NTZDOjE0MUM2M0Q6MUJDMjJGQzo2QTRERTZDNCIsInZpc2l0b3JfaWQiOiI1MjQ1NjA0NzAzMjY2MjY4ODY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd0ad70b6c8427ded68f4c4f399f9f671f232711e02daf20c2ef4b9c5aff40874
hovercard-subject-tagissue:2407489224
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/16976/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b4f70af858f0711e07aa3ed5b27c7625ab6abf0ab2045e92683fbdc358b2444d/github/codeql/issues/16976
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b4f70af858f0711e07aa3ed5b27c7625ab6abf0ab2045e92683fbdc358b2444d/github/codeql/issues/16976
og:image:altDescription of the false positive Sometimes when a variable either stores a tuple containing a password and a username and then the username is logged into a file directly after the tuple is split,...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDefinetlyNotAI
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
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
release1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/issues/16976#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fissues%2F16976
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%2Fissues%2F16976
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/16976
Reloadhttps://github.com/github/codeql/issues/16976
Reloadhttps://github.com/github/codeql/issues/16976
Please reload this pagehttps://github.com/github/codeql/issues/16976
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 426 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
False positive: Mistaking Username as password if they are set in the same tuplehttps://github.com/github/codeql/issues/16976#top
false-positivehttps://github.com/github/codeql/issues?q=state%3Aopen%20label%3A%22false-positive%22
https://github.com/DefinetlyNotAI
DefinetlyNotAIhttps://github.com/DefinetlyNotAI
on Jul 14, 2024https://github.com/github/codeql/issues/16976#issue-2407489224
https://github.com/DefinetlyNotAI/Test-generator/security/code-scanning/50https://github.com/DefinetlyNotAI/Test-generator/security/code-scanning/50
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.