Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCookie ¶
func ValidateCookie(opts ScanOptions) error
ValidateCookie validates the provided cookie by making a test request.
Types ¶
type ActionArtifact ¶
type ActionArtifactsResponse ¶
type ActionArtifactsResponse struct {
TotalCount int64 `json:"total_count"`
Artifacts []ActionArtifact `json:"artifacts"`
}
type ActionJobsResponse ¶
type ActionWorkflowRun ¶
type ActionWorkflowRun struct {
ID int64 `json:"id"`
Name string `json:"name"`
Title string `json:"title"`
Status string `json:"status"`
Event string `json:"event"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
RunNumber int64 `json:"run_number"`
WorkflowID string `json:"workflow_id"`
HeadBranch string `json:"head_branch"`
HeadSha string `json:"head_sha"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
}
func ListWorkflowRuns ¶
func ListWorkflowRuns(client *gitea.Client, repo *gitea.Repository) ([]ActionWorkflowRun, error)
ListWorkflowRuns retrieves workflow runs for a repository.
type ActionWorkflowRunsResponse ¶
type ActionWorkflowRunsResponse struct {
TotalCount int64 `json:"total_count"`
WorkflowRuns []ActionWorkflowRun `json:"workflow_runs"`
}
type AuthTransport ¶
type AuthTransport struct {
Base http.RoundTripper
Token string
}
type GiteaScanOptions ¶
type GiteaScanOptions struct {
Token string
GiteaURL string
Artifacts bool
ConfidenceFilter []string
MaxScanGoRoutines int
TruffleHogVerification bool
Owned bool
Organization string
Repository string
Cookie string
RunsLimit int
StartRunID int64
MaxArtifactSize int64
HitTimeout time.Duration
Context context.Context
Client *gitea.Client
HttpClient *retryablehttp.Client
}
type ScanOptions ¶
type ScanOptions = GiteaScanOptions
ScanOptions is an alias for GiteaScanOptions for interface consistency with other providers.
func InitializeOptions ¶
func InitializeOptions(token, giteaURL, repository, organization, cookie, maxArtifactSizeStr string, owned, artifacts, truffleHogVerification bool, runsLimit int, startRunID int64, maxScanGoRoutines int, confidenceFilter []string, hitTimeout time.Duration) (ScanOptions, error)
InitializeOptions prepares scan options from CLI parameters.
type Scanner ¶
type Scanner interface {
pkgscanner.BaseScanner
}
func NewScanner ¶
func NewScanner(opts ScanOptions) Scanner
Click to show internal directories.
Click to hide internal directories.