Skip to main content

resources/soc.ts

Source: sdks/typescript/packages/sdk/src/resources/soc.ts. Back to the TypeScript SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Interface SocDetection​

Body of SocResource.createDetection (POST /v1/soc/detections): one suspicious event.

Fields:

NameTypeRequiredDescription
kindstringyesKind of detection, one of those of SocResource.catalog.
agentstringnoAgent involved.
confidencenumbernoConfidence of the detection.
data_classificationstringnoClassification of the data involved.
evidenceDocnoEvidence of the measures (logs, timestamps, screenshots references...).
fingerprintstringnoFingerprint of the detection, to group repeats.
occurred_atstringnoTime the detected behaviour happened, ISO 8601.
resourcestringnoResource involved.
run_idstringnoRun involved.
session_idstringnoSession involved.
severitystringnoSeverity of the detection.
sourcestringnoSource that raised the detection.
targetsDoc[]noTargets of the playbook reactions, keyed by session, run, agent, identity, credential, workload, mcp, plugin, tool, connector, knowledge_base, model or application.
userstringnoUser concerned, used for correlation.

Interface SocOrderCreate​

Body of SocResource.createOrder (POST /v1/soc/orders): a reaction order on a target.

Fields:

NameTypeRequiredDescription
reactionstringyesTyped reaction: BLOCK_REQUEST, RATE_LIMIT, REQUIRE_APPROVAL, CANCEL_RUN, CANCEL_SUBAGENTS, SUSPEND_AGENT, SUSPEND_APPLICATION, DISABLE_TOOL, QUARANTINE_CONNECTOR, REVOKE_CREDENTIAL, DISABLE_MODEL_ROUTE, ISOLATE_NETWORK, TERMINATE_WORKLOAD, SUSPEND_IDENTITY, SUSPEND_TENANT, EMERGENCY_LOCKDOWN.
reasonstringyesWhy the action is taken. Written to the audit trail with the actor and the time.
targetDocyesTarget of the reaction.
confidencenumbernoConfidence behind the order.
incident_idstringnoIncident the order belongs to, optional (404 when unknown).
max_blast_radiusnumbernoLargest number of objects the order may affect (1 or more); above it the order is refused.
paramsDocnoParameters of the reaction.

Class SocResource​

AI-SOC: detections, reaction orders, kill switches verified by receipts and four eyes recovery.

Resource

SocResource.addEvidence​

addEvidence(incidentId: string, body: { content: Doc | string; kind?: string }, opts?: CallOptions)

Seal evidence on an incident. Appends a sealed record to the evidence chain of the incident: the content hash and the hash of the previous record, so that a removed, reordered or modified record breaks the chain. Records can never be updated nor deleted. Needs security_officer, soc_analyst or tenant_admin. Writes the audit event soc.evidence.seal and a custody entry. Answers 201 with seq, kind, content_sha256, prev_hash, hash, sealed_by and sealed_at.

Route: /v1/soc/incidents/{incident_id}/evidence (POST).

NameTypeDefaultRequiredDescription
incidentIdstringyesIdentifier (UUID) of the incident.
body{ content: Doc | string; kind?: string }yesKind and content of the evidence.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.approveOrder​

approveOrder(orderId: string, opts?: CallOptions)

Approve a containment order. Approves an order waiting for a second person and applies it (kill switch written, adapter run). Needs security_officer or tenant_admin (SOC lead), who is not the requester (409 separation_of_duties). An order that is not pending answers 409 order_not_pending; an unknown one 404.

Route: /v1/soc/orders/{order_id}/approve (POST).

NameTypeDefaultRequiredDescription
orderIdstringyesIdentifier (UUID) of the containment order.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.approveRecovery​

approveRecovery(recoveryId: string, body: { reason?: string } = {}, opts?: CallOptions)

