- Checks now use semantic field names in
scoring.conf. For example, the followingFileContainscheck:
[[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.
FileContainsandDirContainsuse regex by default.FileContainsRegexandDirContainsRegexcall 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
checkand call the appropriate method like so:
result, err := cond{
SomeKey: "value"
}.Method()
- The
cmdstructure no longer exists, so you don't need to call functions that resided undercmd/using thecmd.prefix when referring to them inaeacus.goandphocus.go