bean

package
v0.0.0-...-a328902 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScanOutputDirectory      = "/security/devtronimagescan" // This is not configurable due to permissions for devtron-user
	NullProcessIndex         = -1
	JsonOutputFileNameSuffix = "_out.json"
	ScannerTypeClairV4       = "CLAIRV4"
	ScannerTypeClairV2       = "CLAIRV2"
	ScannerTypeTrivy         = "TRIVY"
	ScanToolClair            = "CLAIR"
	ScanToolVersion2         = "V2"
	ScanToolVersion4         = "V4"
	SbomOutputFileNameSuffix = "_out.json"
)
View Source
const (
	MappingKeyPathToResultDataKeys        = "resultData"
	MappingKeyPathToVulnerabilityDataKeys = "vulnerabilityData"
	MappingKeyPathToResultsArray          = "pathToResultArray"
	MappingKeyPathToVulnerabilitiesArray  = "pathToVulnerabilitiesArray"
	MappingKeyName                        = "name"
	MappingKeyPackage                     = "package"
	MappingKeyPackageVersion              = "packageVersion"
	MappingKeyFixedInVersion              = "fixedInVersion"
	MappingKeySeverity                    = "severity"
	MappingTarget                         = "target"
	MappingType                           = "type"
	MappingClass                          = "class"
)
View Source
const (
	HIGH     string = "high"
	CRITICAL string = "critical"
	SAFE     string = "safe"
	LOW      string = "low"
	MEDIUM   string = "medium"
	MODERATE string = "moderate"
	UNKNOWN  string = "unknown"
)
View Source
const UserSystemId = 1

Variables

This section is empty.

Functions

func ConvertToLowerCase

func ConvertToLowerCase(input string) string

func ConvertVariableFormat

func ConvertVariableFormat(value string, varFormat VariableFormat) (interface{}, error)

Types

type ImageScanOutputObject

type ImageScanOutputObject struct {
	TargetName     string `json:"targetName"`
	Class          string `json:"class"`
	Type           string `json:"type"`
	Name           string `json:"name"`
	Package        string `json:"package"`
	PackageVersion string `json:"packageVersion"`
	FixedInVersion string `json:"fixedInVersion"`
	Severity       string `json:"severity"`
}

type Mapping

type Mapping map[string]string

Mapping is the used to store mappings of fields in ImageScanOutputObject and the path at which they are present in stepOutput

type ScanExecutionProcessState

type ScanExecutionProcessState int
const (
	ScanExecutionProcessStateFailed    ScanExecutionProcessState = iota - 1 //resolved value = -1
	ScanExecutionProcessStateRunning                                        //resolved value =  0
	ScanExecutionProcessStateCompleted                                      //resolved value =  1
)

type ScanExecutionType

type ScanExecutionType string
const (
	ScanExecutionTypeHttp ScanExecutionType = "HTTP"
	ScanExecutionTypeCli  ScanExecutionType = "CLI"
)

type Severity

type Severity int
const (
	Low Severity = iota
	Medium
	Critical
	High
	Safe
	Unknown
)

func SeverityStringToEnum

func SeverityStringToEnum(severity string) Severity

func StandardSeverityStringToEnum

func StandardSeverityStringToEnum(severity string) Severity

func (Severity) String

func (sev Severity) String() string

type UserInfo

type UserInfo struct {
	Id          int32    `json:"id" validate:"number"`
	EmailId     string   `json:"email_id" validate:"required"`
	Roles       []string `json:"roles,omitempty"`
	AccessToken string   `json:"access_token,omitempty"`
	Exist       bool     `json:"-"`
	UserId      int32    `json:"-"` // created or modified user id
	Status      string   `json:"status,omitempty"`
	Groups      []string `json:"groups"`
	SuperAdmin  bool     `json:"superAdmin,notnull"`
}

type VariableFormat

type VariableFormat string
const (
	VariableFormatString  VariableFormat = "STRING"
	VariableFormatBoolean VariableFormat = "BOOLEAN"
	VariableFormatNumber  VariableFormat = "NUMBER"
)

Jump to

Keyboard shortcuts

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