Rubocop Integration with DefectDojo
RuboCop is an open-source Ruby static code analyzer and formatter that enforces coding standards defined in the community-driven Ruby Style Guide by analyzing Ruby code for style violations, potential bugs, security issues, and code quality problems including unused variables, complexity issues, and best practice deviations across Ruby 2.0+ implementations. The tool provides highly configurable rules through YAML-based configuration files, automatic code fixing capabilities for many detected issues, and seamless integration into development workflows via CLI, text editors, CI/CD pipelines, and build tools, enabling Ruby developers and teams to maintain consistent code quality, enforce organizational coding standards, and improve overall codebase maintainability throughout the software development lifecycle.
Data Granularity: What Gets Imported
The following fields are captured from Rubocop results and surfaced in DefectDojo findings:
| Field | Source | Notes |
|---|---|---|
| Title | Finding name from the scan | Matched to the tool's own naming |
| Severity | Critical / High / Medium / Low / Info | Mapped from the tool's own severity scale |
| Description | Finding detail from the report | Includes what the issue is and why it matters |
| Mitigation | Remediation guidance | Where the tool provides it |
Importing Into DefectDojo
Use the DefectDojo import API to create a new Test under the relevant Engagement for your product. The request body:
{
"scan_type": "Rubocop",
"engagement": "<engagement-id>",
"file": "results.json"
}