Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a CSAF (Common Security Advisory Framework) validator job to automate the validation of CSAF reports. The implementation refactors CSAF report generation into a reusable service method and introduces a new CLI command that validates all CSAF reports across all organizations and assets, checking both syntactic and semantic correctness.
Changes:
- Refactored CSAF report generation from a standalone function to a method on
csafService, making it reusable across the codebase - Added a new
validateCLI command that builds and validates CSAF reports concurrently using worker pools - Enhanced CSAF reports to include flags for false positive vulnerabilities with justifications and timestamps
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/common_interfaces.go | Added GenerateCSAFReport method to CSAFService interface to support the refactoring |
| services/csaf_service.go | Refactored GenerateCSAFReport as a service method, added flag generation for false positives, and created GetCSAFVulnsForAsset helper function |
| controllers/csaf_controller.go | Updated to inject and use csafService for report generation instead of calling standalone function |
| cmd/devguard-cli/main.go | Registered new CSAF validate command |
| cmd/devguard-cli/commands/vulndb_import.go | Contains commented-out code (appears unrelated to main changes) |
| cmd/devguard-cli/commands/csaf_validator.go | New comprehensive validator with concurrent building and validation of CSAF reports |
| .vscode/launch.json | Added launch configuration for the new validate command |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Error collection can definitely be simplified quite a bit, if I cut out correct classifications. |
|
@timbastin if you have time you can take a look at this and evaluate the usefulness of this... |
Core Idea
Implemented CSAF Validator which builds all csaf reports for all orgs and then validates each one syntactically as well as semantically
This feature aims to automate the review process of CSAF reports when doing anything breaking
If a validation fails a detailed Error message aims to speed up the process of finding and eliminating the bug
Discussion
( Why is mechanical justification not a pointer?)