Approve a recovery. Records one approval of a pending recovery; two distinct SOC leads are required, neither being the requester (409 separation_of_duties), each approving once (409 already_approved). Needs security_officer or tenant_admin (SOC lead). A request that is not pending answers 409 recovery_not_pending.

Route: /v1/soc/recoveries/{recovery_id}/approve (POST).

NameTypeDefaultRequiredDescription
recoveryIdstringyesIdentifier (UUID) of the recovery request.
body{ reason?: string }{}noOptional note of the approval.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.catalog​

catalog(opts?: CallOptions)

Get the SOC catalogue. Returns the allowlists: reactions, the target types allowed per reaction (targets), the detection kinds with their base severity and playbook (detections), the limits of the proportionality guard (response: minimum confidence, maximum automatic blast radius, blast radius needing a manual approval, reactions always needing approval) and the SOC roles. Open to any member of the tenant.

Route: /v1/soc/catalog (GET).

NameTypeDefaultRequiredDescription
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.createDetection​

createDetection(body: SocDetection, opts?: CallOptions)

Report a detection. Ingests a detection. Needs a credential granted the scope soc:detections explicitly (the global * does not count), or security_officer, agent or soc_analyst.

Route: /v1/soc/detections (POST).

NameTypeDefaultRequiredDescription
bodySocDetectionyesThe detection to ingest.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.createOrder​

createOrder(body: SocOrderCreate, opts?: CallOptions)

Order a containment. Creates a manual containment order. Needs security_officer, soc_analyst or tenant_admin.

Route: /v1/soc/orders (POST).

NameTypeDefaultRequiredDescription
bodySocOrderCreateyesReaction, target, incident, reason, parameters and limits of the order.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.custody​

custody(incidentId: string, opts?: CallOptions)

Read the chain of custody. Returns the custody log of the incident evidence (who sealed, read or exported what, and when) with the verification of both hash chains. Needs security_officer, tenant_admin, auditor or soc_analyst. The read itself is added to the custody log. Answers 404 not_found for an unknown incident.

Route: /v1/soc/incidents/{incident_id}/custody (GET).

NameTypeDefaultRequiredDescription
incidentIdstringyesIdentifier (UUID) of the incident.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.exportEvidence​

exportEvidence(incidentId: string, opts?: CallOptions)

Export the evidence of an incident. Returns the incident, its evidence records, both chains verified and the custody log. The bundle is scanned for credentials before any byte leaves: when one is found the export is refused with 422 secret_detected, the refusal is recorded in the custody log and a secret_leak detection is raised. Needs security_officer, tenant_admin, auditor or soc_analyst.

Route: /v1/soc/incidents/{incident_id}/evidence/export (POST).

NameTypeDefaultRequiredDescription
incidentIdstringyesIdentifier (UUID) of the incident.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.getOrder​

getOrder(orderId: string, opts?: CallOptions)

Get a containment order. Returns the order with its latest kill switch and the receipts received for it. Needs security_officer, tenant_admin, auditor or soc_analyst. Answers 404 not_found.

Route: /v1/soc/orders/{order_id} (GET).

NameTypeDefaultRequiredDescription
orderIdstringyesIdentifier (UUID) of the containment order.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.listDetections​

listDetections(params?: ListParams & { incident_id?: string; kind?: string }, opts?: CallOptions)

List the detections. Lists the detections of the tenant, newest first, optionally for one incident or one kind. Needs security_officer, tenant_admin, auditor or soc_analyst. The read is audited.

Route: /v1/soc/detections (GET).

NameTypeDefaultRequiredDescription
paramsListParams & { incident_id?: string; kind?: string }noExtra fields merged into the request.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.listEvidence​

listEvidence(incidentId: string, opts?: CallOptions)

Read the evidence of an incident. Returns the sealed evidence records of the incident (detections, orders, receipts, notes), the verification of their chain and custody_seq, the custody entry this read created. Needs security_officer, tenant_admin, auditor or soc_analyst. Answers 404 not_found.

