configaudit

package
v1.11.6 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 21 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 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.

Jump to

Keyboard shortcuts

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