Skip to content

Add NVIDIA OpenShell pack - #46497

Merged
MosheEichler merged 11 commits into
demisto:contrib/nkanon_nvidia-openshell-responsefrom
nkanon:nvidia-openshell-response
Nov 16, 2026
Merged

MosheEichler merged 11 commits into
demisto:contrib/nkanon_nvidia-openshell-responsefrom
nkanon:nvidia-openshell-response

Conversation

@nkanon

@nkanon nkanon commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

New NVIDIA OpenShell pack. NVIDIA OpenShell runs AI agents in isolated sandboxes and enforces a
network and credential policy for each agent. This pack lets a playbook or an analyst contain an
agent through the OpenShell gateway.

The pack is named for OpenShell as a whole so more content can be added to it later
(for example data normalization content from the content team).

Content items

  • Integration "NVIDIA OpenShell": stop, start, suspend and resume a sandbox; block egress to a host;
    remove policy rules, endpoints and binaries; detach credential providers; get sandbox logs, policy and policy history.
  • Playbook "NVIDIA OpenShell - Contain AI Agent Sandbox": gets the sandbox state and recent logs, waits for
    analyst approval, stops the sandbox and verifies that it stopped.

Requirements

  • OpenShell gateway 0.1.6 or later.
  • An engine that can reach the gateway (the gateway is usually private).
  • Gateway mTLS credentials or an OIDC bearer token.

Notes

  • Pack folder renamed from NVIDIA_OpenShell_Response to NVIDIA_OpenShell.
  • Fixes ST110 structure errors in the playbook (nexttasks) and integration (autoUpdateDockerImage placement, supportlevelheader).

Related

relates: https://jira-dc.paloaltonetworks.com/browse/CIAC-19158

@content-bot content-bot added Contribution Thank you! Contributions are always welcome! External PR Community Support Level Indicates that the contribution is for Community supported pack labels Nov 5, 2026
@content-bot
content-bot changed the base branch from master to contrib/nkanon_nvidia-openshell-response November 5, 2026 12:00
@content-bot

Copy link
Copy Markdown
Contributor

Thank you for your contribution. Your generosity and caring are unrivaled! Make sure to register your contribution by filling the Contribution Registration form, so our content wizard @kamalq97 will know the proposed changes are ready to be reviewed.
For your convenience, here is a link to the contributions SLAs document.

@content-bot

Copy link
Copy Markdown
Contributor

Hi @nkanon, thanks for contributing to the XSOAR marketplace. To receive credit for your generous contribution please follow this link.

@content-bot

Copy link
Copy Markdown
Contributor

🤖 AI-Powered Code Review Available

Hi @kamalq97, @Benimanela, you can leverage AI-powered code review to assist with this PR!

Available Commands:

  • @marketplace-ai-reviewer start review - Initiate a full AI code review
  • @marketplace-ai-reviewer re-review - Incremental review for new commits

@content-bot content-bot added Community Contribution Form Filled Whether contribution form filled or not. labels Nov 5, 2026
@MosheEichler MosheEichler reopened this Nov 10, 2026
@MosheEichler
MosheEichler marked this pull request as ready for review November 10, 2026 09:36
@nkanon nkanon changed the title Add NVIDIA OpenShell Response pack NVIDIA OpenShell: content pack for Cortex XSIAM Nov 10, 2026
Consolidate NVIDIA OpenShell into one pack: integration and containment playbook,
plus parsing rule, modeling rule (0.1.8 sandbox attribution, plain OCSF JSON input)
and dashboard. Fixes ST110 structure errors in the playbook, integration and dashboard.
@nkanon nkanon mentioned this pull request Nov 10, 2026
2 of 5 tasks
Remove the parsing rule, modeling rule and dashboard; the content team will add data
normalization content to this pack separately.
@nkanon nkanon changed the title NVIDIA OpenShell: content pack for Cortex XSIAM Add NVIDIA OpenShell pack Nov 10, 2026
@MosheEichler
MosheEichler removed the request for review from kamalq97 November 10, 2026 12:43
@MosheEichler MosheEichler self-assigned this Nov 10, 2026
@MosheEichler MosheEichler added ready-for-instance-test In contribution PRs, this label will cause a trigger of a build with a modified pack from the PR. ready-for-ai-review The PR is ready for reviewing the PR with the AI Reviewer. labels Nov 10, 2026
@marketplace-ai-reviewer marketplace-ai-reviewer removed the ready-for-ai-review The PR is ready for reviewing the PR with the AI Reviewer. label Nov 10, 2026
@marketplace-ai-reviewer

