analysis

package
v1.23.6 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusComplete  = "COMPLETE"
	StatusFailed    = "FAILED"
	StatusAnalyzing = "ANALYZING"
)

Legacy analysis types and constants

Variables

This section is empty.

Functions

func WithErrorReporter added in v1.7.0

func WithErrorReporter(errorReporter observability.ErrorReporter) func(*analysisOrchestrator)

func WithInstrumentor added in v1.7.0

func WithInstrumentor(instrumentor observability.Instrumentor) func(*analysisOrchestrator)

func WithLogger added in v1.7.0

func WithLogger(logger *zerolog.Logger) func(*analysisOrchestrator)

func WithResultType added in v1.12.0

func WithResultType(t testModels.Scan) func(*analysisOrchestrator)

func WithTrackerFactory added in v1.7.0

func WithTrackerFactory(factory scan.TrackerFactory) func(*analysisOrchestrator)

Types

type AnalysisConfig added in v1.15.0

type AnalysisConfig struct {
	Report          bool
	ProjectName     *string
	TargetName      *string
	TargetReference *string
	ProjectId       *uuid.UUID
	CommitId        *string
}

type AnalysisOrchestrator added in v1.4.0

type AnalysisOrchestrator interface {
	RunTest(ctx context.Context, orgId string, b bundle.Bundle, target scan.Target, reportingOptions AnalysisConfig) (*sarif.SarifResponse, *scan.ResultMetaData, error)
	RunTestRemote(ctx context.Context, orgId string, reportingOptions AnalysisConfig) (*sarif.SarifResponse, *scan.ResultMetaData, error)
	RunLegacyTest(ctx context.Context, bundleHash string, shardKey string, limitToFiles []string, severity int) (*sarif.SarifResponse, scan.LegacyScanStatus, error)
}

func NewAnalysisOrchestrator added in v1.4.0

func NewAnalysisOrchestrator(
	config config.Config,
	httpClient codeClientHTTP.HTTPClient,
	options ...OptionFunc,
) AnalysisOrchestrator

type FailedError added in v1.23.3

type FailedError struct {
	Msg string
}

func (FailedError) Error added in v1.23.3

func (e FailedError) Error() string

type OptionFunc added in v1.5.0

type OptionFunc func(*analysisOrchestrator)

type Request added in v1.23.3

type Request struct {
	Key             RequestKey     `json:"key"`
	Severity        int            `json:"severity,omitempty"`
	Prioritized     bool           `json:"prioritized,omitempty"`
	Legacy          bool           `json:"legacy"`
	AnalysisContext requestContext `json:"analysisContext"`
}

type RequestKey added in v1.23.3

type RequestKey struct {
	Type         string   `json:"type"`
	Hash         string   `json:"hash"`
	LimitToFiles []string `json:"limitToFiles,omitempty"`
	Shard        string   `json:"shard"`
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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