Route: /v1/soc/incidents/{incident_id}/evidence (GET).

NameTypeDefaultRequiredDescription
incidentIdstringyesIdentifier (UUID) of the incident.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.listKillSwitches​

listKillSwitches(query: { state?: string } = {}, opts?: CallOptions)

List the kill switches. Lists the kill switches of the tenant, newest first, at most 500: by default only those whose desired state is SUSPENDED. Each gives reaction, target, desired and observed state, last receipt and release. Needs security_officer, tenant_admin, auditor or soc_analyst. The read is audited.

Route: /v1/soc/kill-switches (GET).

NameTypeDefaultRequiredDescription
query{ state?: string }{}noQuery string parameters of the route.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.listOrders​

listOrders(params?: ListParams & { incident_id?: string; status?: string }, opts?: CallOptions)

List the containment orders. Lists the containment orders of the tenant, newest first, optionally by status (pending_approval, applied, rejected...) or incident. Each gives reaction, target, blast radius, confidence, severity, mode (manual or automatic), status and the decision of the Response Policy Engine. Needs security_officer, tenant_admin, auditor or soc_analyst.

Route: /v1/soc/orders (GET).

NameTypeDefaultRequiredDescription
paramsListParams & { incident_id?: string; status?: string }noExtra fields merged into the request.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.listRecoveries​

listRecoveries(query: { status?: string } = {}, opts?: CallOptions)

List the recovery requests. Lists the recovery requests of the tenant, newest first, at most 500, optionally by status, with their approvals. Needs security_officer, tenant_admin, auditor or soc_analyst.

Route: /v1/soc/recoveries (GET).

NameTypeDefaultRequiredDescription
query{ status?: string }{}noQuery string parameters of the route.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.listTransactions​

listTransactions(query: { run_id?: string; status?: string } = {}, opts?: CallOptions)

List the side effecting transactions. Lists the side effecting tool and connector calls of the tenant, newest first, at most 500: idempotency key, operation, status (in_flight, committed, interrupted, reconciled, compensating, compensated...) and reconciliation. Needs security_officer, tenant_admin, auditor or soc_analyst.

Route: /v1/soc/transactions (GET).

NameTypeDefaultRequiredDescription
query{ run_id?: string; status?: string }{}noQuery string parameters of the route.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.reauthorizeRecovery​

reauthorizeRecovery(recoveryId: string, opts?: CallOptions)

Re-authorize and recover. Final step of a recovery, by one of the approvers (403 reauthorization_by_approver otherwise) once both approvals are in (409 recovery_not_approved). The switch is released, the target is re-evaluated by the policy, which must allow it (403 reauthorization_denied, everything rolled back), and only then the owning plane is restored, for example an agent resumed. A revoked API key stays revoked: issue a new one. Needs security_officer or tenant_admin (SOC lead).

Route: /v1/soc/recoveries/{recovery_id}/reauthorize (POST).

NameTypeDefaultRequiredDescription
recoveryIdstringyesIdentifier (UUID) of the recovery request.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.reconcileTransaction​

reconcileTransaction(transactionId: string, body: { outcome: string; note?: string; provider_reference?: string }, opts?: CallOptions)

Reconcile a transaction. Records the real outcome of a side effecting call whose result is unknown (interrupted by a kill, a crash or a timeout): committed (it happened at the provider) or not_executed. A retry with the same idempotency key then returns the stored result instead of calling the provider again. Needs security_officer or tenant_admin (SOC lead). An unknown outcome answers 400, a transaction that cannot be reconciled 409 transaction_not_reconcilable, an unknown one 404.

Route: /v1/soc/transactions/{transaction_id}/reconcile (POST).

NameTypeDefaultRequiredDescription
transactionIdstringyesIdentifier of the side effecting transaction.
body{ outcome: string; note?: string; provider_reference?: string }yesOutcome, provider reference and note.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.rejectOrder​

