Skip to content

feat: add pf-security-scan skill to code-review plugin#139

Open
dlabaj wants to merge 1 commit into
patternfly:mainfrom
dlabaj:security-patterns
Open

feat: add pf-security-scan skill to code-review plugin#139
dlabaj wants to merge 1 commit into
patternfly:mainfrom
dlabaj:security-patterns

Conversation

@dlabaj

@dlabaj dlabaj commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Introduces a PatternFly security audit skill covering XSS, unsanitized user input, and insecure href patterns.

Summary by CodeRabbit

  • New Features

    • Added the PF Security Scan skill to the Code Review plugin.
    • Scans PatternFly React code for XSS risks, unsanitized user input, and insecure links.
    • Provides guidance for identifying, prioritizing, and reporting security issues.
  • Documentation

    • Updated plugin documentation, routing guidance, and skill listings.
    • Updated the README skills count badge.

Introduces a PatternFly security audit skill covering XSS, unsanitized user input, and insecure href patterns.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dlabaj
dlabaj requested a review from jpuzz0 July 14, 2026 15:17
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds the PF Security Scan skill, documenting PatternFly XSS and insecure URL checks, remediation guidance, reference patterns, assistant routing, plugin listings, contribution guidance, and the README skills badge update.

Changes

PF Security Scan

Layer / File(s) Summary
Security scan workflow and detection rules
plugins/code-review/skills/pf-security-scan/SKILL.md
Defines the scan procedure, PatternFly security anti-patterns, report format, remediation rules, and reference link.
Security pattern reference
plugins/code-review/skills/pf-security-scan/references/anti-patterns.md
Adds grep commands, component checklists, sanitizer recognition, URL validation guidance, and severity criteria.
Plugin routing and documentation
plugins/code-review/agents/pf-assist.md, plugins/code-review/README.md, PLUGINS.md, CONTRIBUTING-SKILLS.md, README.md
Routes /pf-security-scan, documents the skill in plugin listings, and updates the skills badge count.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: jpuzz0

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding the pf-security-scan skill to the code-review plugin.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped anthropics/claude-plugins-official.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
plugins/code-review/skills/pf-security-scan/SKILL.md (3)

10-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Nitpick: Keep the skill tool-agnostic.

Naming @patternfly/patternfly-mcp makes the instructions specific to one integration. Describe the outcome—consult available PatternFly API documentation—while retaining a fallback that works without a particular tool.

As per path instructions, skills must be tool-agnostic and work in both Claude Code and Cursor without tool-specific references.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/code-review/skills/pf-security-scan/SKILL.md` around lines 10 - 12,
Update the “PatternFly MCP” section in SKILL.md to use tool-agnostic wording
that instructs agents to consult available PatternFly API documentation for
unfamiliar component props and link-rendering behavior. Retain a fallback for
environments without documentation tools, and remove the specific
`@patternfly/patternfly-mcp` integration reference.

Source: Path instructions


119-128: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Nitpick: Add language tags to the report examples.

Use text for both output-only fenced blocks to satisfy markdownlint and make rendering explicit.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/code-review/skills/pf-security-scan/SKILL.md` around lines 119 - 128,
Update both output-only fenced code blocks in the report examples within
SKILL.md to specify the text language tag, preserving their contents and
formatting otherwise.

Source: Linters/SAST tools


1-4: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Nitpick: Add an eval for this consumer-facing skill.

The provided changes add pf-security-scan/SKILL.md but no corresponding eval/pf-security-scan/ coverage. Add focused cases proving detection of PF XSS and unsafe URL patterns.

As per path instructions, consumer-facing skills are expected to have an eval — see CONTRIBUTING-SKILLS.md for details.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/code-review/skills/pf-security-scan/SKILL.md` around lines 1 - 4, Add
consumer-facing evaluation coverage for the pf-security-scan skill under
eval/pf-security-scan/. Include focused cases that verify detection of
PatternFly XSS risks, including dangerouslySetInnerHTML and unsanitized
user-controlled content, plus unsafe href or URL patterns, following the
structure and requirements in CONTRIBUTING-SKILLS.md.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/code-review/skills/pf-security-scan/references/anti-patterns.md`:
- Around line 7-9: Update the PatternFly import search command in the
anti-pattern scan instructions to match both single- and double-quoted imports,
and include supported require-style imports. Preserve the existing recursive
file extensions and ensure SKILL.md uses the broadened search so valid
PatternFly dependencies are not omitted.

---

Nitpick comments:
In `@plugins/code-review/skills/pf-security-scan/SKILL.md`:
- Around line 10-12: Update the “PatternFly MCP” section in SKILL.md to use
tool-agnostic wording that instructs agents to consult available PatternFly API
documentation for unfamiliar component props and link-rendering behavior. Retain
a fallback for environments without documentation tools, and remove the specific
`@patternfly/patternfly-mcp` integration reference.
- Around line 119-128: Update both output-only fenced code blocks in the report
examples within SKILL.md to specify the text language tag, preserving their
contents and formatting otherwise.
- Around line 1-4: Add consumer-facing evaluation coverage for the
pf-security-scan skill under eval/pf-security-scan/. Include focused cases that
verify detection of PatternFly XSS risks, including dangerouslySetInnerHTML and
unsanitized user-controlled content, plus unsafe href or URL patterns, following
the structure and requirements in CONTRIBUTING-SKILLS.md.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4a4815f7-b101-4676-9c88-79f0462ade43

📥 Commits

Reviewing files that changed from the base of the PR and between 9105920 and 2b50121.

📒 Files selected for processing (7)
  • CONTRIBUTING-SKILLS.md
  • PLUGINS.md
  • README.md
  • plugins/code-review/README.md
  • plugins/code-review/agents/pf-assist.md
  • plugins/code-review/skills/pf-security-scan/SKILL.md
  • plugins/code-review/skills/pf-security-scan/references/anti-patterns.md

Comment on lines +7 to +9
```bash
# Files using PatternFly React
rg "from '@patternfly/react" --glob '*.{tsx,ts,jsx,js}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Include double-quoted imports in the scan scope.

This command only matches from '@patternfly/react…'. Because SKILL.md uses this step to identify files for scanning, valid imports such as from "@patternfly/react-core" can be excluded entirely, producing a false “clean” result. Match both quote styles (and any supported require form).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/code-review/skills/pf-security-scan/references/anti-patterns.md`
around lines 7 - 9, Update the PatternFly import search command in the
anti-pattern scan instructions to match both single- and double-quoted imports,
and include supported require-style imports. Preserve the existing recursive
file extensions and ensure SKILL.md uses the broadened search so valid
PatternFly dependencies are not omitted.

dlabaj added a commit to dlabaj/uxd-ai-helpers that referenced this pull request Jul 22, 2026
Migrate the security audit skill from patternfly/ai-helpers#139, re-listing
pf-code-review in the marketplace now that it has a consumer-facing skill.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant