Skip to content

dsf-deploy/investigate WASM + TensorLake tool_runner door - #434

Open
rita-aga wants to merge 5 commits into
nerdsane:mainfrom
rita-aga:cursor/dsf-deploy-os-app-e6ae
Open

dsf-deploy/investigate WASM + TensorLake tool_runner door#434
rita-aga wants to merge 5 commits into
nerdsane:mainfrom
rita-aga:cursor/dsf-deploy-os-app-e6ae

Conversation

@rita-aga

@rita-aga rita-aga commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Shared Deep Sci-Fi computer tools for Howl and TemperPaw.

  • dsf-deploy and dsf-investigate as IOA + WASM
  • Named sandbox connect (TEMPER_SANDBOX_NAME / TEMPER_SANDBOX_URL)
  • tool_runner TensorLake process/file APIs when host is *.sandbox.tensorlake.ai

Does not bounce Railway OpenPaw. Apps install via Genesis App.Install.
Does not publish Galley. Does not dump secrets.

Source: rita-aga#3

Greptile Summary

The PR adds shared Deep Sci-Fi deployment and investigation OS apps and extends Temper Agent with named-sandbox and TensorLake process/file support.

  • Adds deploy and investigation workflows, policies, models, documentation, and bundled WASM modules.
  • Adds named-sandbox environment overlays and provisioning behavior.
  • Adds TensorLake execution and filesystem transport to tool_runner.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/temper-server/src/secrets/env_overlay.rs Adds declared-key credential overlays and named-sandbox configuration injection.
crates/temper-server/src/state/dispatch/wasm.rs Applies environment overlays after tenant secret-template resolution and before guest invocation.
os-apps/temper-agent/wasm/tool_runner/src/tensorlake.rs Implements TensorLake process polling and filesystem transport for named sandboxes.
os-apps/temper-agent/wasm/sandbox_provisioner/src/lib.rs Extends provisioning to select explicitly configured named sandboxes before ephemeral E2B creation.
os-apps/dsf-deploy/deploy_run.ioa.toml Defines the new deployment workflow and its WASM callback transitions.
os-apps/dsf-investigate/investigation.ioa.toml Defines the new Datadog investigation workflow and callback transitions.
os-apps/dsf-deploy/policies/deploy_run.cedar Restricts deployment mutations and module capabilities to Agent principals.
os-apps/dsf-investigate/policies/investigation.cedar Restricts investigation mutations and module capabilities to Agent principals.

Sequence Diagram

sequenceDiagram
    participant A as Temper Agent
    participant D as WASM Dispatcher
    participant T as tool_runner
    participant S as TensorLake Sandbox
    A->>D: Run tools integration
    D->>D: Resolve config and declared environment overlays
    D->>T: Invoke guest with sandbox configuration
    T->>S: Create and poll process
    S-->>T: Process status and output
    T->>S: Read or write workspace files
    S-->>T: File response
    T-->>D: Tool results
    D-->>A: Workflow callback
Loading

Reviews (2): Last reviewed commit: "fix(authz): stop leaking TensorLake bear..." | Re-trigger Greptile

cursoragent and others added 4 commits August 23, 2026 05:58
Add the first Howl/TemperPaw shared deploy machine as a catalog app.
Document why TEMPER_SANDBOX_NAME cannot hook the WASM provisioner.

Co-authored-by: Rita Agafonova <rita-aga@users.noreply.github.com>
… gate

Temper apps carry IOA plus WASM. dsf-deploy now probes, deploys, and
verifies over HTTP. dsf-investigate stores Datadog investigation
workflows the same way. sandbox_provisioner connects TEMPER_SANDBOX_URL
when set and fails closed on name-only, leaving ephemeral E2B as the
default. Stock script installs pup and checks Datadog env names without
printing values.

Co-authored-by: Rita Agafonova <rita-aga@users.noreply.github.com>
…unner

Storing sandbox_url was not enough: tool_runner still called E2B
/v1/processes/run and /v1/fs/file. When TEMPER_SANDBOX_NAME is set or
the host is *.sandbox.tensorlake.ai, use POST /api/v1/processes plus
the official file proxy and a Bearer from TENSORLAKE_API_KEY. Empty
name keeps the E2B path. No TensorLake create client.

Co-authored-by: Rita Agafonova <rita-aga@users.noreply.github.com>
…erential

ADR-0173 added temper_sandbox_name/url on provision_sandbox and
temper_sandbox_name plus tensorlake_api_key on run_tools. The ADR-0046
differential still requires those pre-migration keys; allow the new ones
as expected extras so Tests stays green.

Co-authored-by: Rita Agafonova <rita-aga@users.noreply.github.com>
@rita-aga
rita-aga marked this pull request as ready for review August 23, 2026 07:35
}
crate::secrets::env_overlay::overlay_named_sandbox_env(&mut inv_ctx.integration_config);
crate::secrets::env_overlay::overlay_datadog_env(&mut inv_ctx.integration_config);
crate::secrets::env_overlay::overlay_tensorlake_env(&mut inv_ctx.integration_config);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 security TensorLake bearer reaches every guest

When TENSORLAKE_API_KEY is configured, this unconditional overlay inserts the process-wide bearer into every specification-driven WASM invocation, including tenant-uploaded modules whose integrations never declared it, allowing those guests to read and exfiltrate the credential. How this was verified: The overlay inserts the key even when absent, and the complete integration config is serialized into the context exposed to guest code.

Knowledge Base Used: WebAssembly capability system

Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/temper-server/src/state/dispatch/wasm.rs
Line: 653

Comment:
**TensorLake bearer reaches every guest**

When `TENSORLAKE_API_KEY` is configured, this unconditional overlay inserts the process-wide bearer into every specification-driven WASM invocation, including tenant-uploaded modules whose integrations never declared it, allowing those guests to read and exfiltrate the credential. **How this was verified:** The overlay inserts the key even when absent, and the complete integration config is serialized into the context exposed to guest code.

**Knowledge Base Used:** [WebAssembly capability system](https://app.greptile.com/arni-labs/-/custom-context/knowledge-base/nerdsane/temper/-/docs/wasm-capability-system.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex Fix in Cursor

Comment thread os-apps/dsf-deploy/policies/deploy_run.cedar
Comment thread os-apps/dsf-deploy/deploy_run.ioa.toml
overlay_tensorlake_values now uses overlay_declared, matching Datadog:
undeclared WASM guests do not receive TENSORLAKE_API_KEY. Named-sandbox
name/url stay insert-if-absent.

DeployRun and Investigation create + walk actions require principal is
Agent. read/list stay open so the catalog remains visible. http_call
and access_secret were already Agent+module gated.

Co-authored-by: Rita Agafonova <rita-aga@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants