model

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IgnoreList []IgnoreConfig
}

func BuildConfig added in v0.3.2

func BuildConfig(configData ...[]byte) (*Config, error)

func LoadConfigsFromDir added in v0.3.2

func LoadConfigsFromDir(path string) (*Config, error)

LoadConfigsFromDir loads configuration files from the repository. The configuration files are used to scan the repository with Trivy. The configuration .cue files are read recursively from the root directory of the repository.

type GitHubCommit added in v0.3.0

type GitHubCommit struct {
	GitHubRepo
	Committer GitHubUser `json:"committer" bigquery:"committer"`
	CommitID  string     `json:"commit_id" bigquery:"commit_id"`
	Branch    string     `json:"branch" bigquery:"branch"`
	Ref       string     `json:"ref" bigquery:"ref"`
}

func (*GitHubCommit) Validate added in v0.3.0

func (x *GitHubCommit) Validate() error

type GitHubIssueComment added in v0.3.0

type GitHubIssueComment struct {
	ID          string
	Login       string
	Body        string
	IsMinimized bool
}

type GitHubMetadata added in v0.3.0

type GitHubMetadata struct {
	GitHubCommit
	PullRequest   *GitHubPullRequest `json:"pull_request"`
	DefaultBranch string             `json:"default_branch"`
}

type GitHubPullRequest added in v0.3.0

type GitHubPullRequest struct {
	ID           int64      `json:"id"`
	Number       int        `json:"number"`
	BaseBranch   string     `json:"base_branch"`
	BaseCommitID string     `json:"base_commit_id"`
	User         GitHubUser `json:"user"`
}

type GitHubRepo

type GitHubRepo struct {
	RepoID   int64  `json:"repo_id" bigquery:"repo_id"`
	Owner    string `json:"owner" bigquery:"owner"`
	RepoName string `json:"repo_name" bigquery:"repo_name"`
}

func (*GitHubRepo) Validate added in v0.3.0

func (x *GitHubRepo) Validate() error

type GitHubUser added in v0.3.0

type GitHubUser struct {
	ID    int64  `json:"id"`
	Login string `json:"login"`
	Email string `json:"email"`
}

type IgnoreConfig added in v0.3.2

type IgnoreConfig struct {
	Target string
	Vulns  []IgnoreVuln
}

type IgnoreVuln added in v0.3.2

type IgnoreVuln struct {
	ID        string
	Comment   string
	ExpiresAt time.Time
}

func (IgnoreVuln) IsActive added in v0.3.2

func (x IgnoreVuln) IsActive(now time.Time) bool

type Scan added in v0.3.0

type Scan struct {
	ID        types.ScanID   `bigquery:"id" firestore:"id" json:"id"`
	Timestamp time.Time      `bigquery:"timestamp" firestore:"timestamp" json:"timestamp"`
	GitHub    GitHubMetadata `bigquery:"github" firestore:"github" json:"github"`
	Report    trivy.Report   `bigquery:"report" firestore:"report" json:"report"`
	Config    string         `bigquery:"config" firestore:"config" json:"config"`
}

type ScanGitHubRepoInput added in v0.3.0

type ScanGitHubRepoInput struct {
	GitHubMetadata
	InstallID types.GitHubAppInstallID
}

func (*ScanGitHubRepoInput) Validate added in v0.3.0

func (x *ScanGitHubRepoInput) Validate() error

type ScanRawRecord added in v0.3.0

type ScanRawRecord struct {
	Scan
	Timestamp int64 `bigquery:"timestamp" firestore:"timestamp" json:"timestamp"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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