-
-
Notifications
You must be signed in to change notification settings - Fork 674
Remote Taskfiles: redact credentials of remote URLs in prompts and logs #2045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've turned this into a draft for now. |
@@ -122,5 +121,5 @@ func (node *GitNode) ResolveDir(dir string) (string, error) { | |||
} | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.Node
interface, specifically for thetaskfile.GitNode
implementation which was logged with the clear-text user access tokens before.