Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubIssueWriter ¶
type GithubIssueWriter struct {
// contains filtered or unexported fields
}
GithubIssueWriter is responsible for creating Github issues to track vulnerabilities that have been discovered in images within a release. It is configured with a Predicate that filters which releases to write issues for, and which to skip
func (*GithubIssueWriter) Write ¶
func (g *GithubIssueWriter) Write( ctx context.Context, release *github.RepositoryRelease, vulnerabilityMarkdown string, ) error
Creates/Updates a Github Issue per release The github issue will have the markdown table report of the image's vulnerabilities example: https://github.com/solo-io/solo-projects/issues/2458
type GithubRepo ¶
func (GithubRepo) Address ¶
func (r GithubRepo) Address() string
type IssueWriter ¶
type IssueWriter interface { // Write writes `contents`, the results of a scan of the images in `release`, to a location // designated by the implementation. Write(ctx context.Context, release *github.RepositoryRelease, contents string) error }
IssueWriter writes the generated contents of a scan to a location, either a file on the local filesystem or a GitHub issue.
func NewGithubIssueWriter ¶
func NewGithubIssueWriter(repo GithubRepo, client *github.Client, issuePredicate githubutils.RepositoryReleasePredicate) IssueWriter
func NewLocalIssueWriter ¶
func NewLocalIssueWriter(outputDir string) (IssueWriter, error)
func NewNoopWriter ¶
func NewNoopWriter() IssueWriter
type LocalIssueWriter ¶
type LocalIssueWriter struct {
// contains filtered or unexported fields
}
LocalIssueWriter writes the scan results to a file on the local file system.
func (*LocalIssueWriter) Write ¶
func (l *LocalIssueWriter) Write(_ context.Context, release *github.RepositoryRelease, contents string) error
type NoopWriter ¶
type NoopWriter struct{}
NoopWriter provides a no-op implementation of the IssueWriter interface, used when the specified scan action is `none`.
func (*NoopWriter) Write ¶
func (n *NoopWriter) Write(_ context.Context, _ *github.RepositoryRelease, _ string) error