polaris

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConverter = NewConverter()

Functions

This section is empty.

Types

type Check

type Check struct {
	ID       string `json:"ID"`
	Message  string `json:"Message"`
	Success  bool   `json:"Success"`
	Severity string `json:"Severity"`
	Category string `json:"Category"`
}

type ClusterInfo

type ClusterInfo struct {
	Version     string `json:"Version"`
	Nodes       int    `json:"Nodes"`
	Pods        int    `json:"Pods"`
	Namespaces  int    `json:"Namespaces"`
	Controllers int    `json:"Controllers"`
}

type ContainerResult

type ContainerResult struct {
	Name    string           `json:"Name"`
	Results map[string]Check `json:"Results"`
}

type Converter

type Converter interface {
	Convert(reader io.Reader) ([]sec.ConfigAudit, error)
}

func NewConverter

func NewConverter() Converter

type PodResult

type PodResult struct {
	Name             string            `json:"Name"`
	Results          map[string]Check  `json:"Results"`
	ContainerResults []ContainerResult `json:"ContainerResults"`
}

type Report

type Report struct {
	PolarisOutputVersion string       `json:"PolarisOutputVersion"`
	SourceType           string       `json:"SourceType"`
	ClusterInfo          *ClusterInfo `json:"ClusterInfo"`
	Results              []Result     `json:"Results"`
}

type Result

type Result struct {
	Name      string    `json:"Name"`
	Namespace string    `json:"Namespace"`
	Kind      string    `json:"Kind"`
	PodResult PodResult `json:"PodResult"`
}

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner(clientset kubernetes.Interface) *Scanner

func (*Scanner) Scan

func (s *Scanner) Scan() (reports []starboard.ConfigAudit, err error)

type Writer

type Writer interface {
	Write(report sec.ConfigAudit) (err error)
	WriteAll(reports []sec.ConfigAudit) (err error)
}

Write is the interface that wraps basic methods for persisting ConfigAudit reports.

Write persists the given ConfigAudit report.

WriteAll persists the given slice of ConfigAudit reports.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL