vault-secrets-buildkite-plugin
vault-secrets-buildkite-plugin copied to clipboard
plugin adds YAML escaping to boolean and numeric values
there's a bug in this plugin in that it inconsistently adds YAML escaping, e.g.
krs1
=> krs1
1
=> "1"
0.95
=> "0.95"
0.0.0.1
=> 0.0.0.1
// if there's more than one dot, it's treated as a string instead of a number
true
=> "true"
false
=> "false"
truey
=> truey
falsey
=> falsey
this is because you're using the vault cli
and adding YAML format here, but failing to YAML escape it after you pull it down.
- incidentally, the vault CLI also has a bug of sorts. you'd expect to see all those values above escaped consistently, but vault only escapes the ones that must be escaped. either way, i'd expect that if you apply a YAML unescape on your end, it would still work fine and just ignore values that aren't escaped.
fwiw we started using this plugin at my company, but it would be hard to use it for values that get escaped because our code would have to add yaml escaping everywhere it loads these environment variables.
thank you.
Thanks for the insights here @ClayShentrup ! I wasn't aware of the bug in the vault CLI, that's really good to know. Looking at shipping a fix for this one :)
Hey, fixed the issue PR https://github.com/buildkite-plugins/vault-secrets-buildkite-plugin/pull/51 and https://github.com/buildkite-plugins/vault-secrets-buildkite-plugin/pull/52
thank you! what are your thougths on my comment here? https://github.com/buildkite-plugins/vault-secrets-buildkite-plugin/pull/51/files#r1633670512