rejectOrder(orderId: string, body: { reason?: string } = {}, opts?: CallOptions)

Reject a containment order. Rejects an order waiting for approval, with an optional reason. Needs security_officer or tenant_admin (SOC lead). An order that is not pending answers 409 order_not_pending; an unknown one 404.

Route: /v1/soc/orders/{order_id}/reject (POST).

NameTypeDefaultRequiredDescription
orderIdstringyesIdentifier (UUID) of the containment order.
body{ reason?: string }{}noOptional reason of the decision.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.requestRecovery​

requestRecovery(body: { kill_switch_id: string; reason: string }, opts?: CallOptions)

Request the recovery of a kill switch. Opens a four eyes recovery request for one active kill switch. Needs security_officer, soc_analyst or tenant_admin. An unknown switch answers 404, a switch no longer suspended 409 kill_switch_not_active, a switch with an open request 409 recovery_already_open. Answers 201 with the request.

Route: /v1/soc/recoveries (POST).

NameTypeDefaultRequiredDescription
body{ kill_switch_id: string; reason: string }yesKill switch and reason.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.submitReceipt​

submitReceipt(payload: string | Uint8Array, opts?: CallOptions)

Receive an in-cluster containment receipt. Receipt sent from the cluster (Cilium policy observed, workload scaled to zero) for a cluster reaction: JSON {kill_switch_id, verified, adapter, evidence}. Signed like the platform webhooks: X-EAI-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, "<t>." + body)>, a 5 minute replay window, X-EAI-Delivery for deduplication and X-EAI-Tenant (tenant slug). Without the configured SOC webhook secret every delivery is refused. Every delivery, accepted or not, is recorded and audited. A verified receipt moves the observed state to SUSPENDED_VERIFIED; a receipt for a reaction that expects none answers 409 receipt_not_expected. No user credential is needed: the signature authenticates the sender. Answers 202 with the kill switch.

Route: /v1/soc/receipts (POST).

NameTypeDefaultRequiredDescription
payloadstring | Uint8ArrayyesRaw signed JSON body of the receipt (application/octet-stream), verified byte for byte.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.verifyKillSwitch​

verifyKillSwitch(switchId: string, opts?: CallOptions)

Verify a kill switch. Runs the Containment Verifier probe of the switch: on success the observed state becomes SUSPENDED_VERIFIED. Cluster reactions (ISOLATE_NETWORK, TERMINATE_WORKLOAD) are verified only by a signed in-cluster receipt. Needs security_officer, soc_analyst or tenant_admin. Writes the audit event soc.kill_switch.verify. Answers 404 not_found.

Route: /v1/soc/kill-switches/{switch_id}/verify (POST).

NameTypeDefaultRequiredDescription
switchIdstringyesIdentifier (UUID) of the kill switch.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).

SocResource.webhook​

webhook(source: string, payload: string | Uint8Array, opts?: CallOptions)

Receive external security findings. Webhook of external detectors: Falco, Tetragon or OpenSearch Security Analytics. The body is one event or a list (at most 200 processed), normalized into detections (Falco priorities and eai_* tags mapped to kinds and severities) and ingested like POST /v1/soc/detections. Signed like the platform webhooks: X-EAI-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, "<t>." + body)>, a 5 minute replay window, X-EAI-Delivery for deduplication and X-EAI-Tenant (tenant slug). Without the configured SOC webhook secret every delivery is refused. Every delivery, accepted or not, is recorded and audited. An unknown source answers 404. Answers 202 with received and the detections.

Route: /v1/soc/webhooks/{source} (POST).

NameTypeDefaultRequiredDescription
sourcestringyesDetector: falco, tetragon or opensearch.
payloadstring | Uint8ArrayyesRaw signed JSON body (application/octet-stream): one event or a list of events of the detector.
optsCallOptionsnoPer call options (query, idempotency key, traceparent, headers).

Raises: the typed errors of the transport (Errors).