dependency

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SEVERITY_CRITICAL = "CRITICAL"
	SEVERITY_HIGH     = "HIGH"
	SEVERITY_MEDIUM   = "MEDIUM"
	SEVERITY_LOW      = "LOW"
	SEVERITY_UNKNOWN  = "UNKNOWN"
	SCORE_CRITICAL    = float32(0.6)
	SCORE_HIGH        = float32(0.5)
	SCORE_MEDIUM      = float32(0.3)
	SCORE_LOW         = float32(0.1)
	SCORE_UNKNOWN     = float32(0.1)
)

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(
	ctx context.Context,
	fc finding.FindingServiceClient,
	ac alert.AlertServiceClient,
	cc code.CodeServiceClient,
	codeDataKey string,
	githubDefaultToken string,
	trivyPath string,
	limitRepositorySizeKb int,
	l logging.Logger,
) (*sqsHandler, error)

Types

type AppConfig

type AppConfig struct {
	EnvName         string   `default:"local" split_words:"true"`
	TraceExporter   string   `split_words:"true" default:"nop"`
	ProfileExporter string   `split_words:"true" default:"nop"`
	ProfileTypes    []string `split_words:"true"`
	TraceDebug      bool     `split_words:"true" default:"false"`

	// sqs
	Debug string `default:"false"`

	AWSRegion   string `envconfig:"aws_region"    default:"ap-northeast-1"`
	SQSEndpoint string `envconfig:"sqs_endpoint"  default:"http://queue.middleware.svc.cluster.local:9324"`

	CodeDependencyQueueName string `split_words:"true" default:"code-dependency"`
	CodeDependencyQueueURL  string `split_words:"true" default:"http://queue.middleware.svc.cluster.local:9324/queue/code-dependency"`
	MaxNumberOfMessage      int32  `split_words:"true" default:"10"`
	WaitTimeSecond          int32  `split_words:"true" default:"20"`

	// dependency
	GithubDefaultToken string `required:"true" split_words:"true" default:"your-token-here"`
	TrivyPath          string `split_words:"true" default:"/usr/local/bin/trivy"`

	// scan settings
	LimitRepositorySizeKb int `required:"true" split_words:"true" default:"500000"` // 500MB

	// grpc
	CoreSvcAddr          string `split_words:"true" default:"core.core.svc.cluster.local:8080"`
	DataSourceAPISvcAddr string `required:"true" split_words:"true" default:"datasource-api.core.svc.cluster.local:8081"`

	// handler
	CodeDataKey string `split_words:"true" required:"true"`
}

Jump to

Keyboard shortcuts

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