Documentation ¶
Index ¶
- type Mock
- type Option
- type UseCase
- func (x *UseCase) CommentGitHubPR(ctx context.Context, input *model.ScanGitHubRepoInput, report *trivy.Report) error
- func (x *UseCase) InsertScanResult(ctx context.Context, meta model.GitHubMetadata, report trivy.Report) error
- func (x *UseCase) ScanGitHubRepo(ctx context.Context, input *model.ScanGitHubRepoInput) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶ added in v0.2.0
type Mock struct { MockInsertScanResult func(ctx context.Context, meta model.GitHubMetadata, report trivy.Report) error MockScanGitHubRepo func(ctx context.Context, input *model.ScanGitHubRepoInput) error }
func (*Mock) InsertScanResult ¶ added in v0.3.0
func (*Mock) ScanGitHubRepo ¶ added in v0.2.0
ScanGitHubRepo implements interfaces.UseCase.
type UseCase ¶ added in v0.2.0
type UseCase struct {
// contains filtered or unexported fields
}
func (*UseCase) CommentGitHubPR ¶ added in v0.3.0
func (*UseCase) InsertScanResult ¶ added in v0.3.0
func (*UseCase) ScanGitHubRepo ¶ added in v0.2.0
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.
Click to show internal directories.
Click to hide internal directories.