Skip to content

shamir treshold breaks env files (panic: interface conversion: interface {} is float64, not string) #857

@cohadar

Description

@cohadar

sops: 3.7.1 (ubuntu)

.sops.yaml

creation_rules:
- shamir_threshold: 2
  key_groups:
  - pgp:
    - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  - pgp:
    - YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

command:
sops example.env

produces:

panic: interface conversion: interface {} is float64, not string

goroutine 1 [running]:
go.mozilla.org/sops/v3/stores/dotenv.(*Store).EmitPlainFile(0x1a17488, 0xc0005d24e0, 0x1, 0x1, 0x3, 0xc0005af040, 0x8, 0x10, 0x0)
	/Users/ajvb/gocode/src/go.mozilla.org/sops/stores/dotenv/store.go:122 +0x3f6
go.mozilla.org/sops/v3/stores/dotenv.(*Store).EmitEncryptedFile(0x1a17488, 0x21816938, 0xed80b80e1, 0x0, 0x11adb59, 0xc, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/ajvb/gocode/src/go.mozilla.org/sops/stores/dotenv/store.go:107 +0x2fa
main.editTree(0x137d960, 0xc000490fc0, 0x138f380, 0x1a17488, 0x138f380, 0x1a17488, 0xc0001a4840, 0x5c, 0x0, 0xc00048d1d0, ...)
	/Users/ajvb/gocode/src/go.mozilla.org/sops/cmd/sops/edit.go:164 +0xa35
main.editExample(0x137d960, 0xc000490fc0, 0x138f380, 0x1a17488, 0x138f380, 0x1a17488, 0xc0001a4840, 0x5c, 0x0, 0xc00048d1d0, ...)
	/Users/ajvb/gocode/src/go.mozilla.org/sops/cmd/sops/edit.go:84 +0x51b
main.main.func8(0xc0001e4dc0, 0x0, 0x0)
	/Users/ajvb/gocode/src/go.mozilla.org/sops/cmd/sops/main.go:943 +0x24bc
gopkg.in/urfave/cli%2ev1.HandleAction(0xfdafa0, 0x11f8d28, 0xc0001e4dc0, 0x0, 0x0)
	/Users/ajvb/gocode/src/go.mozilla.org/sops/vendor/gopkg.in/urfave/cli.v1/app.go:490 +0x82
gopkg.in/urfave/cli%2ev1.(*App).Run(0xc00047c4e0, 0xc00018c000, 0x2, 0x2, 0x0, 0x0)
	/Users/ajvb/gocode/src/go.mozilla.org/sops/vendor/gopkg.in/urfave/cli.v1/app.go:264 +0x5f5
main.main()
	/Users/ajvb/gocode/src/go.mozilla.org/sops/cmd/sops/main.go:987 +0x3885

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority/mediumMedium priority issues (e.g. breaking changes that have a workaround)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions