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

Incorrect counting of scanned resources or non-intuitive scoring #203

Open
taintedkernel opened this issue Oct 13, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@taintedkernel
Copy link
Contributor




Describe the bug
When I exclude codes from being scanned, the end result is that my score is lower whereas I'd expect the opposite.

To Reproduce
Steps to reproduce the behavior:

  1. On my cluster and with the current excludes I have in place (105 & 108), under the report for this namespace I have a score of 42 for pods: 14 scanned, 0 error, 8 warning, 6 info, 0 OK.
  2. If I add 206 and 301 to excluded the results become: score 0, scanned 2, error 0, warning 2, info 0, OK 0.
  3. For completeness, this is the relevant spinach config:
popeye:
  excludes:
    v1/pods:
    - name: rx:.*
      codes:
      - 105 # named ports for liveness/readiness probes
      - 108 # unnamed ports
      - 206 # pod disruption budget
      - 301 # service account mounted
...

Expected behavior
If I exclude a code that appears on all of my pods (and many of these have only this particular code), the report ends up giving a score of zero along with a count of zero for 'OK'. This seems like unusual behavior to me; if I filter out codes I would expect the pods that have only this code would be listed in the 'OK' state and thus the score would be higher, not lower.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: Ubuntu 20.04.3
  • Popeye latest master (f150b2a)
  • K8s microk8s v1.21.5-3

Additional context
I think this might be related or a repro of #111 but not entirely sure - more then happy to continue the discussion there if necessary.

@derailed derailed added the bug Something isn't working label Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants