feat(rh-developer): add debug-scc and debug-rbac skills#79
Conversation
|
/skill-security-scan |
|
/skill-code-review |
Gemini Code Review📝 Review details1. SummaryThis PR introduces two highly valuable debugging skills to the 2. Project Rules ComplianceWhile the content and diagnostic logic of these skills are excellent, there are several structural violations of
3. Code Quality Issues
4. Suggestions
5. VerdictREQUEST_CHANGES — The diagnostic logic is fantastic, but the skill files need to be updated to comply with the mandatory structural requirements (Section Ordering, Prerequisites format, Workflow step format, and Dependencies format) defined in |
❌ Skill Security Scan📋 rh-developerAgent Skills Security Scan ReportTimestamp: 2026-05-07T07:11:09.443498+00:00 Summary
Findings by Severity
Skill Results[OK] debug-rbac
[FAIL] recommend-image
[FAIL] debug-rhel
[OK] debug-build
[OK] debug-scc
[OK] detect-project
[OK] validate-environment
[OK] debug-container
[OK] debug-pipeline
[FAIL] rhel-deploy
[OK] helm-deploy
[OK] debug-pod
[OK] s2i-build
[OK] debug-network
[OK] deploy
[OK] containerize-deploy
Cross-Skill Findings
|
…RINCIPLES.md Address Gemini code review feedback on PR RHEcosystemAppEng#79: - Reorder sections: Human-in-the-Loop before Prerequisites - Flesh out Prerequisites with Required MCP Servers/Tools, Verification Steps, Human Notification Protocol, and Security warning - Add structured MCP Tool/Parameters/Expected Output/Error Handling blocks to all workflow steps - Add Required MCP Tools subsection under Dependencies - Add Example Usage section - Use placeholder syntax (<name>) instead of hardcoded values - Improve frontmatter description with Use when / NOT for patterns Co-authored-by: Cursor <cursoragent@cursor.com>
Preemptive fixes based on PR RHEcosystemAppEng#79 review feedback: - Add license: Apache-2.0 and allowed-tools to frontmatter - Reorder sections: Human-in-the-Loop before Prerequisites - Add full Prerequisites (MCP Servers/Tools, Verification Steps, Human Notification Protocol, Security warning) - Add required ## When to Use This Skill section (fixes compliance-check) - Add structured MCP Tool/Parameters/Expected Output/Error Handling blocks to all workflow steps - Add Required MCP Tools subsection under Dependencies - Add Example Usage section - Add input validation in Step 1 (RFC 1123) - Inline HITL requirements instead of external doc reference Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pls rebase |
…RINCIPLES.md Address Gemini code review feedback on PR RHEcosystemAppEng#79: - Reorder sections: Human-in-the-Loop before Prerequisites - Flesh out Prerequisites with Required MCP Servers/Tools, Verification Steps, Human Notification Protocol, and Security warning - Add structured MCP Tool/Parameters/Expected Output/Error Handling blocks to all workflow steps - Add Required MCP Tools subsection under Dependencies - Add Example Usage section - Use placeholder syntax (<name>) instead of hardcoded values - Improve frontmatter description with Use when / NOT for patterns Co-authored-by: Cursor <cursoragent@cursor.com>
Preemptive fixes based on PR RHEcosystemAppEng#79 review feedback: - Add license: Apache-2.0 and allowed-tools to frontmatter - Reorder sections: Human-in-the-Loop before Prerequisites - Add full Prerequisites (MCP Servers/Tools, Verification Steps, Human Notification Protocol, Security warning) - Add required ## When to Use This Skill section (fixes compliance-check) - Add structured MCP Tool/Parameters/Expected Output/Error Handling blocks to all workflow steps - Add Required MCP Tools subsection under Dependencies - Add Example Usage section - Add input validation in Step 1 (RFC 1123) - Inline HITL requirements instead of external doc reference Co-authored-by: Cursor <cursoragent@cursor.com>
9d2de19 to
a9076c2
Compare
done :) |
…RINCIPLES.md Address Gemini code review feedback on PR RHEcosystemAppEng#79: - Reorder sections: Human-in-the-Loop before Prerequisites - Flesh out Prerequisites with Required MCP Servers/Tools, Verification Steps, Human Notification Protocol, and Security warning - Add structured MCP Tool/Parameters/Expected Output/Error Handling blocks to all workflow steps - Add Required MCP Tools subsection under Dependencies - Add Example Usage section - Use placeholder syntax (<name>) instead of hardcoded values - Improve frontmatter description with Use when / NOT for patterns Co-authored-by: Cursor <cursoragent@cursor.com>
a9076c2 to
daa41af
Compare
|
Hi @jordigilh as we discussed, I created a PR updating the configuration of the MCP servers in the Please get this changes and test: Just validating it works normally after the MCP config changes. Thanks in advance |
|
@jordigilh the PR I sent you with the MCP config changes was merged. Now you can rebase and test. |
…RINCIPLES.md Address Gemini code review feedback on PR RHEcosystemAppEng#79: - Reorder sections: Human-in-the-Loop before Prerequisites - Flesh out Prerequisites with Required MCP Servers/Tools, Verification Steps, Human Notification Protocol, and Security warning - Add structured MCP Tool/Parameters/Expected Output/Error Handling blocks to all workflow steps - Add Required MCP Tools subsection under Dependencies - Add Example Usage section - Use placeholder syntax (<name>) instead of hardcoded values - Improve frontmatter description with Use when / NOT for patterns Co-authored-by: Cursor <cursoragent@cursor.com>
daa41af to
3473081
Compare
Add two new diagnostic skills backed by validated golden transcripts from Kubernaut demo scenarios: - debug-scc: Diagnoses SCC violations blocking pod creation — parses ReplicaSet FailedCreate events, identifies non-compliant securityContext fields (runAsUser, capabilities, allowPrivilegeEscalation), and checks ServiceAccount SCC bindings. - debug-rbac: Diagnoses RBAC permission failures causing 403 Forbidden errors — analyzes pod logs and readiness probes, identifies missing Role/RoleBinding for ServiceAccounts, and detects regression patterns where bindings are repeatedly removed. Both skills follow the existing debug-pod/debug-network pattern with human-in-the-loop checkpoints at each step. Update CLAUDE.md intent routing and skill chaining, and register both skills in .catalog/collection.yaml and collection.json. Co-authored-by: Cursor <cursoragent@cursor.com>
…RINCIPLES.md Address Gemini code review feedback on PR RHEcosystemAppEng#79: - Reorder sections: Human-in-the-Loop before Prerequisites - Flesh out Prerequisites with Required MCP Servers/Tools, Verification Steps, Human Notification Protocol, and Security warning - Add structured MCP Tool/Parameters/Expected Output/Error Handling blocks to all workflow steps - Add Required MCP Tools subsection under Dependencies - Add Example Usage section - Use placeholder syntax (<name>) instead of hardcoded values - Improve frontmatter description with Use when / NOT for patterns Co-authored-by: Cursor <cursoragent@cursor.com>
…c frontmatter Required by skill-linter CI check. Co-authored-by: Cursor <cursoragent@cursor.com>
…c and debug-rbac - Declare allowed-tools in frontmatter restricting each skill to its read-only MCP tools (resources_get, resources_list, events_list, pod_list, and pod_logs for debug-rbac) - Add input validation guidance in Step 1 requiring Kubernetes RFC 1123 name validation before passing user-supplied identifiers to MCP tools Co-authored-by: Cursor <cursoragent@cursor.com>
Linter requires space-delimited string, not YAML array. Co-authored-by: Cursor <cursoragent@cursor.com>
Tested against the pinned openshift-mcp-server image from PR RHEcosystemAppEng#93. Corrected tool names to match the actual MCP tool registry: - pod_list → pods_list / pods_list_in_namespace - pod_logs → pods_log Co-authored-by: Cursor <cursoragent@cursor.com>
bed4281 to
84ecc94
Compare
|
@r2dedios rebased and tested against the merged MCP config changes from PR #93. Results:
Tested locally using a Kind cluster + podman with the exact container args from |
Summary
rh-developer/skills/:debug-scc— Diagnoses OpenShift SCC violations blocking pod creation. Parses ReplicaSetFailedCreateevents, identifies non-compliantsecurityContextfields (runAsUser,capabilities.add,allowPrivilegeEscalation), checks ServiceAccount SCC bindings, and offers three fix paths (patch securityContext, grant SCC binding, or rollback).debug-rbac— Diagnoses RBAC permission failures causing 403 Forbidden errors. Analyzes pod logs and readiness probes forFORBIDDENerrors, identifies missing Role/RoleBinding for ServiceAccounts, detects regression patterns where bindings are repeatedly removed, and creates targeted RBAC resources.scc-violation-sccviolationpodblocked.json— 0.97 confidence RCA with full causal chain and due diligencerbac-failure-rbacpolicydenied.json— 0.90 confidence RCA with regression detection (3 prior remediation attempts)Motivation
The existing debug skill set covers pods, builds, networks, containers, pipelines, and RHEL hosts — but has no dedicated skills for two of the most common OpenShift-specific failure modes: SCC admission violations and RBAC permission denials. These are distinct from generic pod failures (
debug-pod) because they require parsing OpenShift-specific error messages (SCC rejection enumerations, API 403s) and checking OpenShift-specific resources (SecurityContextConstraints, RoleBindings). The golden transcripts from Kubernaut's automated investigation runs validate that the diagnostic patterns in these skills match real-world investigation workflows.Test plan
make validatepasses cleanly (structure + collection compliance)name,description,model,color,metadata.user_invocable)openshiftserver (resources_get,resources_list,pod_list,pod_logs,events_list)Made with Cursor