Skip to content

Proposal: Add csaf validator job#1727

Open
Hubtrick-Git wants to merge 11 commits intomainfrom
add-csaf-validator-job
Open

Proposal: Add csaf validator job#1727
Hubtrick-Git wants to merge 11 commits intomainfrom
add-csaf-validator-job

Conversation

@Hubtrick-Git
Copy link
Collaborator

@Hubtrick-Git Hubtrick-Git commented Feb 22, 2026

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

  • currently we stop the validation of a report after running into an error. Some errors are not recoverable, but we could in theory continue validating the rest of the report after running into a non-critical error
  • if this proves to be useful we could implement this in the pipeline

( Why is mechanical justification not a pointer?)

@Hubtrick-Git Hubtrick-Git self-assigned this Feb 22, 2026
Copilot AI review requested due to automatic review settings February 22, 2026 18:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 validate CLI 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.

@Hubtrick-Git
Copy link
Collaborator Author

Error collection can definitely be simplified quite a bit, if I cut out correct classifications.

@Hubtrick-Git
Copy link
Collaborator Author

@timbastin if you have time you can take a look at this and evaluate the usefulness of this...

@Hubtrick-Git Hubtrick-Git changed the title Propose: Add csaf validator job Proposal: Add csaf validator job Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants