fix(miner): wire isValidRepoSegment into the seven remaining owner/repo parsers - #9911
Conversation
…po parsers discover-cli/loop-cli's parseRepoTarget, manage-poll/purge-cli/run-state-cli's parseRepoArg, and event-ledger/ranked-candidates's normalize helpers all split an owner/repo string without checking either segment against the shared path-traversal guard, so a `.`/`..`/control-char value could still reach resolveRepoCloneDir, persist into the event ledger, or land in the ranked-candidates snapshot. Each now rejects through its own existing error shape, matching the pattern already used in portfolio-queue-cli.ts and claim-ledger.ts. Also drops the stale file list from repo-clone.ts's guard comment now that every parser in the package shares it.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-29 22:03:07 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
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 #9911 +/- ##
==========================================
+ Coverage 79.52% 79.88% +0.36%
==========================================
Files 281 289 +8
Lines 58577 59628 +1051
Branches 6833 7184 +351
==========================================
+ Hits 46581 47632 +1051
Misses 11706 11706
Partials 290 290
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fix(miner): wire isValidRepoSegment into the seven remaining owner/repo parsers
discover-cli/loop-cli's parseRepoTarget, manage-poll/purge-cli/run-state-cli's
parseRepoArg, and event-ledger/ranked-candidates's normalize helpers all split
an owner/repo string without checking either segment against the shared
path-traversal guard, so a
./../control-char value could still reachresolveRepoCloneDir, persist into the event ledger, or land in the
ranked-candidates snapshot. Each now rejects through its own existing error
shape, matching the pattern already used in portfolio-queue-cli.ts and
claim-ledger.ts. Also drops the stale file list from repo-clone.ts's guard
comment now that every parser in the package shares it.
Closes #9684
Validation
Verified locally on this branch before opening:
npm run typechecknpx turbo run build:tsc build:verifynpm run test:coverage— patch coverage 100.0% of changed lines