Skip to content

Commit

Permalink
🧹 don't add snoozed score type
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <ivan@mondoo.com>
  • Loading branch information
imilchev committed Jan 29, 2025
1 parent be70b2b commit 97acb7c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions policy/executor/internal/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,6 @@ func (nodeData *ReportingJobNodeData) score() (*policy.Score, error) {
if c.impact.GetScoring() == explorer.ScoringSystem_DISABLED {
s.Type = policy.ScoreType_Disabled
} else if s.Type == policy.ScoreType_Result {
// If the impact is ignore, then the score type should be Snoozed
if c.impact.GetScoring() == explorer.ScoringSystem_IGNORE_SCORE {
s.Type = policy.ScoreType_Snoozed
}
// We cant just forward the score if impact is set and we have a result.
// We still need to apply impact to the score
if c.impact != nil {
Expand Down
3 changes: 0 additions & 3 deletions policy/score.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const (
ScoreType_Unscored
ScoreType_OutOfScope
ScoreType_Disabled
ScoreType_Snoozed
)

// TypeLabel prints the score's type in a human-readable way
Expand All @@ -36,8 +35,6 @@ func (s *Score) TypeLabel() string {
return "out of scope"
case ScoreType_Disabled:
return "disabled"
case ScoreType_Snoozed:
return "snoozed"
default:
return "unknown type"
}
Expand Down

0 comments on commit 97acb7c

Please sign in to comment.