Skip to content

Customize Rules

Customizing lets you modify rule content (check commands, fixes, references) or add entirely new rules. This is different from tailoring, which selects which rules to include and sets ODV values.


When you create a custom rule file, the project:

  1. Loads your custom version from custom/rules/
  2. Loads the original rule from rules/
  3. Uses your custom values where they differ
  4. Keeps original values for fields you didn’t customize
  5. Merges tags and references (concatenates rather than replaces)

  1. Create your custom rule file

    Create a YAML file in custom/rules/ with the same filename as the original rule.

  2. Include only fields to customize

    Add only the fields you want to change:

    references:
    custom:
    MSCP:
    - MSCP-OS-001
    URL:
    - https://example.com/policy
  3. Generate your outputs

    Terminal window
    ./scripts/generate_guidance.py baselines/YOUR_BASELINE.yaml

    The custom values merge with the original rule automatically.


  1. Create your rule file

    Create a new YAML file in custom/rules/ with your rule ID as the filename (e.g., my_org_custom_rule.yaml).

  2. Define the required fields

    FieldDescription
    idUnique rule identifier
    titleHuman-readable name
    discussionWhy this rule matters
    checkCommand to verify compliance
    resultExpected output format
    fixRemediation instructions
    tagsInclude your baseline tag
  3. Add payload support (if needed)

    If your rule uses a configuration profile payload not in the project, add it to includes/supported_payloads.yaml.

  4. Generate your baseline

    Terminal window
    ./scripts/generate_baseline.py -k YOUR_TAG
  5. Generate your outputs

    Terminal window
    ./scripts/generate_guidance.py baselines/YOUR_BASELINE.yaml

For rules that explain a control but don’t require compliance checking, use the manual tag. These rules appear in guidance documents but not in compliance scripts.

id: my_org_policy_statement
title: Organization Security Policy
discussion: |
This control documents the organization's security policy requirements.
check: |
result: |
fix: |
tags:
- manual
- my_org_baseline

  • Directorycustom/
    • Directoryrules/
      • os_authenticated_root_enable.yaml - Override existing rule
      • my_org_custom_rule.yaml - New custom rule