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.
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.