Install opa for testing & building the bundles.
make testPolicies are built into bundle to make distribution easier.
You can easily build the policies by running
make buildopa eval -I -b policies -f pretty data.compliance_framework <<EOF
{
"passwordauthentication": [
"yes"
],
"permitrootlogin": [
"with-password"
],
"pubkeyauthentication": [
"no"
]
}
EOFPolicies are written in the Rego language.
package compliance_framework.deny_password_auth
import future.keywords.in
violation[{}] {
"yes" in input.passwordauthentication
}
title := "SSH should disable password based authentication"
description := "Password based SSH authentication is considered insecure. Key-based authentication should be used to secure remote access to sensitive hosts"
labels := {
"severity": "high"
}