MCPcopy Index your code
hub / github.com/simstudioai/sim / scrubGitSecrets

Function scrubGitSecrets

apps/sim/executor/handlers/pi/cloud-backend.ts:130–133  ·  view source on GitHub ↗

* Redacts the GitHub token from git output before it is surfaced in an error. * Removes the literal token and any URL userinfo (`//user:token@`), so a failure * message can quote git's real stderr without leaking the credential.

(text: string, token: string)

Source from the content-addressed store, hash-verified

128 * message can quote git's real stderr without leaking the credential.
129 */
130function scrubGitSecrets(text: string, token: string): string {
131 const withoutToken = token ? text.split(token).join('***') : text
132 return withoutToken.replace(/\/\/[^/@\s]+@/g, '//***@')
133}
134
135function buildPrBody(task: string, finalText: string): string {
136 const summary = finalText.trim()

Callers 1

runCloudPiFunction · 0.85

Calls 2

joinMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected