diff --git a/pkg/plugins/execplugin.go b/pkg/plugins/execplugin.go index be44c8e73..38699a745 100644 --- a/pkg/plugins/execplugin.go +++ b/pkg/plugins/execplugin.go @@ -160,6 +160,9 @@ func (p *ExecPlugin) invokePlugin(input []byte) ([]byte, error) { if err != nil { return nil, err } + // Cleanup plugin config file after execution + defer os.Remove(args[0]) + cmd := exec.Command(p.path, args...) cmd.Env = p.getEnv() cmd.Stdin = bytes.NewReader(input)