audit

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package audit implements security and compliance scanning for cloop projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountsByLevel

func CountsByLevel(findings []Finding) (pass, warn, fail int)

CountsByLevel returns pass, warn, fail counts from a slice of findings.

func Leaks added in v0.0.5

func Leaks(text string) []string

Leaks returns the names of the pkg/redact detectors that match text, in registry order: exactly the scan the git-history and task-artifact checks run, exported so tests/security holds this scanner to the same fixture corpus as the three that redact.

func ScannerLines

func ScannerLines(text string, fn func(string))

ScannerLines is a helper that iterates lines of text via a Scanner. (Kept for potential future use by callers.)

Types

type Finding

type Finding struct {
	Name    string
	Level   Level
	Message string
	Fix     string // optional remediation hint
}

Finding is a single audit result.

func Audit

func Audit(workDir string, cfg *config.Config, opts Options) ([]Finding, error)

Audit inspects the cloop project for security and compliance issues and returns a slice of Findings. cfg may be nil; defaults are used in that case.

type Level

type Level int

Level indicates the severity of an audit finding.

const (
	Pass Level = iota
	Warn
	Fail
)

func (Level) String

func (l Level) String() string

type Options

type Options struct {
	// SnapshotSizeThresholdMB is the threshold in MiB above which the snapshot
	// directory triggers a warning. Defaults to 50.
	SnapshotSizeThresholdMB int64
}

Options configures the audit run.

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns Options with sensible defaults.

Jump to

Keyboard shortcuts

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