NVIDIA / NVIDIA/OpenShell

feat(cli): warn when --env values look like credentials

Open
#2,548 4 comments 0 reactions 1 assignee View on GitHub

@letv1nnn is already working on this.

Since Aug 3, 2026.

area:cli area:providers topic:security
Dominant language
Rust
Stars
8.7k
Forks
1.3k
Avg merge
2d 11h
Merged PRs (30d)
253

Description

Problem Statement

openshell sandbox create --env JIRA_API_TOKEN=<real-token> accepts credential values without any warning. The agent inside the sandbox can read these values directly. The secure alternative — using a provider profile — exists but the CLI gives no indication that a better option is available.

The insecure path (--env) is frictionless. The secure path (providers) requires knowing about providers v2, the profile schema, and the import/create/attach workflow. Developers and AI agents building workflows take the path of least resistance.

Proposed Design

When openshell sandbox create receives --env flags with keys that look like credentials, emit an informational warning:

$ openshell sandbox create --env JIRA_API_TOKEN=xyzabc123 ...

⚠ JIRA_API_TOKEN looks like a credential passed as a plain environment variable.
  The agent inside the sandbox can read this value directly.

  To hide this credential from the agent, use a provider instead:
    openshell provider create --name my-jira --type jira --credential JIRA_API_TOKEN
    openshell sandbox create --provider my-jira ...

  See: https://docs.nvidia.com/openshell/latest/sandboxes/providers-v2
Detection heuristic

Warn when an --env key matches any of:

  • *_TOKEN, *_API_KEY, *_SECRET, *_PASSWORD, *_CREDENTIAL
  • *_ACCESS_KEY, *_SECRET_KEY
  • Known credential env var names from built-in profiles (e.g., GITHUB_TOKEN, NVIDIA_API_KEY, JIRA_API_TOKEN)
Behavior
  • Warning is informational only — does not block sandbox creation
  • Suppressible with --no-credential-warnings for legitimate use cases
  • When a matching built-in profile exists, the warning suggests the specific provider create command
  • When no profile matches, the warning links to the custom profile docs
Dependencies
  • Better experience if NVIDIA/OpenShell#2547 lands first (built-in Jira/MLflow profiles to suggest in warnings)
  • Better experience if NVIDIA/OpenShell#2545 lands first (providers v2 default-on so the suggested path works without extra setup)

Motivation

In opendatahub-io/agent-ops#7, JIRA_API_TOKEN and MLFLOW_TRACKING_TOKEN were passed as raw env vars. Neither the developer nor the AI agent building the workflow received any signal that a secure alternative existed.

Prior Art

  • GitHub push protection — warns when a push contains credential-like strings
  • npm audit — security warnings at the moment of decision
  • Kubernetes Pod Security Admission — warns on insecure pod configurations

Agent Investigation

  • --env flag parsed in crates/openshell-cli/src/main.rs under sandbox create
  • Built-in profile credential env var names available via builtin_profiles() in crates/openshell-providers/src/profiles.rs
  • Warning should be emitted in CLI before the CreateSandbox RPC call

Checklist

  • Searched for existing issues — no issue tracks credential warnings in CLI
  • Design includes suppression flag for false positives

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.