fix(selfhost): validate private config repo names#1563
Merged
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1563 +/- ##
=======================================
Coverage 95.42% 95.42%
=======================================
Files 202 202
Lines 21674 21679 +5
Branches 7833 7835 +2
=======================================
+ Hits 20683 20688 +5
Misses 416 416
Partials 575 575
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge
Nits — 2 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
This was referenced Jun 27, 2026
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.
Motivation
owner/..could cause reads outsideGITTENSORY_REPO_CONFIG_DIR../..or extra slashes.Description
./..segments before building candidates inlocalConfigCandidates(src/selfhost/private-config.ts).resolve()so reads are always performed against resolved paths; keep the existing lookup priority (owner-qualified folder → bare repo folder → flat file → global fallback).test/unit/private-config.test.ts)..yml,.yaml,.json).Testing
vitest run test/unit/private-config.test.ts, all tests passed (12 tests).npm run test:coverage -- --run test/unit/private-config.test.ts, the targeted tests ran but coverage remapping failed withTypeError: jsTokens is not a functionduring report generation.npm run typecheckwhich reported unrelated local type resolution issues for@sentry/nodeinsrc/selfhost/sentry.tsand prevented a clean full typecheck run.npm run test:ci, which was blocked byactionlintsetup/network issues (WASM fallback flagged a custom self-host runner label);npm audit --audit-level=moderatereturned a 403 from the npm audit endpoint.Codex Task