audit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package audit records reads and writes of secret variable values. An event is best-effort by design: losing one audit row is better than blocking the action it describes, so Record logs failures instead of returning them.

Index

Constants

View Source
const (
	Reveal = "reveal" // shown unmasked in the UI
	Copy   = "copy"   // fetched for the clipboard
	Edit   = "edit"   // pre-filled into an edit form
	Read   = "read"   // listed unmasked over the API
	Share  = "share"  // revealed through a one-time share link
	Set    = "set"    // value written
	Delete = "delete" // variable removed
)

Actions. "Read" actions mean the plaintext left the server.

Variables

This section is empty.

Functions

func Actor

func Actor(c echo.Context) string

Actor names the logged-in user for the web surfaces; API and share-link callers build their own actor strings ("api:<key>", "share-link:<id>").

func PanelViews

func PanelViews(c echo.Context, s repo.Store, vars []repo.Variable, ownerKind, ownerID string)

PanelViews logs the panel renders that put a secret's plaintext in the markup, an explicit ?reveal= or an ?edit= pre-fill. Copy never touches the DOM; it fetches from ServeValue, which logs itself.

func Record

func Record(ctx context.Context, s repo.Store, actor, action, ownerKind, ownerID, name string)

func ServeValue

func ServeValue(c echo.Context, s repo.Store, vars []repo.Variable, ownerKind, ownerID, action string) error

ServeValue finds ?name= in the scope's variables, records the read under the action the caller's button performs, and returns the plaintext. Copy and the tile tab's Reveal share this endpoint but are not the same act.

Types

This section is empty.

Jump to

Keyboard shortcuts

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