/devsecops-skills:critical-vulnerability-emergency-responsefrom devsecops-skills
Guides accelerated response to critical CVEs in widely-used dependencies — rapid fleet exposure assessment, patch or temporary mitigation, verification, and closeout. Use for zero-day or emergency disclosures.
Ships in devsecops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A handful of times a year, a critical vulnerability is disclosed in
software so widely deployed that it demands an out-of-band response
within hours, not the normal remediation SLA — the Log4Shell
(CVE-2021-44228) disclosure in December 2021 is the canonical example:
a trivially exploitable remote code execution in a logging library
embedded, often transitively and invisibly, across an enormous share of
Java software. This kind of event does not fit the steady-state finding
triage process in
security-finding-backlog-triage —
by the time a routine scan cycle would surface it, active exploitation
may already be underway, since public disclosure usually means
attackers have a working exploit within hours to days. This skill covers
the compressed, incident-response-style workflow specific to this
scenario: rapidly determining fleet-wide exposure (not just "do we use
this library" but "is the vulnerable code path reachable and unpatched
anywhere we run"), applying a patch or a stop-gap mitigation faster than
a normal release cycle allows, verifying the fix actually closed the
exposure, and closing out with the same rigor as any other security
incident.
Confirm the advisory and its actual scope before mobilizing — read the primary vendor/CVE advisory (NVD entry, GitHub Security Advisory, vendor bulletin), not just news coverage. Note: exact affected version range, whether exploitation requires a specific configuration or is unconditional, whether a patch or only a workaround/mitigation exists yet, and whether active exploitation is confirmed (materially raises urgency) or only theoretical.
Declare the incident and assign an incident commander per the organization's existing incident-response process, scaled to severity — a confirmed actively-exploited RCE in a widely-deployed component warrants full incident-response mobilization; a high-severity CVE with no known exploit and a narrow precondition may warrant an accelerated-but-smaller response. Don't build a bespoke process mid-emergency; invoke the one that already exists.
Run a fleet-wide exposure scan targeted at the specific package/version, not a wait for the next scheduled scan:
# Trivy: point at a specific known-vulnerable identifier/package to confirm the exact match set
trivy image --severity CRITICAL --scanners vuln \
--vuln-type library myorg/myapp:latest
# Grep an SBOM inventory for the affected package name/version range as
# an immediate, scan-tool-independent cross-check
grep -r "log4j-core" sbom-inventory/*.json
Cross-reference against the SBOM/asset inventory to also catch instances a live scan might miss (an image not currently deployed but sitting in a registry, an offline/batch system not scanned on the normal schedule, a vendored/embedded copy not visible to a package-manager-aware scanner).
Distinguish "present" from "exploitable" quickly, but don't let that distinction delay patching where it's ambiguous. Some critical-CVE advisories include a documented configuration precondition (e.g. a specific feature flag, a lookup mechanism only active under certain logging configurations). Confirm precisely against the advisory whether your configuration matches the vulnerable precondition — but when in doubt during an active emergency, treat "present" as sufficient reason to mitigate first and confirm exploitability detail afterward, given the cost asymmetry between over-mitigating and a real breach.
Apply the fastest available safe mitigation first, the full fix
second, if they differ. Log4Shell is again illustrative: the
initial recommended mitigation was a JVM system property/environment
variable disabling the vulnerable lookup feature
(-Dlog4j2.formatMsgNoLookups=true / LOG4J_FORMAT_MSG_NO_LOOKUPS=true)
— deployable via a config/restart in minutes — ahead of the fully
patched library version, which required a dependency bump, rebuild,
and full release pipeline. Where a vendor advisory offers a
config-level mitigation alongside the eventual patch, deploy the
mitigation immediately and track the full patch as the durable fix,
rather than waiting for a complete rebuild-and-release cycle before
doing anything.
# Example emergency mitigation via environment variable, deployable
# through existing config/secret pipelines without a full rebuild
kubectl set env deployment/myapp LOG4J_FORMAT_MSG_NO_LOOKUPS=true -n prod
Patch through an expedited, emergency change path, not the normal release cadence, once the actual dependency bump is ready:
# Example: emergency out-of-band CI run bypassing the normal release
# train's batching/scheduling, while still running required tests
name: emergency-patch
on:
workflow_dispatch:
inputs:
cve_ref: { description: "CVE being patched", required: true }
jobs:
patch-and-verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./scripts/bump_dependency.sh log4j-core 2.17.1
- run: ./run_tests.sh
- run: trivy fs --severity CRITICAL,HIGH --exit-code 1 .
Warning: an emergency change path that skips required tests or review entirely to save time trades a known, disclosed vulnerability for an unknown, unreviewed regression risk. Keep automated tests and a scan gate in the expedited path — cut the scheduling delay (batching, staged rollout waiting periods), not the safety checks themselves.
Verify the fix actually closed the exposure, against the same scan/detection used to find it, not just "the deploy succeeded":
trivy image --severity CRITICAL myorg/myapp:patched
# confirm the specific CVE no longer appears in the report
For a config-level mitigation applied ahead of the full patch, confirm the mitigating configuration is actually active in the running process (check the effective environment/config of a live pod, not just that the manifest was updated) before considering that step complete.
Check for signs of exploitation during the exposure window, not only whether the fix is now in place — review logs/WAF/IDS data covering the period between public disclosure and your patch deployment for indicators matching the vulnerability class (for Log4Shell, outbound JNDI/LDAP lookup attempts in access logs was a widely-published indicator). A confirmed exploitation attempt or success escalates this from a vulnerability response to an active incident with its own containment/forensics process.
Close out with a written record: which systems were exposed, what mitigation/patch was applied and when, verification evidence, and any residual risk (a system that could not be patched immediately, and why) routed into security-gate-exception-management as a time-boxed exception if a full fix genuinely cannot land immediately everywhere — never left as a silent gap.
Feed the response back into steady-state process — update the asset inventory/SBOM tooling if the emergency response revealed gaps in it, and log metrics (time to detect exposure, time to mitigate, time to fully patch) into security-posture-metrics-and-trend-analysis so the organization can measure whether its emergency-response speed is actually improving over successive events.
Symptom: The team spends the first several hours of an emergency trying to determine what systems even run the affected component, because no SBOM or asset inventory exists. Fix: This is a symptom of a prerequisite gap, not something to solve mid-emergency — stand up SBOM generation (supply-chain-security-slsa-sbom) proactively so the next event starts with a query, not a fleet-wide archaeology exercise.
Symptom: The organization waits for the fully-tested, complete dependency-bump release before doing anything, while a documented config-level mitigation that could have been deployed in minutes sits unused. Fix: Check the advisory specifically for an interim mitigation (feature flag, environment variable, WAF rule) and deploy it immediately as a stop-gap; track the full patch as the durable follow-up, not the only acceptable first action.
Symptom: An emergency patch is rushed out with tests and review skipped entirely "because it's urgent," and it introduces a regression that causes its own outage. Fix: Keep the safety checks (automated tests, a scan gate confirming the CVE is actually resolved) in the expedited path; remove only the non-safety delay (release-train batching, staged rollout wait windows), which is usually the larger time cost anyway.
Symptom: After patching, nobody checks whether the vulnerability was actually exploited during the exposure window, and a since-established attacker foothold goes unnoticed for months. Fix: Make "review logs for exploitation indicators during the exposure window" a mandatory step in the playbook, every time, regardless of how quickly the patch was applied.
Symptom: One legacy system can't be patched immediately (a vendor dependency, a system slated for decommission), and it's quietly left vulnerable with no record, discovered by an auditor months later. Fix: Route any system that can't be immediately remediated through the formal, expiring exception process in security-gate-exception-management rather than an informal, undocumented "we'll get to it."
Scenario (illustrative, modeled on the real Log4Shell pattern but
using a placeholder CVE identifier): A critical, actively-exploited
remote-code-execution vulnerability, CVE-2021-EXAMPLE-RCE, is
disclosed in a widely-used logging library, with a vendor-published
interim mitigation (an environment variable) and a patched version
released the same day.
Declare and scope (T+0 to T+1h): Incident commander assigned per
standard incident process. Advisory reviewed: affects versions
2.0-2.14.x; interim mitigation available (env var); patched
version 2.15.0 released.
Fleet exposure scan (T+1h to T+3h):
trivy image --severity CRITICAL --vuln-type library myorg/*:latest \
2>&1 | grep -i "log4j"
grep -rl "log4j-core" sbom-inventory/*.json
Result: 14 services affected across production and staging; 2 of the 14 are internet-facing.
Immediate mitigation (T+3h to T+5h): Deploy the environment variable mitigation to all 14 services via the existing config pipeline (no rebuild required):
for svc in $(cat affected-services.txt); do
kubectl set env deployment/"$svc" LOG4J_FORMAT_MSG_NO_LOOKUPS=true -n prod
done
Verified active on each running pod via
kubectl exec ... -- env | grep LOG4J_FORMAT_MSG_NO_LOOKUPS.
Full patch (T+5h to T+18h): Emergency CI run bumps log4j-core
to 2.15.0 for all 14 services, runs full test suite, confirms via
trivy image that the CVE no longer appears, and deploys through the
expedited emergency-change path with the two internet-facing services
prioritized first.
Exploitation check (in parallel, T+3h onward): Access logs and WAF logs for the two internet-facing services are searched for known indicator patterns over the disclosure-to-mitigation window; no matches found, documented in the incident record.
Closeout: Written incident record lists all 14 affected services, mitigation and patch timestamps per service, verification scan output, and confirmation of no exploitation evidence found. Time metrics (declare-to-mitigate: 5h; declare-to-full-patch: 18h) logged into security-posture-metrics-and-trend-analysis for trend tracking across future emergency events.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin devsecops-skills17 skills in this plugin
/checkov-and-tfsec-iac-security-scanningConfigures Checkov and tfsec to scan Terraform/CloudFormation/Kubernetes IaC source for misconfigurations — hardcoded secrets, overly permissive IAM policies, unencrypted storage, open security groups — before `terraform apply` or `aws cloudformation deploy` ever runs. Use when a user asks to "scan my Terraform for security issues," "add Checkov/tfsec to CI," "find overly permissive IAM in my IaC," "write a Checkov suppression," "compare Checkov and tfsec," or "catch misconfigured cloud resources before they're provisioned."
/complete-devsecops-pipeline-for-kubernetes-from-scratchBuilds the complete security-gate sequence for a Kubernetes-targeted DevSecOps pipeline from scratch — SAST, SCA, container image scanning, a policy-as-code (OPA/Kyverno) admission gate placed before the GitOps handoff, and a secrets model where plaintext credentials never touch the pipeline because an External Secrets Operator pulls them cluster-side instead. Use when the user asks to "build a DevSecOps pipeline for Kubernetes from scratch," "add a policy gate before our GitOps commit," "make sure secrets never touch CI for our K8s deploys," or "sequence SAST/SCA/image-scan/policy gates for a container pipeline end-to-end."
/complete-devsecops-pipeline-for-serverless-from-scratchBuilds the complete security-gate sequence for a serverless (Lambda- style) DevSecOps pipeline from scratch — SAST, SCA against a much larger bundled transitive-dependency surface, package/artifact signing, and least-privilege execution-role scoping as the primary release gate (rather than a Kubernetes-style admission policy), with runtime secrets fetched from a managed secrets service instead of baked into the deployment package. Use when the user asks to "build a DevSecOps pipeline for a Lambda function from scratch," "gate a serverless release on execution-role scope instead of admission policy," "sign a Lambda deployment package," or "make sure a Lambda function's secrets aren't baked into its zip."
/complete-devsecops-pipeline-for-vm-based-workloads-from-scratchBuilds the complete security-gate sequence for a VM-based DevSecOps pipeline from scratch — SAST, SCA, golden-image scanning and CIS benchmark hardening baked into the machine image itself, config- management-applied secrets via Ansible Vault (never plaintext), and an ongoing patch/drift-detection gate that runs independently of any single deploy, distinct from the per-deploy scanning in the Kubernetes and serverless variants. Use when the user asks to "build a DevSecOps pipeline for EC2/VM workloads from scratch," "harden a golden AMI to CIS benchmarks in the pipeline," "apply secrets with Ansible Vault instead of plaintext," or "add ongoing patch/drift detection for a VM fleet."
/container-image-hardeningGuides building minimal, non-root, hardened container images — multi-stage builds, distroless/minimal base images, non-root users, read-only root filesystems, dropped Linux capabilities, and pinned/ digest-referenced base images. Use when the user asks to "harden this Dockerfile", "reduce container image attack surface/size", "make our container run as non-root", "switch to a distroless base image", "fix a container security scan finding about running as root or having a shell", or "set Kubernetes securityContext restrictions for a pod".
/dast-integrationGuides adding Dynamic Application Security Testing (DAST) — automated black-box scanning of a running web application or API — using tools such as OWASP ZAP or Nuclei, in CI/CD or on a scheduled cadence against a staging environment. Use when the user asks to "add DAST scanning", "run a ZAP baseline scan against staging", "automate OWASP scanning in the pipeline", "test the running app for injection/auth/config vulnerabilities", or "scan our API for security issues before release". Complements, but does not replace, SAST or SCA static analysis.
Other plugins' skills for the same job