fix(miner): reject non-hex commitSha in replay-snapshot path planner - #7891
fix(miner): reject non-hex commitSha in replay-snapshot path planner#7891bohdansolovie wants to merge 1 commit into
Conversation
Reuse the same /^[0-9a-f]{7,40}$/i guard as replay-task-generation so a
path-traversal-shaped commitSha cannot escape .loopover-replay-snapshots.
Closes JSONbored#7796
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7891 +/- ##
==========================================
- Coverage 91.39% 88.41% -2.99%
==========================================
Files 730 89 -641
Lines 74774 21318 -53456
Branches 22818 3698 -19120
==========================================
- Hits 68343 18849 -49494
+ Misses 5389 2291 -3098
+ Partials 1042 178 -864
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-21 16:26:20 UTC
Review summary Nits — 5 non-blocking
CI checks failing
Flagged checks (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 (CI is failing (codecov/patch)). 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
normalizeCommitShawith/^[0-9a-f]{7,40}$/i(same guard asreplay-task-generation.ts) and lowercase the accepted value.path.join.Closes #7796
Test plan
vitest run test/unit/miner-replay-snapshot.test.tschanges,validate-code,validate-tests,validate-tests-merge,codecov/patch)Made with Cursor