Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support severity threshold #155

Merged
merged 11 commits into from
May 8, 2024

Conversation

thisislawatts
Copy link
Member

  • refactor: rename to remove typo
  • feat: filter findings output to remove items outside of target severity
  • fix: load severity-threshold from configuration
  • feat: filter output by supplied severity threshold

if !satisfyMinLevel {
openIssueLabelledCount += renderInSeverityColor(severity, fmt.Sprintf(" %d %s ", 0, strings.ToUpper(severity)))
ignoredIssueLabelledCount += renderInSeverityColor(severity, fmt.Sprintf(" %d %s ", 0, strings.ToUpper(severity)))
continue
Copy link
Member Author

Choose a reason for hiding this comment

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

question: Design decision will be needed on whether we want to show 0 LOW when in fact there were Low Issues but they have been filtered out by --severity-threshold setting.

@thisislawatts thisislawatts marked this pull request as ready for review May 6, 2024 15:20
@thisislawatts thisislawatts requested a review from a team as a code owner May 6, 2024 15:20
@thisislawatts thisislawatts force-pushed the feat/support-severity-threshold-filter branch from 1d67ff4 to 94f9262 Compare May 6, 2024 15:22
@thisislawatts
Copy link
Member Author

Following a review session earlier today with @PeterSchafer we agreed to refactoring snyk/cli#5220, into GAF.

}

return reversed
return original
}
Copy link
Member Author

Choose a reason for hiding this comment

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

praise: Nice optimisation

@thisislawatts thisislawatts merged commit 67808fe into main May 8, 2024
7 checks passed
@thisislawatts thisislawatts deleted the feat/support-severity-threshold-filter branch May 8, 2024 13:51
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