Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[MODEL: dataset="nvidia_openshell_raw"]
alter
// Extract metadata fields
get_metadata_version = metadata -> version,
get_product_name = metadata -> product.name,
get_product_version = metadata -> product.version,
get_event_uid = metadata -> uid,
Expand All @@ -10,7 +9,7 @@ alter
get_device_os = device -> os.name,
get_device_type = device -> type,
// Extract sandbox fields
get_sandbox_id = coalesce(device -> container.uid, unmapped -> sandbox_id, container -> uid),
get_sandbox_id = coalesce(device -> container.uid, unmapped -> sandbox_id, container -> uid, if(user -> type = "Sandbox", user -> uid, null)),
get_sandbox_name = coalesce(device -> container.name, unmapped -> sandbox_name, container -> name),
// Extract endpoint fields
get_dst_domain = dst_endpoint -> domain,
Expand All @@ -24,6 +23,11 @@ alter
get_actor_proc_name = actor -> process.name,
get_actor_proc_pid = to_integer(actor -> process.pid),
get_actor_cmd_line = actor -> process.cmd_line,
get_actor_user_uid = actor -> user.uid,
// Extract user fields
get_user_uid = user -> uid,
get_user_name = user -> name,
get_user_type_id = to_integer(user -> type_id),
// Extract firewall rule fields
get_fw_rule_name = firewall_rule -> name,
// Extract HTTP request fields
Expand Down Expand Up @@ -57,6 +61,7 @@ alter
// Log level from severity
get_log_level = if(
severity = "Informational", XDM_CONST.LOG_LEVEL_INFORMATIONAL,
severity = "Low", XDM_CONST.LOG_LEVEL_NOTICE,
severity = "Medium", XDM_CONST.LOG_LEVEL_WARNING,
severity = "High", XDM_CONST.LOG_LEVEL_ERROR,
severity = "Critical", XDM_CONST.LOG_LEVEL_CRITICAL,
Expand Down Expand Up @@ -84,14 +89,14 @@ alter
xdm.event.type = class_name,
xdm.event.original_event_type = type_name,
xdm.event.operation = get_operation,
xdm.event.operation_sub_type = activity_name,
xdm.event.operation_sub_type = if(class_name = "API Activity", coalesce(api -> operation, activity_name), activity_name),
xdm.event.outcome = get_outcome,
xdm.event.outcome_reason = coalesce(status_detail, state),
xdm.event.description = message,
xdm.event.log_level = get_log_level,
// --- Observer (product metadata) ---
xdm.observer.version = get_metadata_version,
xdm.observer.name = get_device_hostname,
xdm.observer.version = get_product_version,
xdm.observer.name = coalesce(device -> name, get_device_hostname),
// --- Source host ---
xdm.source.host.hostname = get_device_hostname,
xdm.source.host.os = get_device_os,
Expand All @@ -100,6 +105,11 @@ alter
xdm.source.process.name = get_actor_proc_name,
xdm.source.process.pid = get_actor_proc_pid,
xdm.source.process.command_line = get_actor_cmd_line,
// --- Source user (gateway principal) ---
xdm.source.user.identifier = coalesce(get_actor_user_uid, if(get_user_type_id = 0, null, get_user_uid)),
xdm.source.identity.identifier = coalesce(get_actor_user_uid, if(get_user_type_id = 0, null, get_user_uid)),
xdm.source.user.username = if(get_user_type_id = 0 or get_user_name = "unknown", null, get_user_name),
xdm.source.identity.username = if(get_user_type_id = 0 or get_user_name = "unknown", null, get_user_name),
// --- Source IP ---
xdm.source.ipv4 = if(get_src_ip != null and is_ipv4(get_src_ip), get_src_ip, null),
xdm.source.ipv6 = if(get_src_ip != null and is_ipv6(get_src_ip), get_src_ip, null),
Expand All @@ -113,7 +123,7 @@ alter
xdm.target.resource.type = if(get_sandbox_id != null or get_sandbox_name != null, "sandbox", null),
// --- Target network ---
xdm.target.domain = get_eff_target_domain,
xdm.target.ipv4 = if(get_dst_ip != null and is_ipv4(get_dst_ip), get_dst_ip, null),
xdm.target.ipv4 = if(get_dst_ip != null and is_ipv4(get_dst_ip) and not incidr(get_dst_ip, "198.18.0.0/15"), get_dst_ip, null),
xdm.target.ipv6 = if(get_dst_ip != null and is_ipv6(get_dst_ip), get_dst_ip, null),
xdm.target.port = get_eff_target_port,
// --- Intermediate (proxy) ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@
"http_request": {
"type": "string",
"is_array": false
},
"api": {
"type": "string",
"is_array": false
},
"user": {
"type": "string",
"is_array": false
},
"resources": {
"type": "string",
"is_array": false
},
"auth_protocol": {
"type": "string",
"is_array": false
}
}
}
104 changes: 74 additions & 30 deletions Packs/NvidiaOpenshell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,101 @@

