Skip to content

Commit

Permalink
chore: remove debugging
Browse files Browse the repository at this point in the history
Signed-off-by: deggja <[email protected]>
  • Loading branch information
deggja committed Aug 31, 2024
1 parent 9949893 commit d9af82c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions backend/pkg/k8s/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,15 +402,12 @@ func CalculateScore(hasPolicies bool, hasDenyAll bool, unprotectedPodsCount int)

if hasDenyAll {
score += 20 // Add 20 points for having deny-all policies
fmt.Printf("Added 20 points for deny-all policies. New score: %d\n", score)
} else if !hasPolicies {
score -= 20 // Subtract 20 points if there are no policies at all
fmt.Printf("Subtracted 20 points for no policies. New score: %d\n", score)
}

// Deduct score based on the number of unprotected pods
score -= unprotectedPodsCount
fmt.Printf("Subtracted %d points for %d unprotected pods. Final score: %d\n", unprotectedPodsCount, unprotectedPodsCount, score)

if score > 100 {
score = 100
Expand Down

0 comments on commit d9af82c

Please sign in to comment.