diff --git a/cmd/gsap-attestor/main.go b/cmd/gsap-attestor/main.go index 95f72c3..726a79f 100644 --- a/cmd/gsap-attestor/main.go +++ b/cmd/gsap-attestor/main.go @@ -2,7 +2,6 @@ package main import ( "context" - "encoding/json" "sync" "github.com/hashicorp/hcl/v2/hclsimple" @@ -42,7 +41,7 @@ func (p *Plugin) Attest(ctx context.Context, req *workloadattestorv1.AttestReque func decodeConfig(data string) (GsapAttestorConfig, error) { var cfg GsapAttestorConfig - if err := json.Unmarshal([]byte(data), &cfg); err != nil { + if err := hclsimple.Decode("plugin.json", []byte(data), nil, &cfg); err != nil { if err2 := hclsimple.Decode("plugin.hcl", []byte(data), nil, &cfg); err2 != nil { return cfg, err2 }