Skip to content

Creating Rules with Aegis

Aegis simplifies rule creation by allowing you to define rules using natural language instructions within a "Ruleset." Instead of writing complex rule logic, you describe what you want to enforce, and Aegis generates the underlying rules for you. This guide walks you through creating a new ruleset and its associated rules from the Aegis UI.

For creating rulesets via the API, see the Rulesets API documentation.

Step-by-Step Guide

Follow these steps to create a ruleset and define its rules:

1. Navigate to Manage Ruleset

From the main navigation menu on the left, click on Rulesets and then select Manage Ruleset. This will open the "Manage Ruleset" page where you can create or update rulesets.

2. Enter a Ruleset Name

In the Ruleset Name field, provide a unique and descriptive name. This name will be used to identify the ruleset when you attach it to policies.

Example: kubernetes-security-baseline

3. Write Instructions

This is the core of the rule creation process. In the Instructions text box, describe the rules you want to include in this ruleset using plain English.

Be as specific as possible. For example, instead of "secure deployment," write "Create ruleset for kubernetes deployment that ensures all deployments have resource limits and requests specified."

💡 For detailed guidance on crafting effective prompts, including input-type-specific keywords and resource-specific examples, see our comprehensive Ruleset Prompting Guide.

4. Add Labels (Optional)

Labels are key-value pairs that help you organize and filter your rulesets. You can add labels to categorize your ruleset by platform, resource type, or any other criteria.

  • Click Add Label.
  • Enter a Key and a Value.

Example: platform: kubernetes

5. Provide Sample Data (Optional)

If you have a sample of the data you want to evaluate (e.g., a JSON or YAML file), you can provide it to help Aegis generate more accurate rules. This is particularly useful for complex or custom data structures.

  • Click Add Sample Data and paste your sample configuration.

6. Create the Ruleset

Once you have filled in the details, click the Manage Ruleset button. Aegis will process your instructions and create a new ruleset containing the rules you described. The details of the generated ruleset will appear on the right side of the screen.

Next Steps

  • Apply to a Policy: Once your ruleset is created, you can apply it to a policy to start enforcing your rules. See Managing Policies.
  • Evaluate: You can test your new ruleset against sample data using the Evaluate Ruleset functionality.