A Regular Expression Denial of Service (ReDoS) exists in the `addGitSha()` function. An attacker can cause excessive CPU consumption, potentially stalling or crashing the process, by providing a specially crafted `spec.rawSpec` value. This occurs when the function's regex replacement and string-manipulation logic are triggered, pinning a CPU core. The issue is reachable by unauthenticated users wherever the library consumes user-controlled package specifications.