Documentation ¶
Index ¶
- Constants
- Variables
- func Report(roots []string) int
- func Scan(roots []string) ([]string, []error)
- type Scanner
- func (o Scanner) ScanFileExists(pth string, info os.FileInfo) error
- func (o Scanner) ScanHome(pth string, info os.FileInfo) []string
- func (o Scanner) ScanSSH(pth string, info os.FileInfo) []string
- func (o Scanner) ScanSSHAuthorizedKeys(pth string, info os.FileInfo) []string
- func (o Scanner) ScanSSHConfig(pth string, info os.FileInfo) []string
- func (o Scanner) ScanSSHKeys(pth string, info os.FileInfo) []string
- func (o Scanner) ScanSSHKnownHosts(pth string, info os.FileInfo) []string
- func (o *Scanner) Walk(pth string, info os.FileInfo, err error) error
Constants ¶
View Source
const Version = "0.0.1"
Version is semver.
Variables ¶
View Source
var SSHKeyPattern = regexp.MustCompile("^id_.+$")
SSHKeyPattern matches SSH key filenames.
View Source
var SSHPublicKeyPattern = regexp.MustCompile("^id_.+\\.pub$")
SSHPublicKeyPattern matches SSH public key filenames.
Functions ¶
Types ¶
type Scanner ¶
type Scanner struct { // Warnings denote an actionable permission discrepancy. Warnings []string // Home denotes the current user's home directory. Home string }
Scanner collects warnings.
func (Scanner) ScanFileExists ¶
ScanFileExists checks paths for existence.
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.
Click to show internal directories.
Click to hide internal directories.