lynis icon indicating copy to clipboard operation
lynis copied to clipboard

[LOGG-2154 & CONT-8104] AddHP scoring mismatch in maximum points

Open pyllyukko opened this issue 1 year ago • 1 comments

Describe the bug The scoring is unequal:

        # Show result
        if [ ${REMOTE_LOGGING_ENABLED} -eq 0 ]; then
            Report "remote_syslog_configured=0"
            LogText "Result: no remote logging found"
            ReportSuggestion "${TEST_NO}" "Enable logging to an external logging host for archiving purposes and additional protection"
            AddHP 1 3
            Display --indent 2 --text "- Checking remote logging" --result "${STATUS_NOT_ENABLED}" --color YELLOW
        else
            Report "remote_syslog_configured=1"
            AddHP 5 5
            Display --indent 2 --text "- Checking remote logging" --result "${STATUS_ENABLED}" --color GREEN
        fi

If remote logging is not enabled, the maximum points is 3 and if it is enabled the max points is 5. It should probably be the same for both.

Would have submitted a PR, but I'm not sure which one would be the proper maximum score :)

Version

  • Lynis version 3.0.8

Expected behavior Maximum points should match.

pyllyukko avatar Jan 08 '23 20:01 pyllyukko

Same with CONT-8104:

            Display --indent 8 --text "- Docker info output (warnings)" --result "${COUNT}" --color YELLOW
            ReportSuggestion "${TEST_NO}" "Run 'docker info' to see warnings applicable to Docker daemon"
            AddHP 3 4
        else
            LogText "Result: no warnings found from 'docker info' output"
            Display --indent 8 --text "- Docker info output (warnings)" --result "${STATUS_NONE}" --color GREEN
            AddHP 1 1

pyllyukko avatar Jan 08 '23 20:01 pyllyukko