Skip to content

Update find-rule skill to look for sibling rules#14530

Open
rhmdnd wants to merge 1 commit intoComplianceAsCode:masterfrom
rhmdnd:update-find-rule-skill
Open

Update find-rule skill to look for sibling rules#14530
rhmdnd wants to merge 1 commit intoComplianceAsCode:masterfrom
rhmdnd:update-find-rule-skill

Conversation

@rhmdnd
Copy link
Collaborator

@rhmdnd rhmdnd commented Mar 4, 2026

This commit adds another step to the find-rule workflow that tells
coding agents to look for sibling rules that are relevant to a given
control text. This can be helpful in discovering additional related
rules, giving contributors the ability to put those into profiles, too.

This commit adds another step to the find-rule workflow that tells
coding agents to look for sibling rules that are relevant to a given
control text. This can be helpful in discovering additional related
rules, giving contributors the ability to put those into profiles, too.
@rhmdnd rhmdnd requested a review from Vincent056 March 4, 2026 14:15
@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Mar 4, 2026

@Vincent056 here is the PR from our pairing session yesterday.

Copy link
Contributor

@Vincent056 Vincent056 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@jan-cerny jan-cerny self-assigned this Mar 18, 2026
@jan-cerny jan-cerny added this to the 0.1.81 milestone Mar 18, 2026
5. **Check control files** in `controls/` and `products/*/controls/` for matching control IDs or titles that already map to this requirement.

6. **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*.
6. **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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CCEs are used only for some products (RHEL, SLES). Many other products don't use CCEs (Ubuntu, Fedora, ...). Checking CCEs can be good enough if we work on RHEL or SLES. The product applicability check could be extended to check product/*/controls and product/*/profiles/ directories for presence of the rule ID. However, the only 100 % reliable way is currently to build all products and check the built data streams, which is something we probably don't want Claude to do as a part of this skill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants