cyberark / summon

CLI that provides on-demand secrets access for common DevOps tools
https://cyberark.github.io/summon
MIT License
704 stars 62 forks source link

Summon can't parse empty tags in YAML with multiple keys #124

Closed izgeri closed 4 years ago

izgeri commented 4 years ago

@infamousjoeg shared that he can run summon with YAML that includes empty references here

but I just tried to run summon with secrets.yml

GITHUB_USERNAME:
GITHUB_AUTH_TOKEN: !var github/api_token

and it errored

OOPS! {Kind:8 Style:0 Tag:!!null Value: Anchor: Alias:<nil> Content:[] HeadComment: LineComment: FootComment: Line:1 Column:17}

which appears to come from https://github.com/cyberark/summon/blob/3a33a5fcca52d43e1e6007e9075e8989acb2ee53/secretsyml/secretsyml.go#L102

I would expect that if I have an empty tag/secret in the secrets.yml, Summon would set an empty env var or set the env var to the value from my environment (if set). I haven't been able to dig into why it errored, but I think this is a bug considering how it behaved for Joe when his YAML was a single key with no tag/secret.

sgnn7 commented 4 years ago

@infamousjoeg We got a fix in now but I'm not going to build a release for it unless you need it now since it's a bit of a time-consuming task. Ping me if you need that done.

izgeri commented 4 years ago

since it's not available in a release yet, I'm going to reopen it for now - but maybe these kinds of thing should have a pending-release label (or similar)

ETA: it's ok with me if this is unreleased for now, until we have 1-2 more changes to bundle into a release with this

micahlee commented 4 years ago

As a heads up, even with just the "Connected to" reference, GH still auto-closed this when I merged the PR(#125).

izgeri commented 4 years ago

Thanks @micahlee - that's gtk

sgnn7 commented 4 years ago

Closing as "released". v0.8.1 can be found here.