configaudit

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BunDetector added in v1.12.0

type BunDetector struct {
	// contains filtered or unexported fields
}

BunDetector audits bun: bunfig.toml at user + XDG + project scopes, plus any .npmrc bun would read as an auth side-channel.

func NewBunDetector added in v1.12.0

func NewBunDetector(exec executor.Executor) *BunDetector

NewBunDetector returns a detector with platform-specific hooks wired in.

func (*BunDetector) Detect added in v1.12.0

func (d *BunDetector) Detect(ctx context.Context, searchDirs []string, loggedInUser *user.User) model.BunAudit

Detect runs the full bun audit.

func (*BunDetector) WithLogger added in v1.14.0

func (d *BunDetector) WithLogger(log *progress.Logger) *BunDetector

WithLogger injects a logger (used to surface exec fallbacks when metadata version resolution misses). Chainable, like WithSkipper.

func (*BunDetector) WithSkipper added in v1.12.0

func (d *BunDetector) WithSkipper(s *tcc.Skipper) *BunDetector

WithSkipper attaches a TCC skipper so discovery skips macOS-protected dirs.

type NPMRCDetector

type NPMRCDetector struct {
	// contains filtered or unexported fields
}

NPMRCDetector audits npm configuration: discovers all .npmrc files, parses them, captures the merged effective view, and surfaces relevant env vars.

The detector intentionally keeps file metadata collection (owner, mode, hashes) and git-tracking checks pluggable so unit tests don't need real syscalls or a git binary.

func NewNPMRCDetector

func NewNPMRCDetector(exec executor.Executor) *NPMRCDetector

NewNPMRCDetector returns a detector with default platform-specific metadata helpers wired in.

func (*NPMRCDetector) Detect

func (d *NPMRCDetector) Detect(ctx context.Context, searchDirs []string, loggedInUser *user.User) model.NPMRCAudit

Detect runs the full audit. searchDirs are the dirs to walk for project- level .npmrc files (typically the user's $HOME plus any extra dirs configured by the operator). loggedInUser is the username whose ~/.npmrc we resolve for the user-scope file.

func (*NPMRCDetector) WithSkipper added in v1.11.4

func (d *NPMRCDetector) WithSkipper(s *tcc.Skipper) *NPMRCDetector

WithSkipper attaches a TCC skipper so .npmrc discovery skips macOS-protected directories. A nil skipper is a no-op. Returns the detector for chaining.

type PipConfigDetector

type PipConfigDetector struct {
	// contains filtered or unexported fields
}

PipConfigDetector performs the read-only pip config audit.

func NewPipConfigDetector

func NewPipConfigDetector(exec executor.Executor) *PipConfigDetector

NewPipConfigDetector wires platform-specific hooks; tests override.

func (*PipConfigDetector) Detect

func (d *PipConfigDetector) Detect(ctx context.Context, loggedInUser *user.User) model.PipAudit

Detect runs the full audit.

loggedInUser drives where we look for the user's pip config when running as root (launchd / systemd context). Pass nil when the agent is already running as the user.

type PnpmDetector added in v1.12.0

type PnpmDetector struct {
	// contains filtered or unexported fields
}

PnpmDetector audits pnpm configuration. pnpm reads the same .npmrc syntax as npm; only the effective view (different key set, no source attribution) and env-var list diverge.

func NewPnpmDetector added in v1.12.0

func NewPnpmDetector(exec executor.Executor) *PnpmDetector

NewPnpmDetector returns a detector with platform-specific hooks wired in.

func (*PnpmDetector) Detect added in v1.12.0

func (d *PnpmDetector) Detect(ctx context.Context, searchDirs []string, loggedInUser *user.User) model.PnpmAudit

Detect runs the full pnpm audit.

func (*PnpmDetector) WithSkipper added in v1.12.0

func (d *PnpmDetector) WithSkipper(s *tcc.Skipper) *PnpmDetector

WithSkipper attaches a TCC skipper so .npmrc discovery skips macOS-protected directories. nil is a no-op. Returns the detector for chaining.

type YarnDetector added in v1.12.0

type YarnDetector struct {
	// contains filtered or unexported fields
}

YarnDetector audits both yarn flavors. Both file shapes are always discovered — a v1 binary with a berry file (or vice versa) is itself a signal the renderer surfaces.

func NewYarnDetector added in v1.12.0

func NewYarnDetector(exec executor.Executor) *YarnDetector

NewYarnDetector returns a detector with platform-specific hooks wired in.

func (*YarnDetector) Detect added in v1.12.0

func (d *YarnDetector) Detect(ctx context.Context, searchDirs []string, loggedInUser *user.User) model.YarnAudit

Detect runs the full yarn audit.

func (*YarnDetector) WithLogger added in v1.14.0

func (d *YarnDetector) WithLogger(log *progress.Logger) *YarnDetector

WithLogger injects a logger (used to surface exec fallbacks when metadata version resolution misses). Chainable, like WithSkipper.

func (*YarnDetector) WithSkipper added in v1.12.0

func (d *YarnDetector) WithSkipper(s *tcc.Skipper) *YarnDetector

WithSkipper attaches a TCC skipper so discovery skips macOS-protected dirs.

Jump to

Keyboard shortcuts

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