config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config handles kojuto's runtime configuration, including user-customizable sensitive path patterns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultSensitivePaths

func DefaultSensitivePaths() []string

DefaultSensitivePaths returns the built-in set of sensitive path patterns. These cover credentials, secrets, browser data, cloud CLI configs, shell startup files, and other high-value targets observed in real supply chain attacks (Datadog malicious-software-packages-dataset).

func MergeSensitivePaths

func MergeSensitivePaths(cfg *Config) []string

MergeSensitivePaths combines default paths with user config (include/exclude).

Types

type Config

type Config struct {
	SensitivePaths SensitivePathConfig `yaml:"sensitive_paths"`
}

Config holds user-customizable settings loaded from kojuto.yml.

func Load

func Load(path string) (*Config, error)

Load reads a config file from path. Returns default config if file doesn't exist.

type SensitivePathConfig

type SensitivePathConfig struct {
	// Extra patterns to add on top of the built-in defaults.
	Include []string `yaml:"include,omitempty"`
	// Patterns to remove from the defaults (e.g. if causing false positives).
	Exclude []string `yaml:"exclude,omitempty"`
}

SensitivePathConfig controls which file paths are flagged as suspicious when accessed via openat during install or import.

Jump to

Keyboard shortcuts

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