Skip to content

feat: first approach advisory-tab#2183

Merged
timbastin merged 16 commits into
mainfrom
feat/advisory
Jul 18, 2026
Merged

feat: first approach advisory-tab#2183
timbastin merged 16 commits into
mainfrom
feat/advisory

Conversation

@juliankepka

@juliankepka juliankepka commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

@juliankepka
juliankepka marked this pull request as ready for review June 29, 2026 09:55
Comment thread database/migrations/20260623101120_add_advisory_table.up.sql Outdated
Comment thread controllers/advisory_controller.go Outdated
Comment thread controllers/advisory_controller.go Outdated
Comment thread controllers/advisory_controller.go Outdated
Comment thread controllers/advisory_controller.go Outdated
Comment thread database/repositories/advisory_repository.go Outdated
Comment thread database/repositories/advisory_repository.go Outdated
Comment thread database/repositories/advisory_repository.go Outdated
Comment thread router/advisory_router.go
Comment thread services/advisory_service.go Outdated
@seb-kw

seb-kw commented Jul 1, 2026

Copy link
Copy Markdown
Member

Pls ensure to cross-check for “Withdraw” functionality. So that users can withdraw a published advisory (the OSV should be able to handle this too). An unpublished draft advisory should be deletable.

Copilot AI review requested due to automatic review settings July 1, 2026 12:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces first-pass support for publishing DevGuard-managed security advisories by adding database persistence, CRUD API plumbing, and CSAF report generation for advisory-based documents (DGSA).

Changes:

  • Adds advisories + affected_packages tables/models and a GORM repository/service layer for CRUD operations.
  • Exposes new advisory CRUD endpoints under the asset version router (/advisory/...) and wires controller/providers.
  • Extends CSAF generation/serving flow to support advisory-backed CSAF documents (DGSA).

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
transformer/advisory_transformer.go Maps advisory create/update DTOs into DB models (including affected packages).
shared/common_interfaces.go Adds AdvisoryService/AdvisoryRepository interfaces and CSAF service extension for advisory reports.
services/providers.go Registers AdvisoryService with Fx DI.
services/csaf_service.go Adds CSAF document generation for advisory-backed reports (DGSA).
services/advisory_service.go Service wrapper delegating advisory CRUD to repository.
router/providers.go Registers AdvisoryRouter with Fx DI.
router/advisory_router.go Adds asset-version-scoped routes for advisory CRUD.
dtos/advisory_dto.go Defines advisory request/response DTOs and affected-package DTO.
database/repositories/providers.go Registers AdvisoryRepository with Fx DI.
database/repositories/advisory_repository.go Implements advisory CRUD + paged listing with GORM.
database/models/advisory_model.go Adds Advisory and AffectedPackage DB models and many-to-many relation.
database/migrations/20260623101120_add_advisory_table.up.sql Creates advisories, affected_packages, and join table schema.
controllers/providers.go Registers AdvisoryController with Fx DI.
controllers/csaf_controller.go Extends CSAF serving endpoint to support DGSA/advisory reports.
controllers/advisory_controller.go Implements advisory CRUD HTTP handlers.
cmd/devguard/main.go Invokes the new AdvisoryRouter to activate routes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread services/csaf_service.go Outdated
Comment thread controllers/csaf_controller.go Outdated
Comment thread controllers/advisory_controller.go
Comment thread controllers/advisory_controller.go
Comment thread controllers/advisory_controller.go
Comment thread shared/common_interfaces.go Outdated
Comment thread shared/common_interfaces.go Outdated
Comment thread database/models/advisory_model.go Outdated
Comment thread database/models/advisory_model.go Outdated
Comment thread services/csaf_service.go Outdated
@timbastin
timbastin merged commit 6c5046a into main Jul 18, 2026
8 of 9 checks passed
@timbastin
timbastin deleted the feat/advisory branch July 18, 2026 10:19
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.

Publish own security advisories

4 participants