Copy link
Copy Markdown
Contributor

🤖 Analysis started. Please wait for results...

@content-bot

Copy link
Copy Markdown
Contributor

For the Reviewer: Trigger build request has been accepted for this contribution PR.

@content-bot

Copy link
Copy Markdown
Contributor

For the Reviewer: Successfully created a pipeline in GitLab with url: https://gitlab.xdr.pan.local/xdr/cortex-content/content/-/pipelines/14599740

@content-bot content-bot removed the ready-for-instance-test In contribution PRs, this label will cause a trigger of a build with a modified pack from the PR. label Nov 10, 2026
@MosheEichler

MosheEichler commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Hey @nkanon
Thank you for your contribution :)

Review

The code is clean and small, the integration README matches the YAML, and the unit tests build real protobuf messages from the SDK. Comments below.

Blocking

  1. openshell-egress-block-host is not atomic and may not block everything (NVIDIAOpenShell.py L364-374):
    • It sends one UpdateConfig call per (rule, port). Each call creates a new policy version. If a later call fails, the earlier removals stay applied, the command errors out, and the results of the successful calls are lost. The analyst is left with a half-blocked host and no record of what changed.
    • merge_operations is a repeated field, so all removals can go in one UpdateConfigRequest. That gives one revision and all-or-nothing behaviour.
    • It splits multi-port endpoints into one call per port. Please confirm that removing port 443 from an endpoint with ports=[443, 8443] behaves as expected on the gateway. Sending port=0 once per rule is simpler if it really means "any port", as the argument description says.
    • Matching is exact (r["Host"].lower() == host). Wildcard allow entries such as *.example.com are skipped, and the command then reports "Nothing to remove" while the host is still reachable. This is a containment action, so a false "already blocked" is a real risk. At minimum, the output should list any wildcard rules that still match the host.

Should fix

  1. The OIDC bearer token parameter is a static access token. OIDC access tokens usually expire within minutes to hours, so the instance will start failing with UNAUTHENTICATED. Either support a refresh flow (client credentials) or state in the parameter's description that the token must be long-lived.
  2. TLS without a CA: when plaintext=false and no certificates are set, the code passes TlsConfig(None, None, None). Please confirm the SDK then falls back to system root certificates (needed for bearer-token-only gateways) and doesn't crash.
  3. The default endpoint 127.0.0.1:17670 is misleading. In a Cortex container, localhost is the container itself. The required parameter should have no default, or an example in additionalinfo. The description file already explains the host-networking workaround.
  4. CodeQL "clear-text storage of sensitive information" (NVIDIAOpenShell.py L45). This is mostly mitigated: the key is written into a TemporaryDirectory with mode 0600 and deleted right after the channel is built. The alert should be dismissed with that explanation, or avoided by passing the PEM bytes in memory if the SDK or grpc.ssl_channel_credentials supports it.

Playbook

  1. Contradictory output: the playbook declares OpenShell.Sandbox.Action as an output, but the final "Verify the sandbox stopped" task runs openshell-sandbox-get, which writes the same Sandbox entry without Action. Depending on how the context merges, Action may disappear. Either drop it from the outputs or don't rely on it.
  2. A failed stop has no handling. If the stop times out after 120s, the playbook errors out with no manual fallback. Consider continueonerror on the stop task, leading to a manual task.
  3. Nits: output types are lowercase string (should be String). The manual condition task "Stop the sandbox?" works but has no message or ask configuration, so nobody gets notified that approval is waiting.

Nits

  • pack_metadata.json uses the Endpoint category; Cloud Services or Network Security may fit better. url and email are empty; a support contact is nice to have even for community support.
  • sandbox_list_command fetches every page before applying limit. That's fine for now, but worth knowing on big gateways.
  • normalize_pem removes all whitespace inside a block, which would break legacy encrypted keys with Proc-Type: / DEK-Info: headers. This is an edge case and could just be documented.

@MosheEichler MosheEichler added the pending-contributor The PR is pending the response of its creator label Nov 10, 2026
@marketplace-ai-reviewer

Copy link
Copy Markdown
Contributor
🤖 AI Review Disclaimer

This review was generated by an AI-powered tool and may contain inaccuracies. Please be advised, and we extend our sincere apologies for any inconvenience this may cause.

@marketplace-ai-reviewer marketplace-ai-reviewer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there! Thanks for contributing the NVIDIA OpenShell integration.

Overall, the integration is well-structured, but there are a few key areas that need attention before we can merge:

  • Documentation & Command Examples: The README.md is missing required command examples, context data, and human-readable outputs across most commands; please update command_examples.txt with all missing commands and re-run demisto-sdk generate-docs. Also, ensure command-specific guidance in the description file is relocated to the README.md.
  • Configuration & Metadata: Adjust the configuration parameters in the integration YAML to follow standard ordering, update credential display keys, and add the missing supportlevelheader field.
  • Code Adjustments & Asset Quality: Include proper error traceback logging in main(), add the missing type hint, and re-align or fix the contrast on the integration logo image.

Please take a look at the suggested updates, and let us know if you have any questions!

Additionally, please address the following file-level notes:

  • Packs/NVIDIA_OpenShell/Integrations/NVIDIAOpenShell/command_examples.txt: The command_examples.txt file does not cover all commands defined in NVIDIAOpenShell.yml. Please include examples for the following missing commands, ensuring all required parameters are provided:
  • !openshell-sandbox-suspend name=agent-1
  • !openshell-sandbox-resume name=agent-1
  • !openshell-sandbox-delete name=agent-1 confirm=yes
  • !openshell-policy-rule-remove name=agent-1 rule_name=allow-web
  • !openshell-policy-endpoint-remove name=agent-1 rule_name=allow-web host=files.example.com
  • !openshell-policy-binary-remove name=agent-1 rule_name=allow-web binary_path=/usr/bin/curl
  • !openshell-provider-detach name=agent-1 provider=vault confirm=yes
  • Packs/NVIDIA_OpenShell/Integrations/NVIDIAOpenShell/NVIDIAOpenShell_image.png: The logo image appears visually unbalanced and may have contrast/visibility issues. The NVIDIA icon is positioned on the far left, while the right two-thirds of the image is completely dark/empty. If the NVIDIA wordmark is present to the right of the icon, it is rendered in black and is invisible against the dark background. Please ensure the full logo has adequate contrast, or if only the icon is intended, center it within the canvas.

@github-advanced-security[bot], @Benimanela, @MosheEichler please review and approve the results generated by the AI Reviewer by responding 👍 on this comment.

}


def workspace_scope(workspace: str):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a return type annotation to workspace_scope.

Suggested change
def workspace_scope(workspace: str):
def workspace_scope(workspace: str) -> datamodel_pb2.WorkspaceSelector:

return_results(COMMANDS[command](client, args))
else:
raise NotImplementedError(f"Command {command} is not implemented.")
except Exception as e:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log the exception traceback with demisto.debug(traceback.format_exc()) before calling return_error(), and pass error=e into return_error().

Suggested change
except Exception as e:
except Exception as e:
demisto.debug(traceback.format_exc())
return_error(f"Failed to execute {command} command.\nError:\n{format_error(e)}", error=e)

required: true
section: Connect
additionalinfo: The OpenShell gateway gRPC endpoint. The gateway is usually private, so run this integration on an engine that can reach it.
- display: Workspace

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workspace parameter is placed above the credential parameters (ca_cert, client_cert, client_key, bearer_token). Configuration parameters should follow standard ordering:

  1. Server URL / Endpoint
  2. Credentials / API Key
  3. Proxy settings
  4. Certificate / SSL settings
  5. Fetch configuration
  6. Incident type mapping
  7. Other functional parameters

Please move workspace below the credentials and TLS configuration parameters.

required: false
section: Connect
additionalinfo: The default OpenShell workspace for commands that do not specify one.
- display: Gateway CA certificate

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For type: 9 credential parameters with hiddenusername: true, displaypassword should be used instead of display. Please remove display: Gateway CA certificate. This also applies to client_cert (line 33), client_key (line 41), and bearer_token (line 49).

description: The sandbox name.
type: String
- contextPath: OpenShell.Log.Time
description: The event time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: The event time.
description: The event time in ISO 8601 format (e.g., 2024-01-15T12:34:56Z).

| OpenShell.PolicyChange.PolicyHash | String | The hash of the new policy. |
| OpenShell.PolicyChange.Change | String | A summary of the change. |