## Overview

NVIDIA OpenShell is a sandbox supervisor and network proxy product that runs inside containerized workloads. It enforces network policy, monitors outbound connections, and logs security-control events, device-configuration state changes, and SSH/HTTP activity using the Open Cybersecurity Schema Framework (OCSF). OpenShell generates structured JSON events that describe container network activity, policy enforcement decisions, and configuration lifecycle events.
NVIDIA OpenShell runs AI agents in isolated sandboxes. The OpenShell gateway manages sandboxes and authenticates callers, and a supervisor in each sandbox enforces network and process policy. Both emit security events in the Open Cybersecurity Schema Framework (OCSF v1.8.0) as JSON.

## This pack includes

Data normalization capabilities:

- Rules for modeling NVIDIA OpenShell logs that are ingested via the HTTP Collector into Cortex XSIAM.
- A modeling rule that maps NVIDIA OpenShell OCSF events, ingested via the HTTP Log Collector, to the Cortex Data Model (XDM).
- The ingested NVIDIA OpenShell logs can be queried in XQL Search using the *`nvidia_openshell_raw`* dataset.

## Supported log categories
## Supported event classes

| Category | Category Display Name |
|:--------------------------------|:------------------------------|
| network_activity | Network Activity |
| device_config_state_change | Device Config State Change |
| base_event | Base Event |
| ssh_activity | SSH Activity |
| http_activity | HTTP Activity |
| OCSF class | Class name | Emitted by |
|:-----------|:-----------|:-----------|
| 4001 | Network Activity | Sandbox supervisor |
| 4002 | HTTP Activity | Sandbox supervisor |
| 4007 | SSH Activity | Sandbox supervisor |
| 2004 | Detection Finding | Sandbox supervisor |
| 5019 | Device Config State Change | Sandbox supervisor, gateway |
| 3002 | Authentication | Gateway |
| 6003 | API Activity | Gateway |
| 0 | Base Event | Sandbox supervisor |

***

## Data Collection

### NVIDIA OpenShell side
OpenShell writes OCSF JSON locally and does not send it over HTTP itself. Use a log shipper to forward each JSON event to the Cortex XSIAM HTTP Log Collector. Collect both sources below for full coverage. Gateway events and sandbox supervisor events are separate outputs, and enabling one does not enable the other.

1. Ensure the OpenShell Sandbox Supervisor is deployed and running inside your containerized environment.
2. Configure OpenShell to forward OCSF-structured JSON events to an external HTTP endpoint. This is typically done by setting the event-export target in the OpenShell supervisor configuration file (e.g. `supervisor.toml` or equivalent):
- Set the output format to **JSON**.
- Set the destination to the Cortex XSIAM HTTP Log Collector URL obtained in the next section.
- Include the token generated by the collector as an `Authorization` header or as a query parameter, depending on your OpenShell version.
3. Restart the OpenShell supervisor service to apply changes.

For more information, see the official NVIDIA OpenShell documentation.
![How NVIDIA OpenShell events flow into Cortex XSIAM](doc_files/NvidiaOpenshell_data_flow.png)

### Cortex XSIAM side - Custom - HTTP based Collector

1. Navigate to **Settings** → **Data Sources** → **Add Data Source**.
1. Navigate to **Settings** > **Data Sources** > **Add Data Source**.
2. If you have already configured a **Custom - HTTP based Collector**, select the **3 dots**, and then select **+ Add New Instance**. If not, select **+ Add Data Source**, search for "http" and then select **Connect**.
3. Set the following values:

| Parameter | Value |
|:--------------|:------------------------------------|
| `Name` | NVIDIA OpenShell Logs. |
| `Compression` | Select the desired compression. |
| `Log Format` | Select JSON. |
| `Vendor` | Enter nvidia. |
| `Product` | Enter openshell. |
| Parameter | Value |
|:--------------|:--------------------------------|
| `Name` | NVIDIA OpenShell Logs |
| `Compression` | Select the desired compression. |
| `Log Format` | Select JSON. |
| `Vendor` | Enter nvidia. |
| `Product` | Enter openshell. |

