audit

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package audit provides a structured audit logger for CLI command invocations. It logs command name, resolved configuration, and sanitised environment state so operators can trace what happened without exposing secret values.

Secrets are logged as presence/absence only — never their values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogCommandStart

func LogCommandStart(log *slog.Logger, command string, configPath string)

LogCommandStart emits a structured audit log entry when a CLI command begins. It records the command name, config file source, and sanitised environment.

func SanitiseKey

func SanitiseKey(key, value string) string

SanitiseKey returns "set" or "unset" for known secret keys, or the actual value for non-secret keys. This is safe to use in log messages.

Types

This section is empty.

Jump to

Keyboard shortcuts

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