Secret file with invalid definition breaks drone output (asterisks in drone build output)

When using a secrets-file, if any of the secrets files do not assign a value to the secret, it results in the drone exec output having a bunch of extra asterisks in the output.

The build works fine when the secret is defined as “mysecret=secret”

But when passing an “empty” secret, the build output looks like:

In this case the secret is defined as “mysecret=”

It seems that Drone is using https://github.com/joho/godotenv#usage for secret file formats - and it’s quite possible this secret definition is just plain wrong per the gotdotenv spec, but I would expect an error or for the secret to be ignored instead of the confusing build output.

Here’s a repo that demonstrates the issue: https://github.com/ryanclemson/drone-logging-asterisks-from-secret

Run “make install-good” for a the first scenario, and “make install-bad” for the second

Obviously, this not a show stopper bug. Reporting it here so it can get addressed, or at a minimum, other folks googling for answers can find this if they happen to find asterisks (********) polluting their output.:slight_smile:

P.S. Thanks for supporting Drone! We love it!

I should add that this was only happening for some folks on my team using drone locally, and not others

i’m running drone (installed via homebrew) version 1.2.4 and Docker version 20.10.0, build 7287ab3 - tho I suspect docker pipeline have nothing to do with it and there is another dependency at play

This was fixed by this patch:

The runners are using the latest version of this code and therefore you will not experience this issue when running builds through the server. However, the command line tools are not using the latest version of the runtime engine. Upgrading the command line tools to use the latest version of the runtime engine is on our roadmap.

Thanks for the quick reply!