Skip to content

Understanding Rulesets

Rulesets are the building blocks of policy evaluation in AttackLens. Each ruleset defines one or more security checks that verify whether an asset meets a specific requirement.

What Is a Ruleset?

A ruleset is a reusable, self-contained set of checks that evaluates a specific security configuration on an asset. Rulesets are assigned to policies and produce findings when evaluated.

For example, a ruleset titled "Ensure password minimum length is configured" might check that the minLen property in the SecurityPolicy inventory dataset is greater than or equal to 14.

Ruleset Structure

A ruleset contains the following components:

ComponentDescription
TitleA descriptive name for the ruleset (e.g., "Ensure SSH root login is disabled")
DescriptionDetailed explanation of what this ruleset checks and why
ImpactDescription of the security impact if this check fails
SolutionRecommended remediation steps to resolve a failing check
Rule TypeThe evaluation mode: Automated, Hybrid, or Manual
Active / InactiveWhether the ruleset is currently evaluated
TagsLabels for categorization and filtering (e.g., "ssh", "access-control", "cis-benchmark")
ReferencesExternal URLs or document references (e.g., CIS Benchmark section numbers, NIST controls)
VariablesNamed parameters that can be used within check expressions
PrerequisitesConditions that must be true before the ruleset is evaluated
ChecksThe actual security checks that produce Pass/Fail/Error results

Rule Types

TypeDescription
AutomatedFully automated evaluation using inventory data collected by sensors or adapters. No manual intervention required.
HybridPartially automated. Some checks run automatically, but the final determination may require human review.
ManualRequires manual evaluation by a security analyst. AttackLens tracks the finding but does not automatically determine the result.

INFO

The rule type is shown in the ruleset list as a tag next to each entry. Most built-in rulesets are Automated.

Built-in vs Custom Rulesets

Built-in Rulesets

AttackLens delivers built-in rulesets through the feed system. These are maintained by AttackLens and automatically updated when new versions are available. Built-in rulesets cover common security benchmarks and compliance requirements.

Custom Rulesets

You can create custom rulesets to check organization-specific requirements. Custom rulesets have full flexibility: you define the checks, prerequisites, variables, and metadata.

Checks (The Evaluation Logic)

Checks are the core of a ruleset. Each check defines a specific condition to evaluate against an asset's inventory data.

Check Node Structure

A check node contains:

FieldDescription
TitleA description of what this individual check verifies
Dataset TypeThe inventory dataset to evaluate (e.g., SecurityPolicy, InstalledPackage, RunningService)
Resource TypeAlternatively, a cloud resource type for adapter-collected data
FilterOptional filter to narrow the dataset records (e.g., only records matching a specific key)
Property PathThe specific property within the dataset to evaluate (e.g., normalizedData.minLen)
OperatorThe comparison operator
Expected ValueThe value the property must match

Comparison Operators

OperatorDescriptionExample
equalsExact matchPassword length equals 14
notEqualsDoes not matchRoot login not equals "yes"
containsString containsCipher list contains "aes256"
notContainsString does not containConfig does not contain "disable"
greaterThanNumeric comparisonMin password length greater than 8
greaterThanOrEqualNumeric comparisonMax login attempts >= 5
lessThanNumeric comparisonSession timeout less than 900
lessThanOrEqualNumeric comparisonPassword age <= 90
existsProperty is presentMFA configuration exists
notExistsProperty is absentDefault password not exists
matchesRegular expression matchHostname matches pattern
inValue is in a setProtocol in ["TLS1.2", "TLS1.3"]
notInValue is not in a setCipher not in deprecated list

Condition Nodes (AND/OR Logic)

Checks can be combined using logical condition nodes:

  • AND: All child checks must pass for the condition to pass
  • OR: At least one child check must pass for the condition to pass

Condition nodes can be nested to create complex evaluation logic.

AND
  Check: SSH protocol version equals 2
  OR
    Check: SSH cipher contains "aes256-ctr"
    Check: SSH cipher contains "aes256-gcm"
  Check: SSH root login equals "no"

Prerequisites

Prerequisites are conditions evaluated before the ruleset's checks. If prerequisites are not met, the ruleset is skipped for that asset (no finding is generated).

Prerequisites use the same check node structure as checks. Common use cases:

  • OS family check: Only evaluate on Linux or Windows
  • Software presence check: Only evaluate if a specific service is installed
  • Resource type check: Only evaluate on specific cloud resource types

TIP

Use prerequisites to prevent false positives. A ruleset checking SSH configuration should have a prerequisite verifying that SSH is installed on the target asset.

Variables

Variables allow you to parameterize checks. Instead of hardcoding expected values, you can define named variables and reference them in check expressions.

FieldDescription
NameThe variable identifier (e.g., min_password_length)
TypeThe data type: string, bool, int, float, or entry
ValueThe default value for this variable

Variables make rulesets more reusable. You can clone a ruleset and adjust variable values without modifying the check logic.

Evaluation Engine Types

The ruleset list shows Rule Types tags indicating which evaluation engines the ruleset uses. These are determined automatically based on the dataset types and operators used in the checks.

AttackLens - Continuous Exposure Management