diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 812d656..f67ba98 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -14,7 +14,7 @@ "name": "s1-secops-skills", "source": "./plugins/s1-secops-skills", "description": "SentinelOne SecOps skills for Claude: PowerQuery threat hunting and STAR/Custom Detection rules; Management Console API; Singularity Data Lake API; SDL dashboards; log parsing (OCSF); Hyperautomation SOAR; z-score anomaly baselining; autonomous DFIR alert investigation (soc-investigator); and one-prompt SDL solutions: source onboarding, asset enrichment, UEBA, ingest health, detection exclusions, Risk-Based Alerting, alert noise reduction, and Detection as Code.", - "version": "1.2.12", + "version": "1.2.14", "author": { "name": "Prithvi Moses", "email": "prithvi.moses@sentinelone.com" diff --git a/plugins/s1-secops-skills/.claude-plugin/plugin.json b/plugins/s1-secops-skills/.claude-plugin/plugin.json index 4298827..d398fbe 100644 --- a/plugins/s1-secops-skills/.claude-plugin/plugin.json +++ b/plugins/s1-secops-skills/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "s1-secops-skills", - "version": "1.2.13", + "version": "1.2.14", "description": "SentinelOne SecOps skills for Claude: PowerQuery threat hunting and STAR/Custom Detection rules; Management Console API; Singularity Data Lake API; SDL dashboards; log parsing (OCSF); Hyperautomation SOAR; z-score anomaly baselining; autonomous DFIR alert investigation (soc-investigator); and one-prompt SDL solutions: source onboarding, asset enrichment, UEBA, ingest health, detection exclusions, Risk-Based Alerting, alert noise reduction, and Detection as Code.", "author": { "name": "Prithvi Moses", diff --git a/plugins/s1-secops-skills/dist/hyperautomation.skill b/plugins/s1-secops-skills/dist/hyperautomation.skill index 27b52d4..74b1133 100644 Binary files a/plugins/s1-secops-skills/dist/hyperautomation.skill and b/plugins/s1-secops-skills/dist/hyperautomation.skill differ diff --git a/plugins/s1-secops-skills/dist/mgmt-console-api.skill b/plugins/s1-secops-skills/dist/mgmt-console-api.skill index d61c5f1..ec076c4 100644 Binary files a/plugins/s1-secops-skills/dist/mgmt-console-api.skill and b/plugins/s1-secops-skills/dist/mgmt-console-api.skill differ diff --git a/plugins/s1-secops-skills/dist/powerquery.skill b/plugins/s1-secops-skills/dist/powerquery.skill index c97ac77..e533d60 100644 Binary files a/plugins/s1-secops-skills/dist/powerquery.skill and b/plugins/s1-secops-skills/dist/powerquery.skill differ diff --git a/plugins/s1-secops-skills/dist/s1-secops-skills-v1.2.13.plugin b/plugins/s1-secops-skills/dist/s1-secops-skills-v1.2.14.plugin similarity index 91% rename from plugins/s1-secops-skills/dist/s1-secops-skills-v1.2.13.plugin rename to plugins/s1-secops-skills/dist/s1-secops-skills-v1.2.14.plugin index 0bb4761..2c5b79c 100644 Binary files a/plugins/s1-secops-skills/dist/s1-secops-skills-v1.2.13.plugin and b/plugins/s1-secops-skills/dist/s1-secops-skills-v1.2.14.plugin differ diff --git a/plugins/s1-secops-skills/dist/sdl-api.skill b/plugins/s1-secops-skills/dist/sdl-api.skill index f38567e..709c5a4 100644 Binary files a/plugins/s1-secops-skills/dist/sdl-api.skill and b/plugins/s1-secops-skills/dist/sdl-api.skill differ diff --git a/plugins/s1-secops-skills/dist/sdl-dashboard.skill b/plugins/s1-secops-skills/dist/sdl-dashboard.skill index dcd74a0..adc56db 100644 Binary files a/plugins/s1-secops-skills/dist/sdl-dashboard.skill and b/plugins/s1-secops-skills/dist/sdl-dashboard.skill differ diff --git a/plugins/s1-secops-skills/dist/sdl-log-parser.skill b/plugins/s1-secops-skills/dist/sdl-log-parser.skill index 8f0cf9e..e66a149 100644 Binary files a/plugins/s1-secops-skills/dist/sdl-log-parser.skill and b/plugins/s1-secops-skills/dist/sdl-log-parser.skill differ diff --git a/plugins/s1-secops-skills/dist/sdl-solutions.skill b/plugins/s1-secops-skills/dist/sdl-solutions.skill index 417cfb3..37e550d 100644 Binary files a/plugins/s1-secops-skills/dist/sdl-solutions.skill and b/plugins/s1-secops-skills/dist/sdl-solutions.skill differ diff --git a/plugins/s1-secops-skills/dist/soc-investigator.skill b/plugins/s1-secops-skills/dist/soc-investigator.skill index 19aae78..ddf6fc0 100644 Binary files a/plugins/s1-secops-skills/dist/soc-investigator.skill and b/plugins/s1-secops-skills/dist/soc-investigator.skill differ diff --git a/plugins/s1-secops-skills/skills/hyperautomation/README.md b/plugins/s1-secops-skills/skills/hyperautomation/README.md index 94da3a0..e4d00ff 100644 --- a/plugins/s1-secops-skills/skills/hyperautomation/README.md +++ b/plugins/s1-secops-skills/skills/hyperautomation/README.md @@ -47,6 +47,17 @@ Just describe the workflow in plain language: Claude will ask clarifying questions if needed, warn about any integrations that require pre-configuration, generate the workflow JSON, and optionally push it directly to your console. +### Autonomous SOC (auto-investigate and respond) + +Describe an end-to-end auto-response flow and Claude builds the canonical alert to investigate to triage to decide to respond shape, with reusable response snippets and dynamic dispatch: + +- "Build an autonomous SOC workflow that investigates and responds to alerts on its own" +- "Auto-triage every high/critical alert, add a verdict note, open a ticket, and remediate" +- "On a ransomware alert, isolate the device and notify the SOC; auto-close false positives" +- "Let an LLM pick isolate vs quarantine vs close-as-false-positive per alert" + +Full pattern and the reusable-snippet library: [`references/autonomous-soc-template.md`](references/autonomous-soc-template.md). + ## Layout - `SKILL.md`: instructions Claude reads when the skill triggers @@ -55,6 +66,9 @@ Claude will ask clarifying questions if needed, warn about any integrations that - `references/functions-reference.md`: `{{Function.X()}}` syntax and PowerQuery patterns - `references/validation-rules.md`: pre-output checklist - `references/api-integration.md`: Hyperautomation API reference (import, activate, trigger, list) +- `references/snippets.md`: authoring and calling reusable snippets (`snippet_20` dispatch, lifecycle API) +- `references/autonomous-soc-template.md`: the autonomous SOC pattern (investigate to decide to respond), response-snippet library, and a branded SOC-email snippet +- `references/connections.md`: creating an integration connection via API and cloning it across sites ## Credit diff --git a/plugins/s1-secops-skills/skills/hyperautomation/SKILL.md b/plugins/s1-secops-skills/skills/hyperautomation/SKILL.md index d7ae3c0..532eeb2 100644 --- a/plugins/s1-secops-skills/skills/hyperautomation/SKILL.md +++ b/plugins/s1-secops-skills/skills/hyperautomation/SKILL.md @@ -8,7 +8,12 @@ description: > security task. Also triggers when the user asks to import, export, test, validate, or submit a workflow to a SentinelOne console via API. Always use this skill for any task involving SentinelOne workflow JSON — even if phrased casually (e.g., "build me a thing that disables - a user when an alert fires"). When in doubt about whether this skill applies, use it. + a user when an alert fires"). Also triggers for autonomous / auto-response SOC requests: + "autonomous SOC", "SOC in a box", "auto-triage", "investigate and respond automatically", + "auto-isolate on a critical alert", "auto-close false positives and escalate real threats", + or letting an LLM decide isolate vs quarantine vs close per alert (the canonical + investigate-decide-respond shape lives in references/autonomous-soc-template.md). + When in doubt about whether this skill applies, use it. --- # SentinelOne Hyperautomation Skill @@ -165,6 +170,9 @@ A workflow imported or created via the API is a **Private Draft owned by the tok | `references/functions-reference.md` | Using `{{Function.X()}}` syntax or PowerQuery patterns | | `references/validation-rules.md` | Before outputting any workflow — run the checklist | | `references/api-integration.md` | User wants to import/export/submit to a live console | +| `references/snippets.md` | Building or calling a **snippet** (reusable sub-workflow): authoring rules, static vs dynamic `snippet_20` calls, and the snippet lifecycle API | +| `references/autonomous-soc-template.md` | Building an **autonomous SOC** / auto-response workflow: canonical alert→investigate→triage→decide→respond shape, the reusable response-snippet library, dynamic-snippet dispatch, and a branded SOC-email snippet example | +| `references/connections.md` | Creating an integration **connection** via API (endpoint + body), cloning a connection across sites, and the integration-vs-connection binding rule | ## Decision guide: pick the right pattern by use case @@ -183,6 +191,10 @@ table to jump straight to the right starting point: | "Summarize this evidence with an LLM" | B12 (OpenAI) | B6 add-note | | "Create a Threat Intelligence indicator" | B9 (TI IOC create) | B4 accumulator inside loop | | "Add a note on the alert" | B6 (UAM GraphQL addAlertNote) | always wrap text in `Function.HTML_ENCODE` | +| "Auto-investigate and respond to alerts end to end" | `references/autonomous-soc-template.md` | reusable response snippets + dynamic `snippet_20` dispatch, poll-until-complete loop | +| "Reuse this step across several flows" / "stop copy-pasting this logic" | `references/snippets.md` (author a snippet, call it with `snippet_20`) | `use_latest_snippet_version` to auto-track edits | + +**Reuse via snippets is the default for shared logic.** Whenever the same action graph would appear in more than one workflow (a response action, a notification, a poll loop), build it once as a snippet and call it with a `snippet_20` node instead of duplicating it. See `references/snippets.md`. When in doubt, the load-bearing 17 atoms are: `http_request`, `variable`, `condition`, `loop`, `singularity_response_trigger`, @@ -190,6 +202,8 @@ When in doubt, the load-bearing 17 atoms are: `delay`, `http_trigger`, `scheduled_trigger`, `create_interaction`, `wait_for_interaction`, `email_trigger`. Anything outside this set is exotic; confirm it exists before generating. +> **Snippet node types.** *Calling* a snippet from a workflow uses a `snippet_20` node (not `snippet`). *Authoring* a snippet uses a `snippet_trigger` (inputs) + `snippet_output` (returns) in place of a normal trigger. See `references/snippets.md`. + ## Example workflows (in references/examples/) Annotated real examples to use as structural references: diff --git a/plugins/s1-secops-skills/skills/hyperautomation/references/autonomous-soc-template.md b/plugins/s1-secops-skills/skills/hyperautomation/references/autonomous-soc-template.md new file mode 100644 index 0000000..cd81ae5 --- /dev/null +++ b/plugins/s1-secops-skills/skills/hyperautomation/references/autonomous-soc-template.md @@ -0,0 +1,139 @@ +# Autonomous SOC workflow template + +An autonomous SOC workflow takes an alert from detection to a decided, executed response with no +analyst in the loop. + +## Example prompts that should trigger this template + +Use this template when a user asks for end-to-end alert handling, auto-response, or a "SOC in a +box" — even when phrased casually. Representative prompts: + +- "Build an autonomous SOC workflow that investigates and responds to alerts on its own." +- "When a critical alert fires, run Purple AI, decide the response, and act, no analyst needed." +- "Auto-triage every high/critical alert, add a verdict note, open a ticket, and remediate." +- "Set up automatic containment: on a ransomware alert, isolate the device and notify the SOC." +- "Create a flow that lets an LLM pick isolate vs quarantine vs close-as-false-positive per alert." +- "Wait for the agentic investigation to finish, summarise it, then take the right action." +- "Auto-close false positives and only escalate real threats to a human." +- "When an identity alert comes in, revoke the user's SaaS sessions and lock their machine." +- "Notify the SOC by email with the verdict and recommended actions whenever we auto-respond." +- "Stop copy-pasting the isolate/quarantine logic into every flow, make them reusable." + +The last two map to the reusable-snippet best practice below (a notify-SOC snippet, and factoring +each response into its own snippet). Anything of the form "investigate → decide → respond +automatically" is this template. + +## Best practice: factor reusable logic into snippets + +**Any part of a flow that other flows also need should be a snippet, not inline actions.** Build the +logic once as a snippet (`references/snippets.md`), publish it, and have every workflow call it. +This removes duplicated logic across flows: when the logic changes you edit one snippet instead of +editing every workflow that copied it, and callers on `use_latest_snippet_version: true` pick the +change up automatically. Reusable pieces in a SOC context are almost always: the response actions +(isolate, quarantine, rollback, revoke, close-as-FP), the collaboration steps (open a channel, +create a ticket, escalate), and shared utilities (poll until an investigation completes). Reach for +a snippet whenever you notice the same action graph appearing in more than one workflow. + +## Canonical shape (alert-triggered) + +1. **Singularity Response Trigger** — fire on the target alert (filter by name / severity). +2. **Trigger Agentic Investigation** — `http_request` to Unified Alerts GraphQL, mutation + `alertTriggerActions` with action `S1/aiInvestigation/run` + (`payload.aiInvestigation{tenantId, consoleVersion:"HyperAutomation", userAgent:"SentinelOne-HyperAutomation"}`). +3. **Pause for Investigation Completion** — a **static** snippet call that polls until the + investigation finishes (poll-until-complete loop below). Shared by every alert workflow. +4. **Get Investigation Summary** — `http_request` GraphQL `aiInvestigations { status verdict result … }` + once complete. +5. *(optional)* **IOC enrichment** — extract hashes into a variable, branch SHA1 / SHA256 / MD5 + checks, enrich with an LLM or a threat-intel action. +6. **Triage & Summary** — an `llm` action turns the investigation + alert into a verdict/summary. +7. **Summary markdown** — an `llm` action formats a human-readable summary. +8. **Add Note / Set Status** — `http_request` GraphQL `addAlertNote` + `analystVerdictUpdate` / + `statusUpdate` (wrap note text in `Function.HTML_ENCODE`). +9. *(optional)* **Ticket + collaboration** — create a ticket, open a Slack channel (snippet), invite, + notify. +10. **Response Decision** — an `llm` action returns ONE response action, expressed as the **name of a + response snippet**. +11. **Response** — a **dynamic** `snippet_20` (`is_dynamic: true`, + `dynamic_snippet_name: "{{response-decision.data}}"`) that dispatches to the chosen response + snippet, passing the shared input contract. +12. **Wrap-up** — `llm` action summary → update alert notes → update the collaboration channel. + +## The reusable snippet library + +Each response and each shared step is its own snippet, so any workflow can call it: + +- **Utility:** Pause for Investigation Completion (poll loop), Create Slack Channel, Create incident. +- **Containment:** Isolate Device / Isolate from Network, Quarantine Alert, Lock User's Machine. +- **Identity:** Revoke SaaS Session. +- **Recovery:** Rollback. +- **Triage:** Close as False Positive. +- **Escalation:** Escalate to Human. + +### Shared input contract (this is what enables dynamic dispatch) + +Give every response snippet the SAME `snippet_trigger` inputs so ONE dynamic `snippet_20` can route +to any of them with one `inputs` map. A workable contract: + +`Singularity-ID`, `Response-Input`, `Device-UUID`, `Group-ID`, `Channel-ID`, `Alert-Input`. + +The Response Decision LLM returns the name of one snippet in the library; the dynamic node runs it +with these inputs. Adding a new response is then just: author a new snippet against the same +contract and teach the LLM its name — no change to the parent workflow. + +## Poll-until-complete loop (used by the Pause snippet) + +A while-loop that polls a status and breaks when done: + +- **loop node:** `data { action_type:"loop", loop_type:"while", number_of_iterations:"1", + object_to_iterate:null, is_parallel:false }`. For a while-loop `number_of_iterations` is ignored; + it loops until a `break_loop` fires. +- The loop node's `connected_to` carries BOTH `{target:, custom_handle:"inner"}` + AND `{target:, custom_handle:null}` (the post-loop continuation). Omit the + default edge and nothing runs after the loop. +- **Inner chain** (each node `parent_action` = the loop's `export_id`): + `[delay] → Get Status (http) → condition(status == "COMPLETED") ─true→ break_loop`. The + condition's false path has no edge, so the loop iterates again. +- Read the full result AFTER the loop (a fresh Get) — a node placed after the loop can read the + loop's own outputs but not a loop-internal node's output. + +## Build order + +1. Create + publish + activate each reusable snippet (import each with `snippet_trigger` + + the shared-contract inputs + `snippet_output`). +2. Build the parent workflow: **static**-call the utility snippets (Pause, Create Channel) and + **dynamic**-call the response library through one `snippet_20` driven by the Response Decision LLM. +3. Publish/activate the parent and confirm bindings resolve + (`GET /workflow-actions/snippets-versions/{id}/{versionId}?query={}`). + +## Example: SOC notification snippet (branded HTML email) + +A reusable "notify the SOC" snippet: `snippet_trigger` (inputs `Verdict`, `Severity`, +`Recommendation`, `Alert-ID`) → `send_email` → `snippet_output`. The email body is a self-contained, +inline-styled HTML table (email clients need inline styles; no `