Thanatos9404 opened a new pull request, #9247: URL: https://github.com/apache/devlake/pull/9247
### Summary After `PATCH /blueprints/:id`, `PatchBlueprint` sanitized the same blueprint object the cron job had just been given, and the gitextractor sanitizer rewrote `options["url"]` in place. Scheduled runs then cloned with a masked URL until the server restarted. Normal-mode blueprints with credentials in `beforePlan` or `afterPlan` were affected too, since those tasks are shared with the generated plan. Sanitizing now works on copies: the options map is cloned before masking, `SanitizeTask` returns a new task, and `SanitizeBlueprint` and `SanitizePipeline` build a new plan. `PatchBlueprint` sanitizes a copy for its response, so the returned plan is still masked. Its `beforePlan` and `afterPlan` now come back unmasked, as GET already returns them; before, they were masked only through this aliasing. Two new unit tests in `blueprint_test.go` fail on main and pass here, and `go test`, `go vet` and golangci-lint are clean for `server/services`. ### Does this close any open issues? Closes #9243 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
