Gitleaks 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.gitleaks_scanner
¶
GitLeaks secret detection scanner implementation.
Classes¶
GitLeaksScanner
¶
Secret detection scanner using GitLeaks.
Scans codebases for hardcoded secrets, API keys, passwords, and other sensitive information using pattern matching.
Note: GitLeaks is a Go binary and must be installed separately. Install via: brew install gitleaks (macOS) or download from GitHub releases.
Initialize GitLeaks 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/gitleaks.toml if it exists. |
None
|
Source code in provide/testkit/quality/security/gitleaks_scanner.py
Functions¶
analyze
¶
Run GitLeaks 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/gitleaks_scanner.py
report
¶
Generate report from QualityResult.