repo_description: 📦  Make security testing of K8s, Docker, and Containerd easier.
repo_topics: blackhat cloud-native cloud-native-security container container-escape container-security docker exploits hacktools hitb k8s k8s-penetration-toolkit kernel-exploitation kubernetes kubernetes-security linux penetration penetration-testing-tools privilege-escalation vulnerabilities
code: package util
  
  type KubeConfig struct {
  	APIVersion     string    `yaml:"apiVersion"`
  	Clusters       []Cluster `yaml:"clusters"`
  	Contexts       []Context `yaml:"contexts"`
  	CurrentContext string    `yaml:"current-context"`
  	Kind           string    `yaml:"kind"`
  	Preferences    struct{}  `yaml:"preferences"`
  	Users          []User    `yaml:"users"`
  }
  
  type Cluster struct {
  	Cluster ClusterInfo `yaml:"cluster"`
  	Name    string      `yaml:"name"`
  }
  
  type ClusterInfo struct {
  	CertificateAuthorityData string `yaml:"certificate-authority-data"`
  	Server                   string `yaml:"server"`
  }
  
  type Context struct {
  	Context ContextInfo `yaml:"context"`
  	Name    string      `yaml:"name"`
  }
  
  type ContextInfo struct {
  	Cluster string `yaml:"cluster"`
  	User    string `yaml:"user"`
  }
  
  type User struct {
  	Name string   `yaml:"name"`
  	User UserInfo `yaml:"user"`
  }
  
  type UserInfo struct {
  	ClientCertificateData string `yaml:"client-certificate-data"`
  	ClientKeyData         string `yaml:"client-key-data"`
  }
  
  func RunKubectlCmd(args ...string) (string, error) {
  	var stdoutStr string
  	var err error
  
  	return stdoutStr, err
  }
  