4. Save the generated token.
5. Select the **3 dots** next to the new instance and copy the API URL.

Configure the log shipper to send each event as one JSON object per line, with an HTTP POST to the API URL and these headers:

- `Authorization: <token>`
- `Content-Type: text/plain`

For more information, see [Set up an HTTP Log Collector to Receive Logs](https://docs-cortex.paloaltonetworks.com/r/Cortex-XSIAM/Cortex-XSIAM-Administrator-Guide/Set-up-an-HTTP-Log-Collector-to-Receive-Logs).

### NVIDIA OpenShell side - Gateway events

Gateway events include authentication results, API authorization denials and gateway configuration changes.

1. In `gateway.toml`, give the gateway a unique name and enable the OCSF JSONL output:

```toml
[openshell.gateway]
name = "<unique-gateway-name>"

[openshell.gateway.ocsf_log]
path = "/var/log/openshell/gateway-ocsf.jsonl"
rotation = "daily"
max_files = 7
```

2. Restart the gateway to apply the change.
3. Configure the log shipper to read the JSONL file and forward each line to the HTTP Log Collector. The gateway creates the file with owner-only permissions, so grant the shipper read access to it. The shipper must follow rotated files. Give each gateway replica its own file path.

The gateway name appears as `device.name` on every gateway event. Use a distinct name for each installation you collect from.

### NVIDIA OpenShell side - Sandbox supervisor events

Supervisor events include network, HTTP and SSH activity, policy enforcement decisions and detection findings for each sandbox.

1. Enable OCSF JSON output for all sandboxes:

```shell
openshell settings set --global --key ocsf_json_enabled --value true --yes
```

To enable it for a single sandbox instead, run `openshell settings set <sandbox-name> --key ocsf_json_enabled --value true`. A per-sandbox value is rejected while a global value is set. The setting applies on the next poll cycle and does not require a sandbox restart.

2. Each supervisor now writes lines in this format to stderr:

```text
2026-10-07T23:21:19.000Z OCSF-JSON {"class_uid":4001,...}
```

4. Creating a new HTTP Log Collector will allow you to generate a unique token — save it for later.
5. Click the 3 dots next to the newly created instance and copy the API URL.
3. Configure your container log collector (Docker, Podman or Kubernetes) to keep only lines that contain the `OCSF-JSON` token, and forward the JSON object that follows the token to the HTTP Log Collector. Drop the other lines, which are shorthand copies of the same events.

For more information, see this [doc](https://docs-cortex.paloaltonetworks.com/r/Cortex-XSIAM/Cortex-XSIAM-Administrator-Guide/Set-up-an-HTTP-Log-Collector-to-Receive-Logs).
For more information, see the NVIDIA OpenShell [OCSF JSON Export](https://github.com/ai-openshell/openshell/blob/main/docs/observability/ocsf-json-export.mdx) documentation.

</~XSIAM>
20 changes: 20 additions & 0 deletions Packs/NvidiaOpenshell/ReleaseNotes/1_1_0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

#### Modeling Rules

##### NvidiaOpenshell Modeling Rule

<~XSIAM>

- Added the mapping of **xdm.target.ipv4**.
Comment thread
akshotiamit-pa marked this conversation as resolved.
Resolved
- Added the mapping of **xdm.event.log_level**.
- Added the mapping of **xdm.observer.version**.
- Added the mapping of **xdm.source.user.identifier**.
- Added the mapping of **xdm.source.user.username**.
- Added the mapping of **xdm.source.identity.identifier**.
- Added the mapping of **xdm.source.identity.username**.
- Added the mapping of **xdm.target.resource.id**.
- Added the mapping of **xdm.target.resource.type**.
- Added the mapping of **xdm.event.operation_sub_type**.
- Added the mapping of **xdm.observer.name**.

</~XSIAM>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Packs/NvidiaOpenshell/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "NVIDIA OpenShell",
"description": "NVIDIA OpenShell is a sandbox supervisor and network proxy for containerized workloads that logs network activity, policy enforcement and configuration events in OCSF format. This pack provides a modeling rule that maps OpenShell logs to the Cortex Data Model (XDM).",
"support": "xsoar",
"currentVersion": "1.0.0",
"currentVersion": "1.1.0",
"author": "Cortex XSIAM",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
Loading