create-rule

Compose Cypher Facts with a Pydantic Finding model to define Cartography security rules.

4.0k|550|Updated Feb 27, 2019
One-click install
npx skills add https://github.com/cartography-cncf/cartography --skill create-rule-cartography-cncf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-rule
Source: https://github.com/cartography-cncf/cartography/tree/main/.agents/skills/create-rule
Command: npx skills add https://github.com/cartography-cncf/cartography --skill create-rule-cartography-cncf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables security teams to author Cartography rules by composing one or more Cypher Facts with a Pydantic Finding output model, stored under cartography/rules/data/rules, to detect attack surfaces, misconfigurations, and compliance issues within the graph.

Core Features & Use Cases

  • Create a Rule by combining one or more Facts with a Finding output model under cartography/rules/data/rules.
  • Support cross-provider detections and cross-cloud security checks.
  • Enable versioned, reusable security detections for ongoing governance.

Quick Start

Write a Rule by defining Facts, a Finding output model, and a Rule object, then register and run the rule in Cartography.

Frequently Asked Questions about create-rule

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Cartography security rule to detect misconfigurations?

You create a Cartography security rule by composing one or more Cypher Facts with a Pydantic Finding output model under cartography/rules/data/rules to detect graph misconfigurations and compliance issues.

What fields are required when defining a Cartography rule?

Defining a Cartography rule requires the Rule structure fields: id, name, description, output_model, tags, facts, and version, along with optional references and frameworks fields for ongoing governance.

Can I write cross-provider security checks using Cartography rules?

Yes, you can write cross-provider security rules in Cartography by composing Facts that span multiple cloud providers, enabling cross-cloud security checks and reusable detections across your infrastructure.

How do Cypher Facts and Pydantic models work together in a Cartography rule?

Cypher Facts query the graph for security data, while the Pydantic Finding output model structures the resulting attack surface or compliance issue data into a validated, versioned detection output.

Do I need prior dependencies installed to author Cartography rules?

You need a working Cartography environment to author and validate rules, as the skill focuses on composing Facts and Findings within the Cartography workflow to register and run security detections.