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 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 ¶
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 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" )
Click to show internal directories.
Click to hide internal directories.