Skip to content

Failing checks with impact: 0 incorrectly show PASS in output #1713

@scottford-io

Description

@scottford-io

Describe the bug
When running cnspec, if a check has impact set to 0 and that check fails, the output incorrectly shows the result as PASSED. This is misleading. The check should display FAIL, but with a score of 0 to reflect its lack of impact on the overall score.

          - uid: sshd-02                                                                   
            title: Prevent weaker CBC ciphers from being used                              
            mql: sshd.config.ciphers.all( /cbc/ )                                          
            impact: 0
Checks:
✕ Fail:    0  Ensure the port is set to 22
✓ Pass:  100  Prevent weaker CBC ciphers from being used

Expected Behavior:

  • If a check fails and impact = 0:
  • The result should show FAIL
  • The score contribution should be 0
  • The output remains clear that the check failed, even though it does not affect the score

Actual Behavior:

  • Failing checks with impact = 0 currently display as PASSED, which can cause confusion for users interpreting the results.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions