scan

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	TruffleHogVerification 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             *retryablehttp.Client
}

ScanOptions contains configuration options for GitHub scanning operations.

func InitializeOptions

func InitializeOptions(accessToken, gitHubURL, repo, organization, user, searchQuery, maxArtifactSizeStr string,
	owned, public, artifacts, truffleHogVerification 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