一键导入
find-rule
Search for existing rules that match a given requirement text. Identify rules that implement a specific control.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Search for existing rules that match a given requirement text. Identify rules that implement a specific control.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Assess a pending NIST 800-53 control with OSCAL enrichment, CIS reverse lookup, and Linux hardening prioritization. Guides authors through understanding, automatability analysis, rule mapping, and validation.
Resolve XCCDF variable selections for a set of rules. Looks up which variables each rule depends on, reads their .var files, and guides the author to select a value key for each variable. Returns a list of var_name=key selections ready to add to a control file's rules list.
Open a pull request in the browser with prefilled title, description, and labels
Create a new product in ComplianceAsCode project
Create a template for checks and remediations
Create Automatus test scenarios to test the given rule.
| name | find-rule |
| description | Search for existing rules that match a given requirement text. Identify rules that implement a specific control. |
Search for existing rules that match the following requirement:
$ARGUMENTS
Follow these steps:
Extract key concepts from the requirement text. Identify:
Respect scope constraints. If the user specifies a scope (e.g., "only OpenShift control plane", "only node-level"), restrict results to that scope. Do not return rules outside the requested scope. OCP4/Kubernetes rules live under applications/openshift/ and Linux rules live under linux_os/guide/. If no scope is specified, search both.
Search broadly across rule titles, descriptions, and template configurations:
applications/openshift/ and linux_os/guide/ for rule.yml filesCheck control files in controls/ and products/*/controls/ for matching control IDs or titles that already map to this requirement.
Note product applicability for each matched rule. Check the identifiers section of each rule.yml for cce@<product> entries (e.g., cce@ocp4, cce@rhel9). The product IDs after @ correspond to subdirectory names under products/. This tells the user which products the rule applies to.
Present results organized by match strength. For every rule, include a Rationale — a concise (1-2 sentence) explanation of why this rule satisfies or partially satisfies the requirement. Write the rationale so that a maintainer unfamiliar with the rule can understand the connection without reading the full rule.yml. Focus on what the rule checks and how that maps to the requirement.
Strong matches (title or template directly addresses the requirement):
Partial matches (related but not exact):
Weak matches (tangentially related):
Include a summary table at the end mapping requirement aspects to rule IDs, so the user can quickly see coverage.
Always suggest a control structure with a notes field that includes a concise rationale for each rule, explaining why it was included for this control. This helps maintainers understand the reasoning without needing to read every rule.yml. When no strong automated matches exist, say so clearly and use status: partial or status: manual as appropriate. Example:
- id: X.Y.Z
title: Control Title
status: automated
notes: |-
automated_rule_1 - Rationale for why this rule satisfies the control.
automated_rule_2 - Rationale for why this rule satisfies the control.
rules:
- automated_rule_1
- automated_rule_2
For partial or manual controls, also include guidance for assessors:
- id: X.Y.Z
title: Control Title
status: partial
notes: |-
automated_rule_1 - Rationale for why this rule partially covers the control.
The remaining aspects of this control require manual verification: [manual steps].
rules:
- automated_rule_1
When suggesting rules for partial/manual controls, only include rules that provide automated value. Omit rules that are themselves manual-only (no template, no automated check) unless they are the only matches available.
Rules can appear in multiple controls. The build system handles this correctly. Each control should list the complete set of rules needed to satisfy it, even if some rules also appear in other controls. This ensures each control is self-contained and readers don't need to cross-reference other controls to understand coverage.