Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLogLevel ¶
func GetScannerMetadata ¶
Types ¶
type API ¶
type API struct { Addr string `env:"SCANNER_API_SERVER_ADDR" envDefault:":8080"` TLSCertificate string `env:"SCANNER_API_SERVER_TLS_CERTIFICATE"` TLSKey string `env:"SCANNER_API_SERVER_TLS_KEY"` ReadTimeout time.Duration `env:"SCANNER_API_SERVER_READ_TIMEOUT" envDefault:"15s"` WriteTimeout time.Duration `env:"SCANNER_API_SERVER_WRITE_TIMEOUT" envDefault:"15s"` IdleTimeout time.Duration `env:"SCANNER_API_SERVER_IDLE_TIMEOUT" envDefault:"60s"` }
func (*API) IsTLSEnabled ¶
type JobQueue ¶
type JobQueue struct { RedisURL string `env:"SCANNER_JOB_QUEUE_REDIS_URL" envDefault:"redis://localhost:6379"` Namespace string `env:"SCANNER_JOB_QUEUE_REDIS_NAMESPACE" envDefault:"harbor.scanner.trivy:job-queue"` WorkerConcurrency int `env:"SCANNER_JOB_QUEUE_WORKER_CONCURRENCY" envDefault:"1"` PoolMaxActive int `env:"SCANNER_JOB_QUEUE_REDIS_POOL_MAX_ACTIVE" envDefault:"5"` PoolMaxIdle int `end:"SCANNER_JOB_QUEUE_REDIS_POOL_MAX_IDLE" envDefault:"5"` }
type RedisStore ¶
type RedisStore struct { RedisURL string `env:"SCANNER_STORE_REDIS_URL" envDefault:"redis://localhost:6379"` Namespace string `env:"SCANNER_STORE_REDIS_NAMESPACE" envDefault:"harbor.scanner.trivy:data-store"` PoolMaxActive int `env:"SCANNER_STORE_REDIS_POOL_MAX_ACTIVE" envDefault:"5"` PoolMaxIdle int `env:"SCANNER_STORE_REDIS_POOL_MAX_IDLE" envDefault:"5"` ScanJobTTL time.Duration `env:"SCANNER_STORE_REDIS_SCAN_JOB_TTL" envDefault:"1h"` }
type Trivy ¶
type Trivy struct { CacheDir string `env:"SCANNER_TRIVY_CACHE_DIR" envDefault:"/home/scanner/.cache/trivy"` ReportsDir string `env:"SCANNER_TRIVY_REPORTS_DIR" envDefault:"/home/scanner/.cache/reports"` DebugMode bool `env:"SCANNER_TRIVY_DEBUG_MODE" envDefault:"false"` VulnType string `env:"SCANNER_TRIVY_VULN_TYPE" envDefault:"os"` Severity string `env:"SCANNER_TRIVY_SEVERITY" envDefault:"UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"` IgnoreUnfixed bool `env:"SCANNER_TRIVY_IGNORE_UNFIXED" envDefault:"false"` }
Click to show internal directories.
Click to hide internal directories.