Remote Taskfiles: redact credentials of remote URLs in prompts and logs#2045
Remote Taskfiles: redact credentials of remote URLs in prompts and logs#2045iwittkau wants to merge 2 commits intogo-task:mainfrom
Conversation
|
I've turned this into a draft for now. |
|
|
||
| func (node *GitNode) FilenameAndLastDir() (string, string) { | ||
| return filepath.Base(node.path), filepath.Base(filepath.Dir(node.path)) | ||
| return filepath.Base(filepath.Dir(node.filepath)), filepath.Base(node.filepath) |
There was a problem hiding this comment.
taskfile/cache.go uses it like this:
lastDir, filename := node.FilenameAndLastDir()03a5551 to
3fc6d75
Compare
|
Compiling it and running this as a development version actually breaks my own git-based Remote Taskfiles setup 😅 Back to draft, I guess. |
3fc6d75 to
6a3da1a
Compare
8b53b31 to
8d0a6cd
Compare
8d0a6cd to
7f6737a
Compare
7f6737a to
cf8d60b
Compare
|
I don't think it makes sense to keep this open. A lot of the affected code was changed in the meantime. I think it would make more sense to think about URL redaction in the final stages of the experiment when the code has become more stable. |
|
Hi @iwittkau. Sorry for that. As you said, the code is changing a lot at the moment so things often go out of date very quickly. Thanks for your time though. Hopefully the conversation and changes here are still a useful reference to anyone implementing this in the future. |
This is to improve #1317.
I've implemented redaction support for the
taskfile.Nodeinterface, specifically for thetaskfile.GitNodeimplementation which was logged with the clear-text user access tokens before.