kubescape

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func ProcessRequest

func ProcessRequest(c *gin.Context)

ProcessRequest process kubescape request

Types

type Control added in v1.0.2

type Control struct {
	ControlName string   `json:"controlName"`
	Docs        string   `json:"docs"`
	Paths       []string `json:"paths,omitempty"`
}

type Display added in v1.0.2

type Display struct {
	Resources []Resource `json:"-"`
}

type FixPath added in v1.0.2

type FixPath struct {
	Path  string `json:"path"`
	Value string `json:"value"`
}

type KubescapeResults added in v1.0.2

type KubescapeResults struct {
	Results []Result `json:"results,omitempty"`
}

PostureReport posture scanning report structure

type PosturePaths added in v1.0.2

type PosturePaths struct {
	// must have FailedPath or FixPath, not both
	FailedPath string  `json:"failedPath,omitempty"`
	FixPath    FixPath `json:"fixPath,omitempty"`
	FixCommand string  `json:"fixCommand,omitempty"`
}

type Resource added in v1.0.2

type Resource struct {
	ApiVersion      string    `json:"apiVersion"`
	Kind            string    `json:"kind"`
	Name            string    `json:"name"`
	Namespace       string    `json:"namespace,omitempty"`
	Summary         Summary   `json:"summary,omitempty"` // TODO - support summary
	ControlsSummary []Control `json:"controls"`
}

type ResourceAssociatedControl added in v1.0.2

type ResourceAssociatedControl struct {
	ControlID               string                   `json:"controlID"`
	Name                    string                   `json:"name"`
	ResourceAssociatedRules []ResourceAssociatedRule `json:"rules,omitempty"`
}

ResourceAssociatedControl control that is associated to a resource

type ResourceAssociatedRule added in v1.0.2

type ResourceAssociatedRule struct {
	Name                  string              `json:"name"` // rule name
	Status                string              `json:"status"`
	Paths                 []PosturePaths      `json:"paths,omitempty"`
	ControlConfigurations map[string][]string `json:"controlConfigurations,omitempty"`
}

ResourceAssociatedRule failed rule that is associated to a resource

type Result added in v1.0.2

type Result struct {
	ResourceID         string                      `json:"resourceID"` // <api-group>/<namespace>/<kind>/<name>
	AssociatedControls []ResourceAssociatedControl `json:"controls,omitempty"`
}

type Summary added in v1.0.2

type Summary struct {
	Failed int `json:"failed"`
	Passed int `json:"passed"`
	All    int `json:"all"`
}

Jump to

Keyboard shortcuts

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