Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.13 KB

v2.md

File metadata and controls

41 lines (31 loc) · 1.13 KB

Breaking Changes

  • Checks now use semantic field names in scoring.conf. For example, the following FileContains 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 and DirContains use regex by default. FileContainsRegex and DirContainsRegex call these functions for backwards compatibility reasons as of v2.0.0, but these aliases may be phased out in the future

Changes for Developers

  • 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 under cmd/ using the cmd. prefix when referring to them in aeacus.go and phocus.go