Skip to content

feat: fallback to truncated description if advisory does not have a summary - #6044

Draft
G-Rath wants to merge 4 commits into
google:masterfrom
ackama:fallback-to-description
Draft

G-Rath wants to merge 4 commits into
google:masterfrom
ackama:fallback-to-description

Conversation

@G-Rath

@G-Rath G-Rath commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

@G-Rath G-Rath changed the title feaet: fallback to truncated description if advisory does not have a summary feat: fallback to truncated description if advisory does not have a summary Sep 22, 2026
@G-Rath
G-Rath force-pushed the fallback-to-description branch 4 times, most recently from 0ff6c51 to 478d3a1 Compare September 22, 2026 19:14
@G-Rath

G-Rath commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

@another-rex I think I've done this right so hopefully the failures are unrelated, but afaik I cannot access the logs to see for myself 😅

@another-rex

Copy link
Copy Markdown
Contributor

Hmm I can't seem to see the test errors either??? This is quite weird.

vuln := &osvschema.Vulnerability{
Id: "TEST-123",
Published: timestamppb.New(time.Date(2025, time.January, 1, 0, 0, 0, 0, time.UTC)),
Summary: "This is a vuln",

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.

The test error is just you filled out the summaries, so it doesn't take from description

@G-Rath G-Rath Sep 28, 2026 •

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.

yup ok I completely forgot to update all these tests 🤦

@G-Rath
G-Rath force-pushed the fallback-to-description branch from a3fd32d to eabca2a Compare September 28, 2026 00:56
@G-Rath
G-Rath requested a review from another-rex September 28, 2026 01:40
summary = vuln.GetDetails()

if summary != "" {
summary = truncate(summary)

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.

tbh it might be worth truncating in all cases?

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.

@another-rex does thumbs up mean you want me to do that? 😄

This branch has not been deployed

No deployments
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