Repository navigation
fix(github-app): resolve short repo names, sanitize inputs, and guard null fields - #14224
Merged
kodjima33 merged 1 commit intoSep 16, 2026
Conversation
This was referenced Sep 18, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14223
Problem & Symptom
"in omi") resulted in unmapped single-segment targets passed directly to GitHub endpoints (/repos/omi/issues), resulting in 100% 404 responses.github_client.get_issueandlist_issuesthrewTypeError: 'NoneType' object is not iterablewhenever GitHub returned explicitnullforlabelsorassignees.labelsfrom LLMs intotool_create_issuecaused malformed GitHub payload construction and 422 Unprocessable Entity responses./tools/add_issue_commentreceived 404 because only/tools/add_commentwas registered.userinfodomains, failed on single-segment paths, and rejected standard[email protected]:SSH format.save_users()wrote directly to disk without locks or atomic replace, risking zero-byte corruption under concurrency.Solution & Changes
main.py:_validate_owner_repoandget_repo_for_requestusing^[a-zA-Z0-9_.-]+$whitelist regex, blocking control chars (\n,\r,\t,\0) and traversal (.,..).available_reposandselected_repowith unambiguous match resolution, explicit candidate disambiguation errors, and substring matching threshold (len >= 3).urllib.parse.urlparsecheckinghostname, blocking spoofed hosts, and handling SSH URLs.labelsintool_create_issueto handle string lists orNone.@app.post("/tools/add_issue_comment")route alias for full compatibility./update-repo.github_client.py:dict.get(..., [])iteration with null-safe comprehension guards(issue.get("labels") or [])checking item dict structures.❌,⚠️) with[ERROR]and[WARN]to prevent Windows/ASCII stdout encoding crashes.timeout=self.timeoutacross all network requests.simple_storage.py:threading.Lockand atomic write (tempfile+os.replace) insave_users()..github/checks-manifest.yaml&test_main.py:Verification
Bounty & Contributor Reward Proposal
US$50 Bounty + 1-PR Contributor DevKit Reward (@josancamon19 @kodjima33):
1NkUnv23H65ZYJn64pseAcWRA6sJitxh2f(Network: Bitcoin Mainnet)[email protected]