Help us shape the future of Go! Take the 2026 Go Developer Survey

auditcli

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package auditcli is the bide audit command: it produces and verifies audit ProofBundles from the command line, for the auditor/compliance persona who does not write Go. It is deliberately dependency-light: it imports only the core + audit packages (stdlib under the hood), no store backend, so it works against any store by operating on an exported journal (a JSON array of records) and a signed tree head. `verify` needs neither: just the bundle and a public key.

# Produce a proof that one tool call happened, against an anchored STH:
bide audit prove -journal run.json -sth sth.json -tool call_abc -out proof.json

# Verify it offline, trusting only an out-of-band public key:
bide audit verify -bundle proof.json -pubkey ed25519:1a2b...   # only exit 0 means verified

Exit status: 0 verified, 1 not verified, 2 usage error, 3 no verdict, 4 input unreadable or unusable (see exitFor). Only 0 means verified.

Export the journal with audit.ExportJournal(ctx, store, runID), marshaled to JSON.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(stamped string, args []string, stdout, stderr io.Writer) int

Main runs the command line args (without the program name) and returns the exit status. stamped is the release version the program was built with (set by the linker), or "" to read it from the build's module information.

func Verbs

func Verbs() []string

Verbs returns the name of every verb, sorted.

Types

type NotifyStores added in v0.17.0

type NotifyStores struct {
	Journal agent.Store      // the run journals, which must list their runs (agent.Lister)
	Events  audit.EventStore // the notification trails
	Close   func() error     // releases both
}

NotifyStores is a journal and an event store opened for bide audit notifications, read-only.

type StoreOpeners added in v0.17.0

type StoreOpeners struct {
	SQLite   func(path string) (NotifyStores, error)
	Postgres func(dsn string) (NotifyStores, error)
}

StoreOpeners open the databases `bide audit notifications -db` and `-postgres-env` read. The core module carries no store driver, so the full bide command sets them (cmd/bide); in an audit-only build they are nil and those flags are a usage error: the verb then reads exported files only.

var Stores *StoreOpeners

Stores is set by the program that links the store drivers; nil if there are none.

Directories

Path Synopsis
Command auditmain is the audit CLI as a program of its own, which the auditcli tests build to run a binary (exit statuses, the version stamp, files resolved from the working directory).
Command auditmain is the audit CLI as a program of its own, which the auditcli tests build to run a binary (exit statuses, the version stamp, files resolved from the working directory).

Jump to

Keyboard shortcuts

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