finding

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Exploitation
	EXPLOITATION_RESULT_ACTIVE     = "ACTIVE"
	EXPLOITATION_RESULT_PUBLIC_POC = "PUBLIC_POC"
	EXPLOITATION_RESULT_NONE       = "NONE"
)
View Source
const (
	// PublicFacing
	PUBLIC_FACING_OPEN     = "OPEN"
	PUBLIC_FACING_INTERNAL = "INTERNAL"

	// AccessControl
	ACCESS_CONTROL_NONE          = "NONE"
	ACCESS_CONTROL_LIMITED_IP    = "LIMITED_IP"
	ACCESS_CONTROL_AUTHENTICATED = "AUTHENTICATED"

	// SystemExposure
	SYSTEM_EXPOSURE_OPEN       = "OPEN"
	SYSTEM_EXPOSURE_CONTROLLED = "CONTROLLED"
	SYSTEM_EXPOSURE_SMALL      = "SMALL"
)
View Source
const (
	// Automatable
	AUTOMATABLE_YES = "YES"
	AUTOMATABLE_NO  = "NO"

	// ValueDensity
	VALUE_DENSITY_CONCENTRATED = "CONCENTRATED"
	VALUE_DENSITY_DIFFUSE      = "DIFFUSE"

	// Utility
	UTILITY_SUPER_EFFICIENT = "SUPER_EFFICIENT"
	UTILITY_EFFICIENT       = "EFFICIENT"
	UTILITY_LABORIOUS       = "LABORIOUS"
)
View Source
const (
	// SafetyImpact
	SAFETY_IMPACT_CATASTROPHIC = "CATASTROPHIC"
	SAFETY_IMPACT_CRITICAL     = "CRITICAL"
	SAFETY_IMPACT_MARGINAL     = "MARGINAL"
	SAFETY_IMPACT_NEGLIGIBLE   = "NEGLIGIBLE"

	// MissionImpact
	MISSION_IMPACT_MISSION_FAILURE = "MISSION_FAILURE"
	MISSION_IMPACT_MEF_FAILURE     = "MEF_FAILURE"
	MISSION_IMPACT_NONE            = "NONE"
	MISSION_IMPACT_DEGRADED        = "DEGRADED"
	MISSION_IMPACT_CRIPPLED        = "CRIPPLED"

	// HumanImpact
	HUMAN_IMPACT_VERY_HIGH = "VERY_HIGH"
	HUMAN_IMPACT_HIGH      = "HIGH"
	HUMAN_IMPACT_MEDIUM    = "MEDIUM"
	HUMAN_IMPACT_LOW       = "LOW"
)
View Source
const (
	TRIAGE_UNKNOWN = "UNKNOWN"
)

Variables

This section is empty.

Functions

func GetPendReasonString added in v0.10.0

func GetPendReasonString(status finding.PendReason) string

func Ptr added in v0.14.0

func Ptr[T any](v T) *T

Types

type AssessmentDetail added in v0.14.0

type AssessmentDetail struct {
	Result *string  `json:"result,omitempty"`
	Score  *float32 `json:"score,omitempty"`
}

type Exploitation added in v0.14.0

type Exploitation struct {
	HasCVE    *bool    `json:"has_cve,omitempty"`
	EpssScore *float32 `json:"epss_score,omitempty"`
	HasKEV    *bool    `json:"has_kev,omitempty"`
	PublicPOC *bool    `json:"public_poc,omitempty"`
}

type FindingDataTriage added in v0.14.0

type FindingDataTriage struct {
	Triage *RiskenTriage `json:"risken_triage,omitempty"`
}

type FindingService

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

func NewFindingService

func NewFindingService(repository db.FindingRepository, openaiToken, chatGPTModel string, excludeDeleteDataSource []string, logger logging.Logger) *FindingService

func (*FindingService) BatchListFinding

func (*FindingService) CleanOldResource added in v0.9.0

func (f *FindingService) CleanOldResource(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)

func (*FindingService) ClearScore

func (f *FindingService) ClearScore(ctx context.Context, req *finding.ClearScoreRequest) (*empty.Empty, error)

func (*FindingService) DeleteFinding

