You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: kubescape.go
    path of file: ./repos/validkube/backend/api/kubescape
    
    the code of the file until where you have to start completion: package kubescape

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"os"
	"os/exec"
	"path/filepath"
	"strings"

	"github.com/gin-gonic/gin"
	"github.com/google/uuid"
	"gopkg.in/yaml.v2"

	"github.com/komodorio/validkube/backend/api/utils"
	"github.com/komodorio/validkube/backend/internal/routing"
)

const Path = "/kubescape"
const Method = routing.POST

func kubescapeWrapper(inputYaml []byte) ([]byte, error) {

	tmpDir := filepath.Join("/tmp", "yaml")
	err := utils.CreateDirectory(tmpDir)
	if err != nil {
		return nil, err
	}

	file, err := ioutil.TempFile(tmpDir, "target_*.yaml")
	if err != nil {
		return nil, err
	}
	defer os.Remove(file.Name())

	if _, err := file.Write(inputYaml); err != nil {
		return nil, err
	}

	outputFile := filepath.Join(tmpDir, fmt.Sprintf("%s.json", uuid.NewString()))
	exec.Command("kube
    
func listFailedControls(controls []ResourceAssociatedControl) []Control {

	var failedControls []Control
	for _, c := range controls {
		control := Control{
			ControlName: c.Name,
			Docs:        fmt.Sprintf("https://hub.armo.cloud/docs/%s", strings.ToLower(c.ControlID)),
		}

		if !isFailed(c) {
			continue // controls passed, ignore results
		}

		for i := range c.ResourceAssociatedRules {
			if c.ResourceAssociatedRules[i].Status != "failed" {
				continue
			}
			for _, p := range c.ResourceAssociatedRules[i].Paths {
				if p.FailedPath != "" {
					control.Paths = append(control.Paths, p.FailedPath)
				}
				if p.FixCommand != "" {
					control.Paths = append(control.Paths, p.FixCommand)
				}
				if p.FixPath.Path != "" {
					control.Paths = append(control.Paths, fmt.Sprintf("%s=%s", p.FixPath.Path, p.FixPath.Value))
				}
			}

		}
		failedControls = append(failedControls, control)
	}
	return failedControls
}