identifiers

package
v0.0.210 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 4 Imported by: 13

Documentation

Index

Constants

View Source
const (
	DesignatorsToken         = "designators"
	AttributeCustomerGUID    = "customerGUID"
	AttributeRegistryName    = "registryName"
	AttributeRepository      = "repository"
	AttributeTag             = "tag"
	AttributeCluster         = "cluster"
	AttributeNamespace       = "namespace"
	AttributeKind            = "kind"
	AttributeName            = "name"
	AttributeContainerName   = "containerName"
	AttributeApiVersion      = "apiVersion"
	AttributeWorkloadHash    = "workloadHash"
	AttributeIsIncomplete    = "isIncomplete"
	AttributeSensor          = "sensor"
	AttributePath            = "path"
	AttributeResourceID      = "resourceID"
	AttributeContainerScanId = "containerScanId"
)

attributes

View Source
const (
	AttributeRepoName      = "repoName"
	AttributeRepoOwner     = "repoOwner"
	AttributeRepoHash      = "repoHash"
	AttributeBranchName    = "branch"
	AttributeDefaultBranch = "defaultBranch"
	AttributeProvider      = "provider"
	AttributeRemoteURL     = "remoteURL"

	AttributeLastCommitHash     = "lastCommitHash"
	AttributeLastCommitterName  = "lastCommitterName"
	AttributeLastCommitterEmail = "lastCommitterEmail"
	AttributeLastCommitTime     = "lastCommitTime"

	AttributeFilePath          = "filePath"
	AttributeFileType          = "fileType"
	AttributeFileDir           = "fileDirectory"
	AttributeFileUrl           = "fileUrl"
	AttributeFileHelmChartName = "fileHelmChartName"

	AttributeLastFileCommitHash     = "lastFileCommitHash"
	AttributeLastFileCommitterName  = "lastFileCommitterName"
	AttributeLastFileCommitterEmail = "LastFileCommitterEmail"
	AttributeLastFileCommitTime     = "lastFileCommitTime"

	AttributeUseHTTP       = "useHTTP"
	AttributeSkipTLSVerify = "skipTLSVerify"
)

Repository scan related attributes

View Source
const (
	AttributeImageScanRelated     = "imageScanRelated"
	AttributeImageRelatedControls = "imageRelatedControls"
	AttributeHostSensorRule       = "hostSensorRule"
	AttributeHostSensor           = "hostSensor"
)

rego-library attributes

View Source
const (
	AttributeWorkerNodes             = "workerNodes"
	WorkerNodesmax                   = "max"
	WorkerNodeslastReported          = "lastReported"
	WorkerNodeslastReportDate        = "lastReportDate"
	WorkerNodesmaxPerMonth           = "maxPerMonth"
	WorkerNodesmaxReportGUID         = "maxReportGUID"
	WorkerNodesmaxPerMonthReportGUID = "maxPerMonthReportGUID"
	WorkerNodeslastReportGUID        = "lastReportGUID"
)

Worker nodes attribute related consts

Variables

Functions

func DigestAttributesDesignator

func DigestAttributesDesignator(attributes map[string]string) (string, string, map[string]string)

func DigestPortalDesignator

func DigestPortalDesignator(designator *PortalDesignator) (string, string, map[string]string)

DigestPortalDesignator DEPRECATED. use designator.DigestPortalDesignator() - get cluster namespace and labels from designator

func IsDesignatorsMatchContext

func IsDesignatorsMatchContext(ctxSlice []ArmoContext, designator *PortalDesignator, designatorPrefix string) bool

checks if all the context values match in designators

Types

type ArmoContext

type ArmoContext struct {
	Attribute string `json:"attribute"`
	Value     string `json:"value"`
	Source    string `json:"source"`
}

context attributes based structure to get more flexible and searchable options

func DesignatorToArmoContext

func DesignatorToArmoContext(designator *PortalDesignator, designatorPrefix string) []ArmoContext

type AttributesDesignators

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

AttributeDesignators describe a kubernetes object, with its labels.

func (*AttributesDesignators) GetCluster

func (ad *AttributesDesignators) GetCluster() string

