infrastructure

package
v0.0.0-...-5ee5e5d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detail

type Detail struct {
	ID                     int    `json:"id"`
	ClusterID              int    `json:"cluster_id"`
	NodeID                 string `json:"node_id"`
	Name                   string `json:"name"`
	Type                   string `json:"type"`
	ClusterVulnerabilities struct {
		Lastupdate     int `json:"lastupdate"`
		Kubehunterscan struct {
			Ok    int    `json:"ok"`
			Low   int    `json:"low"`
			High  int    `json:"high"`
			Kburl string `json:"kburl"`
			Nodes []struct {
				Type     string `json:"type"`
				Location string `json:"location"`
			} `json:"nodes"`
			Medium   int `json:"medium"`
			Services []struct {
				Type     string `json:"type"`
				Service  string `json:"service"`
				Location string `json:"location"`
			} `json:"services"`
			Vulnerabilities []struct {
				URL           string `json:"url"`
				Vid           string `json:"vid"`
				Hunter        string `json:"hunter"`
				Category      string `json:"category"`
				Evidence      string `json:"evidence"`
				Location      string `json:"location"`
				Severity      string `json:"severity"`
				Description   string `json:"description"`
				Vulnerability string `json:"vulnerability"`
			} `json:"vulnerabilities"`
			HunterStatistics []struct {
				Name            string `json:"name"`
				Description     string `json:"description"`
				Vulnerabilities int    `json:"vulnerabilities"`
			} `json:"hunter_statistics"`
		} `json:"kubehunterscan"`
	} `json:"cluster_vulnerabilities,omitempty"`
	Data struct {
		Roles struct {
			ClusterRoles []struct {
				UID   string `json:"uid"`
				Name  string `json:"name"`
				Rules []struct {
					Verbs     []string `json:"verbs"`
					Apigroups []string `json:"apigroups"`
					Resources []string `json:"resources"`
				} `json:"rules"`
				Labels          []string `json:"labels,omitempty"`
				Creationtime    string   `json:"creationtime"`
				Resourcecount   int      `json:"resourcecount,omitempty"`
				Resourceversion string   `json:"resourceversion"`
			} `json:"cluster_roles"`
		} `json:"roles"`
		Information struct {
			ServerInfo struct {
				Major      string    `json:"major"`
				Minor      string    `json:"minor"`
				Platform   string    `json:"platform"`
				Builddate  time.Time `json:"builddate"`
				Gitversion string    `json:"gitversion"`
			} `json:"server_info"`
			ComponentsStatusList []struct {
				Name       string `json:"name"`
				Conditions []struct {
					Type    string `json:"type"`
					Status  string `json:"status"`
					Message string `json:"message"`
				} `json:"conditions"`
				Creationtime string `json:"creationtime"`
			} `json:"components_status_list"`
		} `json:"information"`
	} `json:"data,omitempty"`
	SecurityIssues struct {
		CritVulns    int `json:"crit_vulns"`
		HighVulns    int `json:"high_vulns"`
		MedVulns     int `json:"med_vulns"`
		LowVulns     int `json:"low_vulns"`
		NegVulns     int `json:"neg_vulns"`
		Malware      int `json:"malware"`
		LastVulnScan int `json:"last_vuln_scan"`
	} `json:"security_issues,omitempty"`
	IsEnforced  bool      `json:"is_enforced"`
	CreatedDate time.Time `json:"created_date"`
}

Detail is the infrastructure response for v2/infrastructure/type/name or /id

type Host

type Host struct {
	ProjectID          int         `json:"project_id"`
	ID                 string      `json:"id"`
	Logicalname        string      `json:"logicalname"`
	Description        string      `json:"description"`
	Type               string      `json:"type"`
	Version            string      `json:"version"`
	Commit             string      `json:"commit"`
	Hostname           string      `json:"hostname"`
	ShortHostname      string      `json:"short_hostname"`
	Address            string      `json:"address"`
	PublicAddress      string      `json:"public_address"`
	Addresses          interface{} `json:"addresses"`
	Lastupdate         int         `json:"lastupdate"`
	Status             string      `json:"status"`
	Serverid           string      `json:"serverid"`
	ServerName         string      `json:"server_name"`
	DockerVersion      string      `json:"docker_version"`
	HostOs             string      `json:"host_os"`
	IsWindows          bool        `json:"is_windows"`
	HighVulns          int         `json:"high_vulns"`
	MedVulns           int         `json:"med_vulns"`
	LowVulns           int         `json:"low_vulns"`
	NegVulns           int         `json:"neg_vulns"`
	VulnsFound         int         `json:"vulns_found"`
	LastVulnScan       int         `json:"last_vuln_scan"`
	DisplayName        string      `json:"display_name"`
	Compliant          bool        `json:"compliant"`
	Machineid          string      `json:"machineid"`
	ClusterID          int         `json:"cluster_id"`
	Hostlabels         interface{} `json:"hostlabels"`
	Gateways           []string    `json:"gateways"`
	Token              string      `json:"token"`
	Enforce            bool        `json:"enforce"`
	Scan               bool        `json:"scan"`
	TotalPass          int         `json:"total_pass"`
	TotalWarn          int         `json:"total_warn"`
	HostKernelVersion  string      `json:"host_kernel_version"`
	KernelModuleLoaded bool        `json:"kernel_module_loaded"`
	RuntimeProtection  int         `json:"runtime_protection"`
	DockerInfo         struct {
	} `json:"docker_info,omitempty"`
	ContainerActivityProtection bool `json:"container_activity_protection"`
	NetworkProtection           bool `json:"network_protection"`
	UserAccessControl           bool `json:"user_access_control"`
	SyncHostImages              bool `json:"sync_host_images"`
	ImageAssurance              bool `json:"image_assurance"`
	HostProtection              bool `json:"host_protection"`
	Orchestrator                struct {
		Type   string `json:"type"`
		Master bool   `json:"master"`
	} `json:"orchestrator,omitempty"`
	AuditAll          bool        `json:"audit_all"`
	AuditSuccessLogin bool        `json:"audit_success_login"`
	AuditFailedLogin  bool        `json:"audit_failed_login"`
	BatchInstallID    int         `json:"batch_install_id"`
	SaveBatchID       int         `json:"save_batch_id"`
	BatchInstallName  string      `json:"batch_install_name"`
	SyscallEnabled    bool        `json:"syscall_enabled"`
	RuntimeType       string      `json:"runtime_type"`
	InterceptionMode  string      `json:"interception_mode"`
	AquaDigest        string      `json:"aqua_digest"`
	ContainerID       string      `json:"container_id"`
	Secrets           interface{} `json:"secrets"`
}

