-
Notifications
You must be signed in to change notification settings - Fork 141
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
[BUG] Error parsing multi-line secrets because the output contains "\n" #160
Comments
Thanks for the report @tombertrand, we'll take a look! |
@jasonodonnell any news about this? |
Sorry for the delay, we have a company wide shutdown for a few weeks in December and are just returning. We'll take a look at this soon! |
@jasonodonnell Thanks for the quick answer. |
Opened a PR |
Thanks @bilucodota, taking a look! |
Fixed per #173. |
Describe the bug
We currently have a vault secret that is a multi-line exported certificate. When setting it to an env variable, the output of vault-action contains
\n
instead of new lines.To Reproduce
Store a multi line pub key, eg:
Notice that the key will be returned as
Expected behavior
Since the key is being used to sign an app it needs to be returned without the line escaping.
By adding a
result = JSON.parse(result)
before removing the quote we are able to get the expected value and our code sign task succeeds but I doubt that's the correct fix.https://github.com/hashicorp/vault-action/blob/master/src/secrets.js#L75
The text was updated successfully, but these errors were encountered: