Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Automation orchestrator is the workflow engine in AAP for visual, multi-step aut
|---|---|---|
| [RHEL CVE Remediation](cve-remediation/) | **Active** | AI triage via Lightspeed MCP → auto-patch dev, approve prod, or investigate with Mattermost report |
| [Multi-OS Cloud Patching](multi-os-cloud-patching/) | **Active** | Playbook orchestration — RHEL and Windows on AWS with snapshot rollback (playbooks from product-demos) |
| [Zero-Day Response: PHP2Shell](zero-day-response/) | **Active** | Zero-day before the fix — evidence and look-back, AI reads the advisory, policy gate and test host, owners approve, patch only where a fix exists |
| [Disk Utilization & Remediation](disk-utilization/) | **Active** | Check disk usage → switch on % → continue, cleanup, EBS expand, or fallback → Mattermost notify |
| [Intelligent Cert Lifecycle](cert-lifecycle/) | **Active** | AI agent picks PEM vs keystore renewal; operator approves; AAP renews and validates |
| [Service State Routing](service-health/) | **Active** | Check service → switch on state → log OK, start, restart, or install |
Expand Down Expand Up @@ -50,6 +51,7 @@ See the [demo marketplace](https://ansible-tmm.github.io/aap-orchestrator-demos/
| [proactive-assessment/](proactive-assessment/) | Scheduled scan-before-expiry |
| [cve-remediation/](cve-remediation/) | Intelligent CVE patching with Lightspeed MCP |
| [multi-os-cloud-patching/](multi-os-cloud-patching/) | Multi-OS cloud patching with snapshot rollback (product-demos playbooks) |
| [zero-day-response/](zero-day-response/) | Zero-day response — contain before the fix, patch where it exists, prove it |
| [disk-utilization/](disk-utilization/) | Proportional disk remediation with switch routing |
| [event-driven-xsos-rca/](event-driven-xsos-rca/) | SQS → EDA → xSOS RCA for unknown issues |
| [ai-incident-triage/](ai-incident-triage/) | AI-assisted incident response |
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ exclude:
- kernel-compliance/
- novel-incident-remediation/
- cicd-pipeline/
- zero-day-response/
- collections/
- shared/
- README.md
Expand Down
28 changes: 28 additions & 0 deletions _data/demo_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,31 @@ novel-incident-remediation:
- Fire a service_down incident to walk the impact report and service recovery path
- Fire an unknown incident to show the AI agent activating, enriching the SNOW ticket, and generating the remediation plan
- Compare the unknown path approval step — show the AI reasoning in the SNOW ticket before approving

zero-day-response:
description: A zero-day is being exploited before a fix exists. Two automation orchestrator workflows run the response a board asks for — KNOW (evidence, classification, log look-back), CONTAIN (AI-extracted interim controls, policy gate, test, two named owner approvals, production verify, board update), then FIX and PROVE (per-stream fix availability from the Red Hat Security Data API, test and rolling patch, controls removed only where the fix is verified, re-scan, case kept open while lanes remain).
ao_building_blocks:
- manual_trigger
- agentic
- http_request
- conditional
- converge
- approval
- aap_job_template
one_liner: AI reads. Owners decide. AAP acts. Automation orchestrator holds every lane.
why_it_matters:
- The gap between first exploitation and the fix is where the risk is; the demo shows a governed way to act inside it instead of waiting for a patch.
- Classification, fix status and verification are reviewed, deterministic automation. AI reads advisories and explains — it cannot change a priority or skip a gate.
- Every AI answer is validated by a deterministic check step, every AI-proposed control by a policy gate and a test host, and every production change by an owner approval.
- Interim controls come off only where the fix is verified running, so there is no forgotten workaround — and the case stays open, with owners, for the lanes that are not fixed.
related_table:
heading: Vulnerability demos in this catalog
headers: [Demo, Type, Focus]
rows:
- ["Zero-Day Response", "AI-assisted", "Exploited before the fix → contain with owner approvals → patch where a fix exists → prove"]
- ["RHEL CVE Remediation", "AI-assisted", "CVE alert → AI triage → auto-patch, approve, or investigate"]
- ["Patch Severity Routing", "Rule-based", "Switch on scan severity → patch now, schedule, batch, or compliant"]
demo_ideas:
- Run KNOW + CONTAIN end to end and stop on the security approval panel — the AI summary, the tested change and Red Hat's residual-risk sentence on one screen
- Show the board update's "not claimed" list — control verified is not safe
- Run FIX + PROVE to show the fix arriving unevenly — patched lanes, a vendor appliance still contained, an unknown asset still escalated
52 changes: 52 additions & 0 deletions _data/demo_playbooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -482,3 +482,55 @@ novel-incident-remediation:
path: novel-incident-remediation/aap/playbooks/incident_log_and_report.yml
description: Logs the unrecognized incident details and posts a work note to the ServiceNow ticket flagging it for manual triage.
runs_on: localhost (ServiceNow API)

zero-day-response:
status: active
items:
- name: infra_provision_aws.yml
path: zero-day-response/playbooks/infra_provision_aws.yml
description: Creates (or, with role_action deprovision, removes) the dedicated VPC and six tagged RHEL instances.
runs_on: AWS (localhost)
- name: estate_configure.yml
path: zero-day-response/playbooks/estate_configure.yml
description: Builds or resets the estate to its vulnerable baseline.
runs_on: RHEL hosts
- name: p2s_scan.yml
path: zero-day-response/playbooks/p2s_scan.yml
description: KNOW — evidence from every PHP asset, then the deterministic classification.
runs_on: RHEL hosts
- name: p2s_lookback.yml
path: zero-day-response/playbooks/p2s_lookback.yml
description: KNOW — log look-back, were we already hit?
runs_on: RHEL hosts
- name: p2s_ai_check.yml
path: zero-day-response/playbooks/p2s_ai_check.yml
description: Parses and validates every AI answer against its schema.
runs_on: localhost
- name: p2s_spec_check.yml
path: zero-day-response/playbooks/p2s_spec_check.yml
description: Policy gate — is the AI-extracted control spec inside the reviewed envelope?
runs_on: localhost
- name: p2s_controls.yml
path: zero-day-response/playbooks/p2s_controls.yml
description: CONTAIN — applies and verifies the interim controls, test then production.
runs_on: RHEL hosts
- name: p2s_fix_availability.yml
path: zero-day-response/playbooks/p2s_fix_availability.yml
description: FIX — decides per stream on the Red Hat API answers the workflow recorded.
runs_on: localhost
- name: p2s_patch.yml
path: zero-day-response/playbooks/p2s_patch.yml
description: FIX — patch and verify, test then rolling production with rollback.
runs_on: RHEL hosts
- name: p2s_standdown.yml
path: zero-day-response/playbooks/p2s_standdown.yml
description: Removes interim controls only where the fix is verified.
runs_on: RHEL hosts
- name: p2s_case_record.yml
path: zero-day-response/playbooks/p2s_case_record.yml
description: PROVE — records the AI-drafted update on the case; refuses an empty draft.
runs_on: localhost
- name: p2s_independent_check.yml
path: zero-day-response/playbooks/p2s_independent_check.yml
description: Independent read of live estate state and business transactions, outside the response roles.
runs_on: RHEL hosts
37 changes: 37 additions & 0 deletions _data/demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -755,3 +755,40 @@
F --> G@{ img: "__ASSET__/assets/icons/launch-aap-job-template.png", label: "Notify Operators", pos: "b", h: 96, constraint: "on" }
classDef noBorder fill:transparent,stroke:transparent
class A,B,C,D,E,F,G noBorder

- slug: zero-day-response
title: Zero-Day Response
subtitle: KNOW, CONTAIN, FIX, PROVE — PHP2Shell on RHEL and AWS
category: patching
status: active
featured: false
uses_ai: true
tmm_created: true
tags:
- Task agent
- Approval
- Conditional
- AWS
thumbnail:
gradient: "linear-gradient(135deg, #4a1a1a 0%, #1a0d0d 50%, #2a1a3a 100%)"
icon: "🚨"
blurb: A zero-day lands before the fix. Evidence and look-back in parallel, AI reads the vendor advisory, a policy gate and test host prove the interim controls, owners approve, and the fix is applied only where it exists. Two workflows, 12 playbooks and a six-instance AWS estate.
stats:
workflows: 2
playbooks: 12
setup_minutes: 25
url: /demos/zero-day-response/
github_path: zero-day-response/
github_doc: zero-day-response/README.md
workflow_json: zero-day-response/ao/flow-a-know-contain.json
workflow_mermaid: |
flowchart LR
A@{ img: "__ASSET__/assets/icons/manual-trigger.png", label: "Advisory received", pos: "b", h: 96, constraint: "on" } --> B@{ img: "__ASSET__/assets/icons/launch-aap-job-template.png", label: "KNOW: Evidence + look-back", pos: "b", h: 96, constraint: "on" }
B --> C@{ img: "__ASSET__/assets/icons/task-agent.png", label: "AI: Explain for humans", pos: "b", h: 96, constraint: "on" }
C --> D@{ img: "__ASSET__/assets/icons/task-agent.png", label: "AI: Read the advisory", pos: "b", h: 96, constraint: "on" }
D --> E@{ img: "__ASSET__/assets/icons/launch-aap-job-template.png", label: "Policy gate + test", pos: "b", h: 96, constraint: "on" }
E --> F@{ img: "__ASSET__/assets/icons/approval-node.png", label: "Security + service owner", pos: "b", h: 96, constraint: "on" }
F -->|Approved| G@{ img: "__ASSET__/assets/icons/launch-aap-job-template.png", label: "PROD: Contain + verify", pos: "b", h: 96, constraint: "on" }
G --> H@{ img: "__ASSET__/assets/icons/task-agent.png", label: "AI: Board update", pos: "b", h: 96, constraint: "on" }
classDef noBorder fill:transparent,stroke:transparent
class A,B,C,D,E,F,G,H noBorder
4 changes: 4 additions & 0 deletions demos/zero-day-response/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: demo-detail
demo_slug: zero-day-response
---
115 changes: 115 additions & 0 deletions zero-day-response/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Zero-Day Response: PHP2Shell

What do you do in the gap between the first exploitation attempt and the fix? This demo replays the PHP2Shell
zero-day (CVE-2026-109618, CVE-2026-109619) against a small RHEL estate on AWS and answers the four questions a board
asks, in order: **are we affected and were we already hit (KNOW), what have we done about it (CONTAIN), when is it
actually fixed (FIX), and can we prove it (PROVE)?**

AI reads. Owners decide. AAP acts. Automation orchestrator holds every lane until it is closed or explicitly owned.

- **KNOW:** evidence from every PHP asset and a log look-back run in parallel. A reviewed, deterministic
classification ranks the assets (P1 to clear, plus "unknown" for an asset nobody can reach). AI explains the
result for people; it cannot change it.
- **CONTAIN:** AI reads the recorded vendor advisories and extracts the interim controls, each cited to its
document and section. A policy gate checks them against what the reviewed automation may do, a test host proves them, and two owners approve: security, and the payments service owner, who accepts an upload outage on the payments
portal for a 72-hour exception window. Production is
contained and verified, and AI drafts a board update that says what is verified and what is *not* claimed.
- **FIX:** the fix arrives unevenly. Automation orchestrator asks the Red Hat Security Data API per CVE, patches only
where a fix exists (test, change approval, rolling patch with rollback), and removes the interim controls only
where the fix is verified running.
- **PROVE:** a re-scan and an AI status draft that keeps the case open while one lane waits for a vendor (an appliance
on end-of-life PHP 8.1) and one asset is still unknown.

This is a historical replay: the advisories are recorded snapshots (`advisories/`, checksums in `advisories/SHA256SUMS`), the vendor
timelines are real, the estate is a lab, and "AcmeCMS" is a simulated vendor. There is no exploit code: verification
uses benign requests and real business transactions.

## Workflows

| Workflow | File | Trigger | Approvals |
|---|---|---|---|
| Zero-Day Response - PHP2Shell: KNOW + CONTAIN | [`ao/flow-a-know-contain.json`](ao/flow-a-know-contain.json) | Manual, pre-filled (`SIR-PHP2SHELL-001`, `RHSB-2026-013`, both CVEs) | Incident commander (unknown asset), Security, Payments service; Engineer review only if the policy gate rejects the AI's spec |
| Zero-Day Response - PHP2Shell: FIX + PROVE | [`ao/flow-b-fix-prove.json`](ao/flow-b-fix-prove.json) | Manual, pre-filled (`SIR-PHP2SHELL-001`); schedule it for a real fix watch | Change |

Every AI step is followed by a `CHECK` step: the AI returns its answer as JSON text, and the `p2s-ai-output-check`
job template parses it and validates it against the schema in
[`playbooks/roles/p2s_response/files/ai_schemas.json`](playbooks/roles/p2s_response/files/ai_schemas.json) before
anything uses it. An empty or malformed answer fails visibly; it never flows on as empty data.

## Requirements

- A Red Hat Demo Platform **Ansible Product Demos** environment on AWS (AAP 2.7 with the LiteMaaS, AWS and APD
Machine credentials preloaded), or an equivalent AAP 2.7 with those credentials.
- Automation orchestrator, installed by APD (below). Tested with automation orchestrator 1.3.1 and LiteMaaS
`qwen3-235b`.
- AWS: six RHEL instances (three `t3.medium`, three `t3.small`; see `playbooks/node-config/nodes-aws.yml`) in
`us-east-1`, about 10 minutes to build. Tear the estate down when you are done.

## Set up

1. In AAP, launch **APD | Single demo setup** and choose `infrastructure`.
2. Launch **Infrastructure | Automation Orchestrator | Install**. It installs automation orchestrator, wires the AAP
and LiteMaaS integrations, and seeds both workflows and the demo's job templates (`p2s-*`). Its output ends
with the automation orchestrator URL and the `admin` password.
3. Launch **p2s-estate-provision**. It creates a dedicated VPC (web ports reachable only inside it, SSH open) and the six tagged RHEL instances in `us-east-1`.
4. Update the **AWS Inventory** inventory source so the new instances and their tags appear.
5. Launch **p2s-estate-configure**. It builds every service at its baseline (vulnerable, except the
already-patched marketing site): PHP versions, stacks, the vendor appliance and the look-back evidence.
6. Optional: launch **p2s-know-scan** to see the classification table before you start.

## Run

1. In automation orchestrator, open **Zero-Day Response - PHP2Shell: KNOW + CONTAIN** and run it (the trigger is
pre-filled). Approve each owner step in its **Review approval** panel; the Security panel shows the AI's
summary, the tested change and Red Hat's own residual-risk sentence.
2. Open **Zero-Day Response - PHP2Shell: FIX + PROVE** and run it. Approve the change.
3. To run again, launch **p2s-estate-configure** first: it resets the estate to the vulnerable baseline.

In this demo every approval step is assigned to `admin`. In production, give each step its own approver.

A typical run: KNOW + CONTAIN about 5 minutes plus your approval time, FIX + PROVE about 7 minutes.

## Tear down

Launch **p2s-estate-provision** with the extra variable `role_action: deprovision`, then update **AWS Inventory**.
Everything the demo created on AWS carries the tag `p2s-demo=true`.

## Job templates

| Job template | Playbook | What it does |
|---|---|---|
| `p2s-estate-provision` | `playbooks/infra_provision_aws.yml` | Creates (or, with `role_action: deprovision`, removes) the dedicated VPC and six tagged instances |
| `p2s-estate-configure` | `playbooks/estate_configure.yml` | Builds or resets the estate to its vulnerable baseline |
| `p2s-know-scan` | `playbooks/p2s_scan.yml` | KNOW: evidence from every PHP asset, then the deterministic classification |
| `p2s-know-lookback` | `playbooks/p2s_lookback.yml` | KNOW: were we already hit? (log look-back) |
| `p2s-ai-output-check` | `playbooks/p2s_ai_check.yml` | Parses and validates every AI answer against its schema |
| `p2s-contain-spec-check` | `playbooks/p2s_spec_check.yml` | Policy gate: is the AI-extracted control spec inside the reviewed envelope? |
| `p2s-contain-controls` | `playbooks/p2s_controls.yml` | CONTAIN: applies and verifies the interim controls (test, then production) |
| `p2s-fix-availability` | `playbooks/p2s_fix_availability.yml` | FIX: decides per stream on the Red Hat API answers the workflow recorded |
| `p2s-fix-patch` | `playbooks/p2s_patch.yml` | FIX: patch and verify (test, then rolling production with rollback) |
| `p2s-fix-standdown` | `playbooks/p2s_standdown.yml` | Removes interim controls only where the fix is verified |
| `p2s-prove-case-record` | `playbooks/p2s_case_record.yml` | PROVE: records the AI-drafted update on the case; refuses an empty draft |
| `p2s-independent-check` | `playbooks/p2s_independent_check.yml` | Independent read of live estate state and business transactions, outside the response roles |

## Using a different model

The prompts were written and tuned on one model and moved to another (LiteMaaS `qwen3-235b`). Treat a model change
like a code change:

- **Replay real inputs many times, before the new model touches anything.** One good run proves little. On the new
model the advisory reader sometimes proposed a PHP 8.5-only setting (the test host caught it, because it checks
the settings actually running); the human brief sometimes said a probe was "under triage"; the board update
sometimes put one approval's time on another. Each was measured over dozens of calls and fixed in the prompt. The
rates fell a long way, but not always to zero (2 of 180 replays still said "under forensic triage", and a few others had loose wording such as "exploit potential").
- **Treat replay rates as a floor.** Replays looked cleaner than live runs did, so judge a change on live runs too.
- **Test through the real platform, not just the model.** With a response schema, one provider path returned an
empty answer that still looked like success. That is why every AI step here returns JSON as text and a
deterministic `CHECK` step validates it.
- **Check meaning, not just shape.** A schema proves the fields exist. The policy gate, the test verification and
the owner approvals decide; the AI's words only explain. `CHECK` validates shape only: nothing in the demo screens wording, and board
updates are recorded without a sign-off step, so keep a human reading the words that reach people.
- **Don't ask for text nothing uses.** Asked for a reason on every service, the model invented some ("active exploit
likely"). Prompt fixes only moved the error around; removing the field took it to 0 of 180 replays, and the live pair that followed
was clean.
- **Never loosen a check to make a model pass.** Fix the instruction, or tighten the check.
- **AI answers are final.** Don't re-run until it looks right; a re-roll hides the failure rate you need to know.
Loading