Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultSince = 24 * time.Hour DefaultLimit = 25 MaxFeedLimit = 1000 DefaultGitHubRepoLimit = 100 // DefaultGitHubRepoLimitUnauth caps org/user scans when no GitHub token is // set. Unauthenticated GitHub REST allows only ~60 requests/hour per IP, and // each repo costs roughly one SBOM request, so the default cap is kept low to // avoid exhausting the budget (and tripping rate-limit backoff) in one run. DefaultGitHubRepoLimitUnauth = 10 MaxGitHubRepoLimit = 1000 DefaultTimeout = 30 * time.Second DefaultCacheTTL = 30 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
func NormalizeFeedLimit ¶
NormalizeFeedLimit resolves CLI/config feed limits and rejects invalid values.
func NormalizeGitHubRepoLimit ¶
NormalizeGitHubRepoLimit resolves org/user repo list limits for depx github. When the user did not specify a limit, the default depends on authentication: unauthenticated scans use a much lower cap to stay within GitHub's ~60 req/hr budget. An explicit limit is always honored (up to MaxGitHubRepoLimit).
Types ¶
type Config ¶
type Config struct {
DefaultEcosystem string `yaml:"default_ecosystem"`
Timeout time.Duration `yaml:"timeout"`
CacheDir string `yaml:"cache_dir"`
Feed FeedConfig `yaml:"feed"`
Sources []string `yaml:"sources"`
Output OutputConfig `yaml:"output"`
}
type FeedConfig ¶
type OutputConfig ¶
type OutputConfig struct {
Color bool `yaml:"color"`
}
Click to show internal directories.
Click to hide internal directories.