Trufflehog scanner
๐ค AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
provide.testkit.quality.security.trufflehog_scanner
¶
TruffleHog deep secret detection scanner implementation.
Classes¶
TruffleHogScanner
¶
Deep secret detection scanner using TruffleHog.
Scans codebases for secrets using entropy analysis and pattern matching. Can optionally verify if discovered credentials are still active.
Note: TruffleHog is a Go binary and must be installed separately. Install via: brew install trufflehog (macOS) or download from GitHub releases.
Initialize TruffleHog scanner.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict[str, Any] | None
|
Scanner configuration options. If "config_file" is not specified, will auto-detect .provide/security/trufflehog.yml if it exists. |
None
|
Source code in provide/testkit/quality/security/trufflehog_scanner.py
Functions¶
analyze
¶
Run TruffleHog analysis on the given path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
Path to scan for secrets |
required |
**kwargs
|
Any
|
Additional options including artifact_dir |
{}
|
Returns:
| Type | Description |
|---|---|
QualityResult
|
QualityResult with secret detection data |
Source code in provide/testkit/quality/security/trufflehog_scanner.py
report
¶
Generate report from QualityResult.