### openshell-policy-rule-remove

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ### openshell-policy-rule-remove command section is missing the required #### Command example, #### Context Example, and #### Human Readable Output sections. Please add an example execution (such as !openshell-policy-rule-remove name="sandbox-1" rule_name="rule1") to command_examples.txt and regenerate the documentation using demisto-sdk generate-docs. Refer to Command Examples - Integration Documentation for details.

| OpenShell.PolicyChange.PolicyHash | String | The hash of the new policy. |
| OpenShell.PolicyChange.Change | String | A summary of the change. |

### openshell-policy-endpoint-remove

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ### openshell-policy-endpoint-remove command section is missing the required #### Command example, #### Context Example, and #### Human Readable Output sections. Please add an example execution (such as !openshell-policy-endpoint-remove name="sandbox-1" rule_name="rule1" host="files.example.com") to command_examples.txt and regenerate the documentation using demisto-sdk generate-docs. Refer to Command Examples - Integration Documentation for details.

| OpenShell.PolicyChange.PolicyHash | String | The hash of the new policy. |
| OpenShell.PolicyChange.Change | String | A summary of the change. |

### openshell-policy-binary-remove

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ### openshell-policy-binary-remove command section is missing the required #### Command example, #### Context Example, and #### Human Readable Output sections. Please add an example execution (such as !openshell-policy-binary-remove name="sandbox-1" rule_name="rule1" binary_path="/usr/bin/curl") to command_examples.txt and regenerate the documentation using demisto-sdk generate-docs. Refer to Command Examples - Integration Documentation for details.

| OpenShell.PolicyChange.PolicyHash | String | The hash of the new policy. |
| OpenShell.PolicyChange.Change | String | A summary of the change. |

### openshell-provider-list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ### openshell-provider-list command section is missing the required #### Command example, #### Context Example, and #### Human Readable Output sections. Please add an example execution (such as !openshell-provider-list name="sandbox-1") to command_examples.txt and regenerate the documentation using demisto-sdk generate-docs. Refer to Command Examples - Integration Documentation for details.

| OpenShell.Provider.Type | String | The provider type. |
| OpenShell.Provider.Workspace | String | The provider profile workspace. |

### openshell-provider-detach

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ### openshell-provider-detach command section is missing the required #### Command example, #### Context Example, and #### Human Readable Output sections. Please add an example execution (such as !openshell-provider-detach name="sandbox-1" provider="vault" confirm=yes) to command_examples.txt and regenerate the documentation using demisto-sdk generate-docs. Refer to Command Examples - Integration Documentation for details.

- openshell-egress-block-host: one atomic UpdateConfig for all removals (port 0 per rule),
  and report wildcard entries that still allow the host
- Create TLS files with mode 0600 at creation; log traceback in main
- Remove localhost default endpoint; document long-lived OIDC token and system trust store
- Reorder and fix credential params; move safety notes to README; add command examples
- Playbook: approval message, error path from stop to manual task, drop Action output, String type
- Tests for atomic update, wildcard reporting and TLS without certificates
@nkanon

nkanon commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review. All points are addressed in e0cbf95.

Blocking

  1. openshell-egress-block-host now sends a single UpdateConfigRequest with all removals in merge_operations. That means one policy revision and all-or-nothing behaviour. It sends port=0 once per matching rule instead of splitting by port. Wildcard allow entries that match the host (for example *.example.com) are not removed. They are listed in OpenShell.EgressBlock.WildcardMatches, and the readable output warns that the host may still be reachable. New tests cover the single atomic update, failure leaving the policy unchanged, wildcard-only matches, and a host that isn't allowed.

Should fix

  1. The bearer token description now says the token must be long-lived (or rotated in the instance), because there is no refresh flow. Client credentials refresh can come in a follow-up.
  2. Confirmed. With no certificates, TlsConfig() uses the system root store. A unit test now covers this.
  3. Removed the 127.0.0.1:17670 default. The parameter is required, with an example in additionalinfo.
  4. The TLS key and cert files are now created with os.open(..., O_CREAT | O_EXCL, 0o600) inside a TemporaryDirectory, so they are never world-readable, and they are deleted once the channel is built. The SDK takes file paths, not PEM bytes, so an in-memory option isn't available yet.

