Skip to content

feat: reworking on security advisory feature - #2600

Open
juliankepka wants to merge 10 commits into
mainfrom
feat/advisory-followup
Open

feat: reworking on security advisory feature#2600
juliankepka wants to merge 10 commits into
mainfrom
feat/advisory-followup

Conversation

@juliankepka

Copy link
Copy Markdown
Collaborator

No description provided.

@juliankepka juliankepka changed the title fix: reworked id from int to uuid and migration feat: reworking on security advisory feature Jul 21, 2026
@juliankepka juliankepka linked an issue Jul 21, 2026 that may be closed by this pull request
@juliankepka
juliankepka marked this pull request as ready for review July 21, 2026 15:09
Copilot AI review requested due to automatic review settings July 21, 2026 15:09

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread controllers/advisory_controller.go Outdated

type Advisory struct {
ID int64 `json:"id" gorm:"primaryKey;column:id"`
Vulnerability `gorm:"-"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the reason behind this? There should be some properties we can actually reuse. Is the struct so different?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AI made this change because i had errors with the embedding of the vulnerability. The justification was: The embedded Vulnerability struct is included for method promotion (Go embedding), so Advisory satisfies the shared vuln interface via methods like GetTicketID(), SetTicketID(), etc. — not for persistence. The gorm:"-" tag tells GORM to ignore this field entirely (no column mapping, no reads/writes, no migration). Without it, GORM would promote the embedded struct's fields (ID, AssetID, CreatedAt, UpdatedAt) into the advisories table, conflicting with Advisory's own identically-named columns and breaking auto-migration.

Comment thread database/models/advisory_model.go Outdated
Comment thread database/models/advisory_model.go Outdated
Comment thread services/advisory_service.go
@juliankepka
juliankepka requested a review from timbastin July 22, 2026 08:11
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.

Security Advisories Follow up

3 participants