#File.Contents prints whole file in log

1 messages · Page 1 of 1 (latest)

vague notch
#

Hi, I read a file from a directory (module written in golang) using:

content, err := someDirectory.File(“foo.txt”).Contents(ctx)

The problem I am facing now is that the whole content of the file is shown in the dagger log output and dagger.cloud. In case such a file contains secrets they will be revealed and send to dagger.cloud.
Along with the security problem it pollutes the logs. If I want to show the content of the file, I would do it with an extra option or command.

Is there a way to stop dagger from sending file content to the logs and to dagger.cloud?

I would be happy to get some ideas.

Thanks
Dominik

#

File.Contents prints whole file in log

tulip socket
vague notch
#

Hi, agree, no secrets should be passed in files to the build pipeline.
Are there ideas to pass an env file which is treated as secrets? That would help a lot in managing multiple secrets more dynamically.