Documentation ¶
Index ¶
- Constants
- Variables
- type Scanner
- func (o Scanner) CheckFileExists(pth string, info os.FileInfo) error
- func (o Scanner) ScanEtcSSH(pth string, info os.FileInfo)
- func (o Scanner) ScanHome(pth string, info os.FileInfo)
- func (o Scanner) ScanInvisible(pth string, info os.FileInfo)
- func (o Scanner) ScanSSHAuthorizedKeys(pth string, info os.FileInfo)
- func (o Scanner) ScanSSHConfig(pth string, info os.FileInfo)
- func (o Scanner) ScanSSHKeys(pth string, info os.FileInfo)
- func (o Scanner) ScanSSHKnownHosts(pth string, info os.FileInfo)
- func (o Scanner) ScanUserSSH(pth string, info os.FileInfo)
- func (o *Scanner) ValidateChmod(pth string, info os.FileInfo, expectedMode os.FileMode)
- func (o *Scanner) ValidateChmodMask(pth string, info os.FileInfo, expectedMask os.FileMode)
- func (o *Scanner) ValidateDirectory(pth string, info os.FileInfo)
- func (o *Scanner) ValidateFile(pth string, info os.FileInfo)
- func (o *Scanner) Walk(pth string, info os.FileInfo, err error) error
Constants ¶
const Version = "0.0.10"
Version is semver.
Variables ¶
var SSHKeyPattern = regexp.MustCompile("^id_.+$")
SSHKeyPattern matches SSH key filenames.
var SSHPublicKeyPattern = regexp.MustCompile(`^id_.+\.pub$`)
SSHPublicKeyPattern matches SSH public key filenames.
Functions ¶
This section is empty.
Types ¶
type Scanner ¶
type Scanner struct { // Debug enables additional messages. Debug bool // DebugCh signals low level events. DebugCh chan string // WarnCh signals permission discrepancies. WarnCh chan string // ErrCh signals errors experienced during scan attempts. ErrCh chan error // DoneChn signals the end of a bulk scan. DoneCh chan struct{} // Home denotes the current user's home directory. Home string }
Scanner collects warnings.
func Illuminate ¶ added in v0.0.4
Illuminate pours through the given file paths recursively for known permission discrepancies.
func (Scanner) CheckFileExists ¶ added in v0.0.4
CheckFileExists checks paths for existence.
func (Scanner) ScanEtcSSH ¶ added in v0.0.4
ScanEtcSSH analyzes /etc or /etc/ssh.
func (Scanner) ScanInvisible ¶ added in v0.0.5
ScanInvisible analyzes paths for missing u+x (directories) or u+r (files) bits.
func (Scanner) ScanSSHAuthorizedKeys ¶
ScanSSHAuthorizedKeys analyzes authorized_keys files.
func (Scanner) ScanSSHConfig ¶
ScanSSHConfig analyzes .ssh/config files.
func (Scanner) ScanSSHKeys ¶
ScanSSHKeys analyzes .ssh/id_.+(\.pub)? files.
func (Scanner) ScanSSHKnownHosts ¶
ScanSSHKnownHosts analyzes known_hosts files.
func (Scanner) ScanUserSSH ¶ added in v0.0.4
ScanUserSSH analyzes .ssh directories.
func (*Scanner) ValidateChmod ¶ added in v0.0.5
ValidateChmod enforces the given chmod policy.
func (*Scanner) ValidateChmodMask ¶ added in v0.0.5
ValidateChmodMask enforces the given chmod mask policy.
func (*Scanner) ValidateDirectory ¶ added in v0.0.5
ValidateDirectory enforces the given directory policy.
func (*Scanner) ValidateFile ¶ added in v0.0.5
ValidateFile enforces the given file policy.