type Hosts

type Hosts struct {
	Count    int    `json:"count"`
	Page     int    `json:"page"`
	Pagesize int    `json:"pagesize"`
	Result   []Host `json:"result"`
	Query    struct {
		IdentifiersOnly bool   `json:"identifiers_only"`
		Status          string `json:"status"`
		ImageName       string `json:"image_name"`
		ImageID         string `json:"image_id"`
		ServerID        string `json:"server_id"`
		BatchName       string `json:"batch_name"`
		Compliant       string `json:"compliant"`
		Address         string `json:"address"`
		Cve             string `json:"cve"`
		ConfigFileName  string `json:"config_file_name"`
	} `json:"query"`
}

Hosts struct

type List

type List struct {
	Count    int `json:"count"`
	Page     int `json:"page"`
	Pagesize int `json:"pagesize"`
	Result   []struct {
		ID                     int    `json:"id"`
		ClusterID              int    `json:"cluster_id"`
		NodeID                 string `json:"node_id"`
		Name                   string `json:"name"`
		Type                   string `json:"type"`
		ClusterVulnerabilities struct {
			Lastupdate     int `json:"lastupdate"`
			Kubehunterscan struct {
				Ok    int    `json:"ok"`
				Low   int    `json:"low"`
				High  int    `json:"high"`
				Kburl string `json:"kburl"`
				Nodes []struct {
					Type     string `json:"type"`
					Location string `json:"location"`
				} `json:"nodes"`
				Medium   int `json:"medium"`
				Services []struct {
					Type     string `json:"type"`
					Service  string `json:"service"`
					Location string `json:"location"`
				} `json:"services"`
				Vulnerabilities []struct {
					URL           string `json:"url"`
					Vid           string `json:"vid"`
					Hunter        string `json:"hunter"`
					Category      string `json:"category"`
					Evidence      string `json:"evidence"`
					Location      string `json:"location"`
					Severity      string `json:"severity"`
					Description   string `json:"description"`
					Vulnerability string `json:"vulnerability"`
				} `json:"vulnerabilities"`
				HunterStatistics []struct {
					Name            string `json:"name"`
					Description     string `json:"description"`
					Vulnerabilities int    `json:"vulnerabilities"`
				} `json:"hunter_statistics"`
			} `json:"kubehunterscan"`
		} `json:"cluster_vulnerabilities,omitempty"`
		Data struct {
			Roles struct {
				ClusterRoles []struct {
					UID   string `json:"uid"`
					Name  string `json:"name"`
					Rules []struct {
						Verbs     []string `json:"verbs"`
						Apigroups []string `json:"apigroups"`
						Resources []string `json:"resources"`
					} `json:"rules"`
					Labels          []string `json:"labels,omitempty"`
					Creationtime    string   `json:"creationtime"`
					Resourcecount   int      `json:"resourcecount,omitempty"`
					Resourceversion string   `json:"resourceversion"`
				} `json:"cluster_roles"`
			} `json:"roles"`
			Information struct {
				ServerInfo struct {
					Major      string    `json:"major"`
					Minor      string    `json:"minor"`
					Platform   string    `json:"platform"`
					Builddate  time.Time `json:"builddate"`
					Gitversion string    `json:"gitversion"`
				} `json:"server_info"`
				ComponentsStatusList []struct {
					Name       string `json:"name"`
					Conditions []struct {
						Type    string `json:"type"`
						Status  string `json:"status"`
						Message string `json:"message"`
					} `json:"conditions"`
					Creationtime string `json:"creationtime"`
				} `json:"components_status_list"`
			} `json:"information"`
		} `json:"data,omitempty"`
		SecurityIssues struct {
			CritVulns    int `json:"crit_vulns"`
			HighVulns    int `json:"high_vulns"`
			MedVulns     int `json:"med_vulns"`
			LowVulns     int `json:"low_vulns"`
			NegVulns     int `json:"neg_vulns"`
			Malware      int `json:"malware"`
			LastVulnScan int `json:"last_vuln_scan"`
		} `json:"security_issues"`
		IsEnforced  bool      `json:"is_enforced"`
		CreatedDate time.Time `json:"created_date"`
	} `json:"result"`
	Query struct {
		IdentifiersOnly bool   `json:"identifiers_only"`
		Type            string `json:"type"`
		Enforced        string `json:"enforced"`
	} `json:"query"`
}

List returns all known infrastructure - v2/infrastructure INT params - page and page_size STRING params - order_by (name|type|author), search and type (nodes|clusters) BOOL params - enforced

Jump to

Keyboard shortcuts

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