scan

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteHighestXKeys

func DeleteHighestXKeys(m map[int64]struct{}, nrKeys int) map[int64]struct{}

DeleteHighestXKeys removes the highest nrKeys keys from the map.

func SetupClient

func SetupClient(accessToken string, baseURL string) *github.Client

SetupClient creates and configures a GitHub API client with rate limiting support.

func ValidateRepoFormat

func ValidateRepoFormat(repo string) (owner, name string, valid bool)

ValidateRepoFormat validates the format of a repository string. Returns owner, name and whether the format is valid.

Types

type ScanOptions

type ScanOptions struct {
	AccessToken         string
	ConfidenceFilter    []string
	MaxScanGoRoutines   int
	SecretsVerification bool
	MaxWorkflows        int
	Organization        string
	Owned               bool
	User                string
	Public              bool
	SearchQuery         string
	Artifacts           bool
	GitHubURL           string
	Repo                string
	MaxArtifactSize     int64
	HitTimeout          time.Duration
	Context             context.Context
	Client              *github.Client
	HttpClient          *resty.Client
}

ScanOptions contains configuration options for GitHub scanning operations.

func InitializeOptions

func InitializeOptions(accessToken, gitHubURL, repo, organization, user, searchQuery, maxArtifactSizeStr string,
	owned, public, artifacts, secretsVerification bool,
	maxWorkflows, maxScanGoRoutines int, confidenceFilter []string, hitTimeout time.Duration) (ScanOptions, error)

InitializeOptions prepares scan options from CLI parameters.

type Scanner

type Scanner interface {
	pkgscanner.BaseScanner
	GetRateLimitStatus() *zerolog.Event
}

func NewScanner

func NewScanner(opts ScanOptions) Scanner

Jump to

Keyboard shortcuts

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