fix(miner): validate commit SHA format in replay-snapshot path planner (#7796) - #7830
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #7830 +/- ##
==========================================
- Coverage 88.65% 88.54% -0.11%
==========================================
Files 730 89 -641
Lines 76959 21318 -55641
Branches 22789 3698 -19091
==========================================
- Hits 68229 18877 -49352
+ Misses 7684 2256 -5428
+ Partials 1046 185 -861
Flags with carried forward coverage won't be shown. Click here to find out more.
|
05db29c to
8f1c468
Compare
JSONbored#7796) Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-21 14:27:12 UTC
Review summary Nits — 5 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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (conflicts with the base branch — resolve and open a fresh PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
/^[0-9a-f]{7,40}$/ivalidation tonormalizeCommitSha(matchingreplay-task-generation.ts) so path-traversal-shaped values are rejected beforepath.join()n- Normalize valid SHAs to lowercase for deterministic snapshot paths../../../../../../tmp/evil-worktree-shaped input; update fixture SHAs across replay-snapshot tests to meet the 7-char minimumCloses #7796
Test plan
npm run typecheckpasses locallynpm run build:tscin miner workspace emits matching.jsMade with Cursor