func (*AttributesDesignators) GetKind

func (ad *AttributesDesignators) GetKind() string

func (*AttributesDesignators) GetLabels

func (ad *AttributesDesignators) GetLabels() map[string]string

func (*AttributesDesignators) GetName

func (ad *AttributesDesignators) GetName() string

func (*AttributesDesignators) GetNamespace

func (ad *AttributesDesignators) GetNamespace() string

func (*AttributesDesignators) GetPath

func (ad *AttributesDesignators) GetPath() string

func (*AttributesDesignators) GetResourceID

func (ad *AttributesDesignators) GetResourceID() string

type DesignatorType

type DesignatorType string

Type of the designator

swagger:enum DesignatorType

const (
	DesignatorAttributes DesignatorType = "Attributes"
	DesignatorAttribute  DesignatorType = "Attribute" // Deprecated
	// WorkloadID format.
	//
	// Has two formats:
	//  1. Kubernetes format: wlid://cluster-<cluster>/namespace-<namespace>/<kind>-<name>
	//  2. Native format: wlid://datacenter-<datacenter>/project-<project>/native-<name>
	DesignatorWlid DesignatorType = "Wlid"
	// A WorkloadID wildcard expression.
	//
	// A wildcard expression that includes a cluster:
	//
	//  wlid://cluster-<cluster>/
	//
	// An expression that includes a cluster and namespace (filters out all other namespaces):
	//
	//  wlid://cluster-<cluster>/namespace-<namespace>/
	DesignatorWildWlid      DesignatorType = "WildWlid"
	DesignatorWlidContainer DesignatorType = "WlidContainer"
	DesignatorWlidProcess   DesignatorType = "WlidProcess"
	DesignatorSid           DesignatorType = "Sid" // secret id
)

Supported designators

func (DesignatorType) ToLower

func (dt DesignatorType) ToLower() DesignatorType

type PortalDesignator

type PortalDesignator struct {
	DesignatorType DesignatorType `json:"designatorType" bson:"designatorType"`
	// A specific Workload ID
	WLID string `json:"wlid,omitempty" bson:"wlid,omitempty"`
	// An expression that describes applicable workload IDs
	WildWLID string `json:"wildwlid,omitempty" bson:"wildwlid,omitempty"`
	// A specific Secret ID
	SID string `json:"sid,omitempty" bson:"sid,omitempty"`
	// Attributes that describe the targets
	Attributes map[string]string `json:"attributes" bson:"attributes"`
}

PortalDesignator represents a single designation option

func AttributesDesignatorsFromImageTag

func AttributesDesignatorsFromImageTag(imageTag string) *PortalDesignator

func AttributesDesignatorsFromWLID

func AttributesDesignatorsFromWLID(wlid string) *PortalDesignator

func (*PortalDesignator) DigestAttributesDesignator

func (designator *PortalDesignator) DigestAttributesDesignator() AttributesDesignators

func (*PortalDesignator) DigestPortalDesignator

func (designator *PortalDesignator) DigestPortalDesignator() AttributesDesignators

DigestPortalDesignator - get cluster namespace and labels from designator

func (*PortalDesignator) GetCluster

func (designator *PortalDesignator) GetCluster() string

func (*PortalDesignator) GetKind

func (designator *PortalDesignator) GetKind() string

func (*PortalDesignator) GetLabels

func (designator *PortalDesignator) GetLabels() map[string]string

func (*PortalDesignator) GetName

func (designator *PortalDesignator) GetName() string

func (*PortalDesignator) GetNamespace

func (designator *PortalDesignator) GetNamespace() string

func (*PortalDesignator) GetPath

func (designator *PortalDesignator) GetPath() string

func (*PortalDesignator) GetResourceID

func (designator *PortalDesignator) GetResourceID() string

func (*PortalDesignator) NKeys

func (designator *PortalDesignator) NKeys() int

func (*PortalDesignator) UnmarshalJSONObject

func (designator *PortalDesignator) UnmarshalJSONObject(dec *gojay.Decoder, key string) error

Jump to

Keyboard shortcuts

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