config

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 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

View Source
var (
	CustomerID         = "{{CUSTOMER_ID}}"
	APIEndpoint        = "{{API_ENDPOINT}}"
	APIKey             = "{{API_KEY}}"
	ScanFrequencyHours = "{{SCAN_FREQUENCY_HOURS}}"
	SearchDirs         []string
	EnableNPMScan      *bool  // nil=auto
	EnableBrewScan     *bool  // nil=auto
	EnablePythonScan   *bool  // nil=auto
	ColorMode          string // "" means auto
	OutputFormat       string // "" means default (pretty)
	HTMLOutputFile     string // "" means not set
	Quiet              *bool  // nil=default behavior
)

Default placeholders (replaced by backend for enterprise installation scripts).

Functions

func ConfigFilePath

func ConfigFilePath() string

ConfigFilePath returns the path to the config file.

func IsEnterpriseMode

func IsEnterpriseMode() bool

IsEnterpriseMode returns true if valid enterprise credentials are configured.

func Load

func Load()

Load reads the config file and applies values to the package-level variables. Values already set (not placeholders) are not overridden — build-time values take precedence.

func RunConfigure

func RunConfigure() error

RunConfigure interactively prompts for config values and saves to the config file.

func ShowConfigure

func ShowConfigure()

ShowConfigure prints the current configuration to stdout.

Types

type ConfigFile

type ConfigFile struct {
	CustomerID         string   `json:"customer_id,omitempty"`
	APIEndpoint        string   `json:"api_endpoint,omitempty"`
	APIKey             string   `json:"api_key,omitempty"`
	ScanFrequencyHours string   `json:"scan_frequency_hours,omitempty"`
	SearchDirs         []string `json:"search_dirs,omitempty"`
	EnableNPMScan      *bool    `json:"enable_npm_scan,omitempty"`
	EnableBrewScan     *bool    `json:"enable_brew_scan,omitempty"`
	EnablePythonScan   *bool    `json:"enable_python_scan,omitempty"`
	ColorMode          string   `json:"color_mode,omitempty"`
	OutputFormat       string   `json:"output_format,omitempty"`
	HTMLOutputFile     string   `json:"html_output_file,omitempty"`
	Quiet              *bool    `json:"quiet,omitempty"`
}

ConfigFile is the JSON structure persisted to ~/.stepsecurity/config.json.

Jump to

Keyboard shortcuts

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