Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeSecResults ¶
type KubeSecResults []KubesecResult
KubeSecResults - holds a slice of scan results
type KubesecClient ¶
type KubesecClient struct { URL string // URL to send the request for scanning TimeOutSec int // Scan timeout in seconds }
KubesecClient represent a client for kubesec.io
func NewClient ¶
func NewClient(url string, timeOutSec int) *KubesecClient
NewClient returns a new client for kubesec.io.
func (*KubesecClient) ScanDefinition ¶
func (kc *KubesecClient) ScanDefinition(def bytes.Buffer) (KubeSecResults, error)
ScanDefinition scans the provided resource definition.
type KubesecResult ¶
type KubesecResult struct { Error string `json:"error"` Score int `json:"score"` Scoring struct { Critical []struct { Selector string `json:"selector"` Reason string `json:"reason"` Weight int `json:"weight"` } `json:"critical"` Advise []struct { Selector string `json:"selector"` Reason string `json:"reason"` Href string `json:"href,omitempty"` } `json:"advise"` } `json:"scoring"` }
KubesecResult represents a result returned by kubesec.io.
func (*KubesecResult) Dump ¶
func (r *KubesecResult) Dump(w io.Writer)
Dump writes the result in a human-readable format to the specified writer.
Click to show internal directories.
Click to hide internal directories.