func (f *FindingService) DeleteFinding(ctx context.Context, req *finding.DeleteFindingRequest) (*empty.Empty, error)

func (*FindingService) DeleteFindingSetting

func (f *FindingService) DeleteFindingSetting(ctx context.Context, req *finding.DeleteFindingSettingRequest) (*empty.Empty, error)

func (*FindingService) DeletePendFinding

func (f *FindingService) DeletePendFinding(ctx context.Context, req *finding.DeletePendFindingRequest) (*empty.Empty, error)

func (*FindingService) DeleteResource

func (f *FindingService) DeleteResource(ctx context.Context, req *finding.DeleteResourceRequest) (*empty.Empty, error)

func (*FindingService) GetAISummary added in v0.6.0

func (*FindingService) GetAISummaryStream added in v0.10.0

func (*FindingService) GetFinding

func (*FindingService) GetFindingSetting

func (*FindingService) GetPendFinding

func (*FindingService) GetRecommend

func (*FindingService) GetResource

func (*FindingService) ListFinding

func (*FindingService) ListFindingTag

func (*FindingService) ListResource

func (*FindingService) ListResourceTag

func (*FindingService) PutFinding

func (*FindingService) PutFindingBatch

func (f *FindingService) PutFindingBatch(ctx context.Context, req *finding.PutFindingBatchRequest) (*empty.Empty, error)

func (*FindingService) PutFindingSetting

func (*FindingService) PutPendFinding

func (*FindingService) PutRecommend

func (*FindingService) PutResource

func (*FindingService) PutResourceBatch

func (f *FindingService) PutResourceBatch(ctx context.Context, req *finding.PutResourceBatchRequest) (*empty.Empty, error)

func (*FindingService) TagFinding

func (*FindingService) TagResource

func (*FindingService) TriageFinding added in v0.14.0

func (f *FindingService) TriageFinding(ctx context.Context, finding *model.Finding) (*model.Finding, error)

func (*FindingService) UntagByResourceName added in v0.9.0

func (f *FindingService) UntagByResourceName(ctx context.Context, req *finding.UntagByResourceNameRequest) (*empty.Empty, error)

func (*FindingService) UntagFinding

func (f *FindingService) UntagFinding(ctx context.Context, req *finding.UntagFindingRequest) (*empty.Empty, error)

func (*FindingService) UntagResource

func (f *FindingService) UntagResource(ctx context.Context, req *finding.UntagResourceRequest) (*empty.Empty, error)

type HumanImpact added in v0.14.0

type HumanImpact struct {
	SafetyImpact  *string `json:"safety_impact,omitempty"`
	MissionImpact *string `json:"mission_impact,omitempty"`
}

type RiskenTriage added in v0.14.0

type RiskenTriage struct {
	BaseScore     *float32          `json:"base_score,omitempty"`
	AdjustedScore *float32          `json:"adjusted_score,omitempty"`
	Source        *TriageSource     `json:"source,omitempty"`
	Assessment    *TriageAssessment `json:"assessment,omitempty"`
}

type SystemExposure added in v0.14.0

type SystemExposure struct {
	PublicFacing  *string `json:"public_facing,omitempty"`
	AccessControl *string `json:"access_control,omitempty"`
}

type TriageAssessment added in v0.14.0

type TriageAssessment struct {
	Exploitation   *AssessmentDetail `json:"exploitation,omitempty"`
	SystemExposure *AssessmentDetail `json:"system_exposure,omitempty"`
	Utility        *AssessmentDetail `json:"utility,omitempty"`
	HumanImpact    *AssessmentDetail `json:"human_impact,omitempty"`
}

type TriageSource added in v0.14.0

type TriageSource struct {
	Exploitation   *Exploitation   `json:"exploitation,omitempty"`
	SystemExposure *SystemExposure `json:"system_exposure,omitempty"`
	Utility        *Utility        `json:"utility,omitempty"`
	HumanImpact    *HumanImpact    `json:"human_impact,omitempty"`
}

type Utility added in v0.14.0

type Utility struct {
	Automatable  *string `json:"automatable,omitempty"`
	ValueDensity *string `json:"value_density,omitempty"`
}

Jump to

Keyboard shortcuts

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