Commit fe67f9d
committed
fix(miner): validate commitSha as 7-40 hex before joining it into the replay path
normalizeCommitSha accepted any non-empty string and the value was join()'d
straight into planReplaySnapshotPath's on-disk path, so a '../..'-laden commitSha
could escape the repo dir (path traversal). Enforce the same 7-40 hex format its
sibling replay-task-generation.ts already applies, so a malformed/traversal value
throws invalid_commit_sha before it ever reaches path.join. Placeholder short
SHAs in the affected fixtures (miner-replay-snapshot + the miner-store-seam-rollout
cross-file consumer) updated to valid hex.
Closes #77961 parent 510d25b commit fe67f9d
3 files changed
Lines changed: 80 additions & 56 deletions
File tree
- packages/loopover-miner/lib
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
| |||
0 commit comments