Documentation
¶
Index ¶
- func GetPermissionFixMessage(filePath string) string
- func IsNullDevice(path string) bool
- type AICliProbe
- type CloudProbe
- type EnvProbe
- type FileIndexAware
- type FingerprintSaltAware
- type GHProbe
- type GitProbe
- type JetBrainsProbe
- type NPMProbe
- type Probe
- type PyPIProbe
- type Result
- type SSHProbe
- type ShellHistoryProbe
- type WireGuardProbe
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPermissionFixMessage ¶
GetPermissionFixMessage returns a platform-appropriate message for fixing file permissions.
func IsNullDevice ¶
IsNullDevice checks if a path refers to the null device on any platform. On Unix: /dev/null On Windows: nul, NUL, C:\nul, \\.\nul, etc. This function detects both Unix and Windows null device patterns regardless of the current platform, because config files may be shared across systems.
Types ¶
type AICliProbe ¶
type AICliProbe struct {
// contains filtered or unexported fields
}
AICliProbe checks AI CLI credential and chat files
func NewAICliProbe ¶
func NewAICliProbe(config models.ProbeSettings, registry *detector.Registry) *AICliProbe
NewAICliProbe creates a new AI CLI credentials probe. Accepts an optional flag "max_file_size" (int, in bytes) to override the default 1 MB file size limit for AI CLI files.
func (*AICliProbe) IsEnabled ¶
func (p *AICliProbe) IsEnabled() bool
IsEnabled returns whether the probe is enabled
func (*AICliProbe) SetFileIndex ¶
func (p *AICliProbe) SetFileIndex(index *fileindex.FileIndex)
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*AICliProbe) SetFingerprintSalt ¶ added in v0.4.0
func (p *AICliProbe) SetFingerprintSalt(salt string)
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type CloudProbe ¶
type CloudProbe struct {
// contains filtered or unexported fields
}
CloudProbe checks cloud provider credential files
func NewCloudProbe ¶
func NewCloudProbe(config models.ProbeSettings, registry *detector.Registry) *CloudProbe
NewCloudProbe creates a new cloud credentials probe
func (*CloudProbe) IsEnabled ¶
func (p *CloudProbe) IsEnabled() bool
IsEnabled returns whether the probe is enabled
func (*CloudProbe) SetFileIndex ¶
func (p *CloudProbe) SetFileIndex(index *fileindex.FileIndex)
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*CloudProbe) SetFingerprintSalt ¶ added in v0.4.0
func (p *CloudProbe) SetFingerprintSalt(salt string)
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type EnvProbe ¶
type EnvProbe struct {
// contains filtered or unexported fields
}
EnvProbe checks environment variables for security issues
func NewEnvProbe ¶
func NewEnvProbe(config models.ProbeSettings, registry *detector.Registry) *EnvProbe
NewEnvProbe creates a new environment variable probe
func (*EnvProbe) SetFileIndex ¶
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*EnvProbe) SetFingerprintSalt ¶ added in v0.4.0
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type FileIndexAware ¶
type FileIndexAware interface {
// SetFileIndex provides the file index to the probe
SetFileIndex(index *fileindex.FileIndex)
}
FileIndexAware is an optional interface that probes can implement to receive the pre-built file index before execution
type FingerprintSaltAware ¶ added in v0.4.0
type FingerprintSaltAware interface {
// SetFingerprintSalt provides the fingerprint salt to the probe
SetFingerprintSalt(salt string)
}
FingerprintSaltAware is an optional interface that probes can implement to receive the machine-specific fingerprint salt before execution
type GHProbe ¶
type GHProbe struct {
// contains filtered or unexported fields
}
GHProbe checks for GitHub CLI authentication
func NewGHProbe ¶
func NewGHProbe(config models.ProbeSettings, registry *detector.Registry) *GHProbe
NewGHProbe creates a new GitHub CLI probe
func (*GHProbe) SetFingerprintSalt ¶ added in v0.6.0
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type GitProbe ¶
type GitProbe struct {
// contains filtered or unexported fields
}
GitProbe checks Git configuration for security issues
func NewGitProbe ¶
func NewGitProbe(config models.ProbeSettings, registry *detector.Registry) *GitProbe
NewGitProbe creates a new Git probe
func (*GitProbe) SetFileIndex ¶ added in v0.6.0
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*GitProbe) SetFingerprintSalt ¶ added in v0.4.0
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type JetBrainsProbe ¶
type JetBrainsProbe struct {
// contains filtered or unexported fields
}
JetBrainsProbe checks JetBrains project files for secrets
func NewJetBrainsProbe ¶
func NewJetBrainsProbe(config models.ProbeSettings, registry *detector.Registry) *JetBrainsProbe
NewJetBrainsProbe creates a new JetBrains probe
func (*JetBrainsProbe) IsEnabled ¶
func (p *JetBrainsProbe) IsEnabled() bool
IsEnabled returns whether the probe is enabled
func (*JetBrainsProbe) SetFileIndex ¶
func (p *JetBrainsProbe) SetFileIndex(index *fileindex.FileIndex)
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*JetBrainsProbe) SetFingerprintSalt ¶ added in v0.4.0
func (p *JetBrainsProbe) SetFingerprintSalt(salt string)
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type NPMProbe ¶
type NPMProbe struct {
// contains filtered or unexported fields
}
NPMProbe checks NPM and Yarn configuration for security issues
func NewNPMProbe ¶
func NewNPMProbe(config models.ProbeSettings, registry *detector.Registry) *NPMProbe
NewNPMProbe creates a new NPM probe
func (*NPMProbe) SetFileIndex ¶
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*NPMProbe) SetFingerprintSalt ¶ added in v0.4.0
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type Probe ¶
type Probe interface {
// Name returns the name of the probe (e.g., "git", "ssh", "npm")
Name() string
// Execute runs the probe and returns findings
Execute(ctx context.Context) ([]models.Finding, error)
// IsEnabled returns whether the probe is enabled
IsEnabled() bool
}
Probe defines the interface that all probes must implement
type PyPIProbe ¶ added in v0.6.0
type PyPIProbe struct {
// contains filtered or unexported fields
}
PyPIProbe checks PyPI and pip configuration for security issues
func NewPyPIProbe ¶ added in v0.6.0
func NewPyPIProbe(config models.ProbeSettings, registry *detector.Registry) *PyPIProbe
NewPyPIProbe creates a new PyPI probe
func (*PyPIProbe) SetFileIndex ¶ added in v0.6.0
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*PyPIProbe) SetFingerprintSalt ¶ added in v0.6.0
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type SSHProbe ¶
type SSHProbe struct {
// contains filtered or unexported fields
}
SSHProbe checks SSH configuration and key security
func NewSSHProbe ¶
func NewSSHProbe(config models.ProbeSettings, registry *detector.Registry) *SSHProbe
NewSSHProbe creates a new SSH probe
func (*SSHProbe) SetFileIndex ¶
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*SSHProbe) SetFingerprintSalt ¶ added in v0.4.0
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type ShellHistoryProbe ¶
type ShellHistoryProbe struct {
// contains filtered or unexported fields
}
ShellHistoryProbe checks shell history files for secrets
func NewShellHistoryProbe ¶
func NewShellHistoryProbe(config models.ProbeSettings, registry *detector.Registry) *ShellHistoryProbe
NewShellHistoryProbe creates a new shell history probe
func (*ShellHistoryProbe) IsEnabled ¶
func (p *ShellHistoryProbe) IsEnabled() bool
IsEnabled returns whether the probe is enabled
func (*ShellHistoryProbe) Name ¶
func (p *ShellHistoryProbe) Name() string
Name returns the probe name
func (*ShellHistoryProbe) SetFileIndex ¶
func (p *ShellHistoryProbe) SetFileIndex(index *fileindex.FileIndex)
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*ShellHistoryProbe) SetFingerprintSalt ¶ added in v0.4.0
func (p *ShellHistoryProbe) SetFingerprintSalt(salt string)
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)
type WireGuardProbe ¶ added in v0.6.0
type WireGuardProbe struct {
// contains filtered or unexported fields
}
WireGuardProbe checks WireGuard VPN configuration files for exposed private keys
func NewWireGuardProbe ¶ added in v0.6.0
func NewWireGuardProbe(config models.ProbeSettings, registry *detector.Registry) *WireGuardProbe
NewWireGuardProbe creates a new WireGuard probe
func (*WireGuardProbe) IsEnabled ¶ added in v0.6.0
func (p *WireGuardProbe) IsEnabled() bool
IsEnabled returns whether the probe is enabled
func (*WireGuardProbe) Name ¶ added in v0.6.0
func (p *WireGuardProbe) Name() string
Name returns the probe name
func (*WireGuardProbe) SetFileIndex ¶ added in v0.6.0
func (p *WireGuardProbe) SetFileIndex(index *fileindex.FileIndex)
SetFileIndex sets the file index for this probe (implements FileIndexAware)
func (*WireGuardProbe) SetFingerprintSalt ¶ added in v0.6.0
func (p *WireGuardProbe) SetFingerprintSalt(salt string)
SetFingerprintSalt sets the fingerprint salt on the detector registry (implements FingerprintSaltAware)