Analyze execution risk by classifying inventory, scanning extra_vars for secrets, and assessing scope. Use when: - "Execute on production", "Deploy to production" (as first step before launch) - "Is this execution safe?" - "Check execution risk" - "Validate the execution target" NOT for: launching jobs (use governed-job-launcher) or troubleshooting failures (use job-failure-analyzer).
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Required MCP Servers:
aap-mcp-job-management - Job template lookup and launch parameter inspectionaap-mcp-inventory-management - Inventory and host dataVerification: Run the aap-mcp-validator skill with these 2 servers before proceeding.
Use this skill when:
Do NOT use when:
governed-job-launcher skill after this skill)job-failure-analyzer skill)governance-readiness-assessor skill)CRITICAL: Document consultation MUST happen BEFORE any MCP tool invocations.
Document Consultation (REQUIRED - Execute FIRST):
MCP Tool: job_templates_list (from aap-mcp-job-management)
Parameters:
search: "<template_name_from_user_request>"page_size: 10If the user provides a template ID directly:
MCP Tool: job_templates_retrieve (from aap-mcp-job-management)
Parameters:
id: "<template_id>"MCP Tool: job_templates_launch_retrieve (from aap-mcp-job-management)
Parameters:
id: "<template_id>"This returns the template's expected extra_vars, defaults, required fields, and inventory configuration.
MCP Tool: inventories_list (from aap-mcp-inventory-management)
Parameters:
page_size: 100Identify the target inventory from the job template configuration or user-provided override. Apply the risk classification from execution-governance.md:
| Inventory Name Pattern | Risk Level | Governance Required |
|---|---|---|
Contains prod, production, live | CRITICAL | Check mode + approval + phased rollout recommended |
Contains stage, staging, uat, preprod | HIGH | Check mode + approval |
Contains test, qa | MEDIUM | Confirmation only |
Contains dev, development, sandbox, lab | LOW | Direct execution permitted |
For unclassifiable inventories, check host count:
MCP Tool: hosts_list (from aap-mcp-inventory-management)
Parameters:
search: "<inventory_name>"page_size: 1Transparency note: Per execution-governance.md, inventory risk classification is this agent's implementation of Red Hat's recommendation to "use separate inventories for production and development environments" (Controller Best Practices).
Per the "Pre-Execution Context Analysis" section of execution-governance.md, examine the template's operational context. These queries adapt the risk assessment to the specific scenario.
5a. Job History (always check):
MCP Tool: jobs_list (from aap-mcp-job-management)
Parameters:
job_template: "<template_id>"order_by: "-finished"page_size: 5Examine the most recent 5 runs. Report:
5b. Launch Configuration (always check -- data available from Step 3):
From the job_templates_launch_retrieve response (Step 3), examine:
ask_job_type_on_launch: If false AND risk is CRITICAL/HIGH → Warn that check mode cannot be enforced at launch timeask_limit_on_launch: If false AND risk is CRITICAL → Warn that phased rollout is not possibleask_diff_mode_on_launch: If false → Note that diff mode cannot be enabled at launch5c. Notification Bindings (check for CRITICAL/HIGH risk):
MCP Tool: job_templates_retrieve (from aap-mcp-job-management)
Parameters:
id: "<template_id>"Check notification association fields. If no failure notifications are bound: Report: "Per Red Hat's Notifications documentation (Ch. 25), this template has no failure notification. If execution fails, no one will be automatically alerted."
5d. Workflow Coverage (check for CRITICAL/HIGH risk):
MCP Tool: workflow_job_templates_list (from aap-mcp-job-management)
Parameters:
page_size: 100If no workflows reference this template: Report: "Per Red Hat's Workflow documentation (Ch. 9), this template runs standalone -- not wrapped in a workflow with approval gates or failure paths."
5e. Module Analysis (check if job history exists):
If Step 5a found previous runs, examine events from the most recent job:
MCP Tool: jobs_job_events_list (from aap-mcp-job-management)
Parameters:
id: "<most_recent_job_id>"page_size: 50If events show ansible.builtin.shell or ansible.builtin.command usage:
Report specific warning: "This playbook uses shell/command modules ([X] tasks). Check mode will SKIP these tasks entirely."
5f. Adaptive Risk Adjustment:
Based on collected signals, adjust the base risk level per execution-governance.md's "Adaptive Risk Enhancement" table:
Inspect the extra_vars that would be passed to the job. Check both:
Secret detection (per execution-governance.md):
password, secret, token, api_key, apikey, private_key, ssh_key, access_key, authsk-, ghp_, BearerTransparency note: Per execution-governance.md, secret scanning implements Red Hat's recommendation to "Remove user access to credentials" (Ch. 15, Sec. 15.1.4) by detecting plain-text secrets in extra_vars that should be managed via AAP credentials.
Output format:
## Execution Risk Analysis
**Job Template**: [name] (ID: [id])
**Target Inventory**: [name]
**Base Risk Level**: [CRITICAL / HIGH / MEDIUM / LOW]
**Adjusted Risk Level**: [same or elevated, with rationale if different]
### Risk Classification
Per Red Hat's *Controller Best Practices*: "Use separate inventories for production and development environments."
**Inventory signal**: [name pattern match or host count]
**Risk level**: [CRITICAL/HIGH/MEDIUM/LOW]
**Governance required**: [check mode + approval / confirmation only / direct execution]
### Operational Context [section only appears when signals found]
| Signal | Finding | Impact |
|---|---|---|
| Job History | [clear / last run failed / N consecutive failures / first run] | [proceed / investigate / elevated caution] |
| Check Mode Override | [available / not overridable] | [governance enforceable / template modification needed] |
| Phased Rollout | [available / not overridable] | [limit parameter works / all-or-nothing execution] |
| Notifications | [failure notifications bound / none configured] | [team will be alerted / silent failures] |
| Workflow Coverage | [wrapped in workflow / standalone] | [approval gates available / no governance gates] |
| Playbook Modules | [standard modules / shell/command detected ([X] tasks)] | [check mode reliable / partial dry-run coverage] |
### Extra Vars Safety Scan
Per Red Hat's *Security Best Practices* (Ch. 15, Sec. 15.1.4): "Remove user access to credentials."
| Check | Status | Detail |
|---|---|---|
| Secret-like key names | [PASS/FAIL] | [findings] |
| Plain-text values | [PASS/FAIL] | [findings] |
### Recommendation
[Based on risk level AND operational context, what governance controls should be applied]
[If risk was elevated: explain why and cite the triggering signals]If secrets are found: BLOCK the execution and recommend using AAP credentials instead.
If CRITICAL/HIGH risk: Recommend check mode execution before full run.
If risk was elevated by operational signals: Explain the elevation clearly (e.g., "Risk elevated from HIGH to CRITICAL because this template has never been run and check mode cannot be overridden").
If LOW risk with no signals: Approve for direct execution with user confirmation.
aap-mcp-job-management - Job template dataaap-mcp-inventory-management - Inventory and host datajob_templates_list (from job-management) - Find template by namejob_templates_retrieve (from job-management) - Get template details and notification bindingsjob_templates_launch_retrieve (from job-management) - Get launch parameters and prompt-on-launch configjobs_list (from job-management) - Check recent job history for the templatejobs_job_events_list (from job-management) - Analyze previous run's module usageworkflow_job_templates_list (from job-management) - Check workflow coverageinventories_list (from inventory-management) - List inventorieshosts_list (from inventory-management) - Host count for unclassifiable inventoriesaap-mcp-validator - Prerequisite validationgoverned-job-launcher - Next step after risk analysis passesexecution-summary - Audit trailUser: "Execute the security patch on production"
Agent:
job_templates_listjob_templates_launch_retrieveask_job_type_on_launch: true → check mode enforceableRHEcosystemAppEng/agentic-plugins
53fa7d8
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.