Documentation
¶
Overview ¶
Package etcshadow implements a detector for weak/guessable passwords stored in /etc/shadow.
Index ¶
- Constants
- Variables
- func New() detector.Detector
- type Cracker
- type Detector
- func (d Detector) DetectedFinding() inventory.Finding
- func (Detector) Name() string
- func (Detector) RequiredExtractors() []string
- func (Detector) Requirements() *plugin.Capabilities
- func (d Detector) Scan(ctx context.Context, scanRoot *scalibrfs.ScanRoot, ...) (inventory.Finding, error)
- func (Detector) Version() int
Constants ¶
View Source
const (
// Name of the detector.
Name = "weakcredentials/etcshadow"
)
Variables ¶
View Source
var ErrNotCracked = errors.New("not cracked")
ErrNotCracked returned when a cracker did not find a matching password.
Functions ¶
Types ¶
type Cracker ¶
type Cracker interface {
// Crack returns (password,nil) on success and ("", ErrNotCracked) on failure.
Crack(ctx context.Context, hash string) (string, error)
}
Cracker interface is implemented by types which know how to crack hashes.
func NewPasswordCracker ¶
func NewPasswordCracker() Cracker
NewPasswordCracker returns a cracker that can attempt to find the password for a given hash.
type Detector ¶
type Detector struct{}
Detector is a SCALIBR Detector for weak/guessable passwords from /etc/shadow.
func (Detector) DetectedFinding ¶ added in v0.3.1
DetectedFinding returns generic vulnerability information about what is detected.
func (Detector) RequiredExtractors ¶
RequiredExtractors returns an empty list as there are no dependencies.
func (Detector) Requirements ¶ added in v0.1.3
func (Detector) Requirements() *plugin.Capabilities
Requirements of the detector.
Click to show internal directories.
Click to hide internal directories.