Documentation ¶
Index ¶
- Constants
- Variables
- func GetDefaultPath(name string) string
- func HttpGetter(httpClient *http.Client, fullURL string, headers map[string]string) (string, error)
- func HttpPost(httpClient *http.Client, fullURL string, headers map[string]string, ...) (string, error)
- func JSONDecoder(origin string) *json.Decoder
- func SaveControlInFile(control *reporthandling.Control, pathStr string) error
- func SaveFrameworkInFile(framework *reporthandling.Framework, pathStr string) error
- func SetARMOAPIConnector(armoAPI *ArmoAPI)
- type ArmoAPI
- func (armoAPI *ArmoAPI) GetAccountConfig(customerGUID, clusterName string) (*armotypes.CustomerConfig, error)
- func (armoAPI *ArmoAPI) GetControl(policyName string) (*reporthandling.Control, error)
- func (armoAPI *ArmoAPI) GetControlsInputs(customerGUID, clusterName string) (map[string][]string, error)
- func (armoAPI *ArmoAPI) GetCustomerGUID(customerGUID string) (*TenantResponse, error)
- func (armoAPI *ArmoAPI) GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)
- func (armoAPI *ArmoAPI) GetFramework(name string) (*reporthandling.Framework, error)
- func (armoAPI *ArmoAPI) GetFrontendURL() string
- func (armoAPI *ArmoAPI) GetReportReceiverURL() string
- func (armoAPI *ArmoAPI) ListCustomFrameworks(customerGUID string) ([]string, error)
- func (armoAPI *ArmoAPI) ListFrameworks(customerGUID string) ([]string, error)
- func (armoAPI *ArmoAPI) SetCustomerGUID(customerGUID string)
- type DownloadReleasedPolicy
- func (drp *DownloadReleasedPolicy) GetControl(policyName string) (*reporthandling.Control, error)
- func (drp *DownloadReleasedPolicy) GetControlsInputs(customerGUID, clusterName string) (map[string][]string, error)
- func (drp *DownloadReleasedPolicy) GetFramework(name string) (*reporthandling.Framework, error)
- func (drp *DownloadReleasedPolicy) SetRegoObjects() error
- type IBackend
- type IControlsInputsGetter
- type IExceptionsGetter
- type IPolicyGetter
- type LoadPolicy
- func (lp *LoadPolicy) GetControl(controlName string) (*reporthandling.Control, error)
- func (lp *LoadPolicy) GetControlsInputs(customerGUID, clusterName string) (map[string][]string, error)
- func (lp *LoadPolicy) GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)
- func (lp *LoadPolicy) GetFramework(frameworkName string) (*reporthandling.Framework, error)
- type TenantResponse
Constants ¶
const DefaultLocalStore = ".kubescape"
======================================================================================================================= ============================================== LoadPolicy ============================================================= =======================================================================================================================
Variables ¶
var NativeFrameworks = []string{"nsa", "mitre", "armobest", "devopsbest"}
Functions ¶
func GetDefaultPath ¶
func HttpGetter ¶
func JSONDecoder ¶
JSONDecoder returns JSON decoder for given string
func SaveControlInFile ¶ added in v1.0.84
func SaveControlInFile(control *reporthandling.Control, pathStr string) error
Save control as json in file
func SaveFrameworkInFile ¶
func SaveFrameworkInFile(framework *reporthandling.Framework, pathStr string) error
func SetARMOAPIConnector ¶ added in v1.0.78
func SetARMOAPIConnector(armoAPI *ArmoAPI)
Types ¶
type ArmoAPI ¶
type ArmoAPI struct {
// contains filtered or unexported fields
}
Armo API for downloading policies
func GetArmoAPIConnector ¶ added in v1.0.78
func GetArmoAPIConnector() *ArmoAPI
func NewARMOAPICustomized ¶ added in v1.0.78
func NewARMOAPIDev ¶ added in v1.0.78
func NewARMOAPIDev() *ArmoAPI
func NewARMOAPIProd ¶ added in v1.0.78
func NewARMOAPIProd() *ArmoAPI
func (*ArmoAPI) GetAccountConfig ¶ added in v1.0.101
func (armoAPI *ArmoAPI) GetAccountConfig(customerGUID, clusterName string) (*armotypes.CustomerConfig, error)
ControlsInputs // map[<control name>][<input arguments>]
func (*ArmoAPI) GetControl ¶ added in v1.0.131
func (armoAPI *ArmoAPI) GetControl(policyName string) (*reporthandling.Control, error)
func (*ArmoAPI) GetControlsInputs ¶ added in v1.0.101
func (armoAPI *ArmoAPI) GetControlsInputs(customerGUID, clusterName string) (map[string][]string, error)
ControlsInputs // map[<control name>][<input arguments>]
func (*ArmoAPI) GetCustomerGUID ¶ added in v1.0.42
func (armoAPI *ArmoAPI) GetCustomerGUID(customerGUID string) (*TenantResponse, error)
func (*ArmoAPI) GetExceptions ¶ added in v1.0.36
func (armoAPI *ArmoAPI) GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)
func (*ArmoAPI) GetFramework ¶
func (armoAPI *ArmoAPI) GetFramework(name string) (*reporthandling.Framework, error)
func (*ArmoAPI) GetFrontendURL ¶ added in v1.0.78
func (*ArmoAPI) GetReportReceiverURL ¶ added in v1.0.78
func (*ArmoAPI) ListCustomFrameworks ¶ added in v1.0.131
func (*ArmoAPI) ListFrameworks ¶ added in v1.0.131
func (*ArmoAPI) SetCustomerGUID ¶ added in v1.0.131
type DownloadReleasedPolicy ¶
type DownloadReleasedPolicy struct {
// contains filtered or unexported fields
}
Use gitregostore to get policies from github release
func NewDownloadReleasedPolicy ¶
func NewDownloadReleasedPolicy() *DownloadReleasedPolicy
func (*DownloadReleasedPolicy) GetControl ¶ added in v1.0.84
func (drp *DownloadReleasedPolicy) GetControl(policyName string) (*reporthandling.Control, error)
func (*DownloadReleasedPolicy) GetControlsInputs ¶ added in v1.0.137
func (drp *DownloadReleasedPolicy) GetControlsInputs(customerGUID, clusterName string) (map[string][]string, error)
func (*DownloadReleasedPolicy) GetFramework ¶
func (drp *DownloadReleasedPolicy) GetFramework(name string) (*reporthandling.Framework, error)
func (*DownloadReleasedPolicy) SetRegoObjects ¶ added in v1.0.133
func (drp *DownloadReleasedPolicy) SetRegoObjects() error
type IBackend ¶ added in v1.0.65
type IBackend interface {
GetCustomerGUID(customerGUID string) (*TenantResponse, error)
}
type IControlsInputsGetter ¶ added in v1.0.101
type IExceptionsGetter ¶ added in v1.0.44
type IExceptionsGetter interface {
GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)
}
type IPolicyGetter ¶
type IPolicyGetter interface { GetFramework(name string) (*reporthandling.Framework, error) GetControl(name string) (*reporthandling.Control, error) }
type LoadPolicy ¶
type LoadPolicy struct {
// contains filtered or unexported fields
}
Load policies from a local repository
func NewLoadPolicy ¶
func NewLoadPolicy(filePaths []string) *LoadPolicy
func (*LoadPolicy) GetControl ¶ added in v1.0.84
func (lp *LoadPolicy) GetControl(controlName string) (*reporthandling.Control, error)
Return control from file
func (*LoadPolicy) GetControlsInputs ¶ added in v1.0.101
func (lp *LoadPolicy) GetControlsInputs(customerGUID, clusterName string) (map[string][]string, error)
func (*LoadPolicy) GetExceptions ¶ added in v1.0.36
func (lp *LoadPolicy) GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)
func (*LoadPolicy) GetFramework ¶
func (lp *LoadPolicy) GetFramework(frameworkName string) (*reporthandling.Framework, error)