usecase

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.3.0

type Option func(*UseCase)

func WithBigQueryTableID added in v0.3.0

func WithBigQueryTableID(tableID types.BQTableID) Option

func WithDisableNoDetectionComment added in v0.3.3

func WithDisableNoDetectionComment() Option

type UseCase added in v0.2.0

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

func New

func New(clients *infra.Clients, options ...Option) *UseCase

func (*UseCase) CommentGitHubPR added in v0.3.0

func (x *UseCase) CommentGitHubPR(ctx context.Context, input *model.ScanGitHubRepoInput, report *trivy.Report, cfg *model.Config) error

func (*UseCase) InsertScanResult added in v0.3.0

func (x *UseCase) InsertScanResult(ctx context.Context, meta model.GitHubMetadata, report trivy.Report, cfg model.Config) error

func (*UseCase) ScanGitHubRepo added in v0.2.0

func (x *UseCase) ScanGitHubRepo(ctx context.Context, input *model.ScanGitHubRepoInput) error

ScanGitHubRepo is a usecase to download a source code from GitHub and scan it with Trivy. Using GitHub App credentials to download a private repository, then the app should be installed to the repository and have read access. After scanning, the result is stored to the database. The temporary files are removed after the scan.

Jump to

Keyboard shortcuts

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