- Checks now use semantic field names in
scoring.conf
. For example, the followingFileContains
check:
[[check]]
message = "Removed insecure sudoers rule"
points = 10
[[check.pass]]
type="FileContainsNot"
arg1="/etc/sudoers"
arg2="NOPASSWD"
Can now be written as:
[[check]]
message = "Removed insecure sudoers rule"
points = 10
[[check.pass]]
type = "FileContainsNot"
path = "/etc/sudoers"
value = "NOPASSWD"
Please see checks.md for a detailed list of all parameters.
FileContains
andDirContains
use regex by default.FileContainsRegex
andDirContainsRegex
call these functions for backwards compatibility reasons as of v2.0.0, but these aliases may be phased out in the future
- In order to call scoring functions, you must construct or use an existing
check
and call the appropriate method like so:
result, err := cond{
SomeKey: "value"
}.Method()
- The
cmd
structure no longer exists, so you don't need to call functions that resided undercmd/
using thecmd.
prefix when referring to them inaeacus.go
andphocus.go