audit

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package audit writes and reads the append-only JSONL log of every install check installwall has run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(e Entry) error

Append writes one entry to the log, creating the state directory and file if needed. It never fails the caller's install: write errors are returned so the caller can decide, but installwall only logs them.

func Home

func Home() (string, error)

Home returns the installwall state directory. INSTALLWALL_HOME overrides it, which is how tests and CI keep this off the real home directory.

func LogPath

func LogPath() (string, error)

Types

type Entry

type Entry struct {
	Time      time.Time `json:"time"`
	Tool      string    `json:"tool"`
	Ecosystem string    `json:"ecosystem"`
	Package   string    `json:"package"`
	Level     string    `json:"level"`
	Reasons   []string  `json:"reasons,omitempty"`
	Forced    bool      `json:"forced,omitempty"`
}

Entry is one line of the audit log.

func ReadAll

func ReadAll() ([]Entry, error)

ReadAll returns every entry in the log, oldest first. A missing log file is not an error, it just means nothing has run yet.

Jump to

Keyboard shortcuts

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