Playbook

  1. Removed the OpenShell.Sandbox.Action output.
  2. The stop task has an error path to the manual containment task, which now lists fallback steps.
  3. Output type is now String. The approval task has an ask message with Yes/No replies.

Other

  • Credential params reordered and use displaypassword. Safety notes moved from the description file to the README. command_examples.txt covers all commands. main logs the traceback.
  • supportlevelheader is left out on purpose. demisto-sdk 1.38 rejects community as a value, and the pack is community-supported through pack_metadata.json.
  • The README command examples with real outputs need a gateway on OpenShell 0.1.6 or later. I'll add them once I've run the commands against one.
  • Nits not changed in this commit: the Endpoint category, empty url/email, sandbox-list fetching all pages before limit, and normalize_pem with legacy encrypted keys. Happy to change any of them if you prefer.
  • Unit tests (41) pass, and demisto-sdk validate passes, including ST110 and the playbook checks.

- New pack README: why, how it connects, response ladder, playbook flow, war room examples, setup
- Add banner, architecture and response ladder images
@nkanon

nkanon commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Added a full pack README in 81c16a7, and merged your base update in dde41a3 (no conflicts).

The README now covers:

  • Why the pack exists and what it controls in an OpenShell sandbox.
  • An architecture diagram: Cortex, the engine, gRPC with mTLS or OIDC, the gateway and sandboxes.
  • A response ladder from investigation to deletion, with what is reversible at each step.
  • The playbook flow and inputs, war room examples, setup requirements and known limitations.

New images are in doc_files/ (banner, architecture, response ladder). demisto-sdk validate passes, including the README checks.

@MosheEichler

Copy link
Copy Markdown
Contributor

Hi @nkanon, I moved the NVIDIA OpenShell - Contain AI Agent Sandbox playbook out of this PR and into #46625. The playbook needs a security review, and splitting it out lets the integration move forward without waiting for that review. The playbook itself is unchanged and will be merged after this PR.

I pushed the change to your branch, so please pull before you push again, so the playbook files don't come back here.

@MosheEichler
MosheEichler merged commit 3751296 into demisto:contrib/nkanon_nvidia-openshell-response Nov 16, 2026
28 of 30 checks passed
@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Your external PR has been merged and the changes are now included in one or more internal PRs for further review.

Note

Contributions containing XSIAM content (Modeling Rules, Parsing Rules, Correlation Rules, or Dashboards) are subject to an additional review process and may take longer to be merged to master.

MosheEichler added a commit that referenced this pull request Nov 17, 2026
* Add NVIDIA OpenShell Response pack

* Apply content team review conventions to NVIDIA OpenShell Response

* Add playbook image for NVIDIA OpenShell - Contain AI Agent Sandbox

* Merge OpenShell Response into the NVIDIA OpenShell pack

Consolidate NVIDIA OpenShell into one pack: integration and containment playbook,
plus parsing rule, modeling rule (0.1.8 sandbox attribution, plain OCSF JSON input)
and dashboard. Fixes ST110 structure errors in the playbook, integration and dashboard.

* Keep only response content in the NVIDIA OpenShell pack

Remove the parsing rule, modeling rule and dashboard; the content team will add data
normalization content to this pack separately.

* Address review comments on NVIDIA OpenShell

- openshell-egress-block-host: one atomic UpdateConfig for all removals (port 0 per rule),
  and report wildcard entries that still allow the host
- Create TLS files with mode 0600 at creation; log traceback in main
- Remove localhost default endpoint; document long-lived OIDC token and system trust store
- Reorder and fix credential params; move safety notes to README; add command examples
- Playbook: approval message, error path from stop to manual task, drop Action output, String type
- Tests for atomic update, wildcard reporting and TLS without certificates

* Add NVIDIA OpenShell pack README with diagrams

- New pack README: why, how it connects, response ladder, playbook flow, war room examples, setup
- Add banner, architecture and response ladder images

* Move the NVIDIA OpenShell playbook to a separate PR

---------

Co-authored-by: Nadav Kanon <109467661+nkanon@users.noreply.github.com>
Co-authored-by: Moshe Eichler <78307768+MosheEichler@users.noreply.github.com>
Co-authored-by: MosheEichler <meichler@paloaltonetworks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Support Level Indicates that the contribution is for Community supported pack Community Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! docs-approved External PR pending-contributor The PR is pending the response of its creator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants