Semgrep 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.semgrep_scanner
¶
Semgrep pattern-based static analysis security scanner implementation.
Classes¶
SemgrepScanner
¶
Pattern-based static analysis security scanner using Semgrep.
Scans code for security vulnerabilities, bugs, and anti-patterns using customizable pattern rules. Supports many languages including Python, JavaScript, Go, Java, and more.
Initialize Semgrep scanner.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict[str, Any] | None
|
Scanner configuration options. If "config" is not specified, will auto-detect .provide/security/semgrep.yml if it exists. |
None
|
Source code in provide/testkit/quality/security/semgrep_scanner.py
Functions¶
analyze
¶
Run Semgrep analysis on the given path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
Path to scan |
required |
**kwargs
|
Any
|
Additional options including artifact_dir |
{}
|
Returns:
| Type | Description |
|---|---|
QualityResult
|
QualityResult with security analysis data |
Source code in provide/testkit/quality/security/semgrep_scanner.py
report
¶
Generate report from QualityResult.