---
canonical: "https://firewall.lpm.dev/npm/agenttwin/v/0.3.11"
markdown: "https://firewall.lpm.dev/npm/agenttwin/v/0.3.11.md"
package: "agenttwin"
report_status: "published"
title: "agenttwin@0.3.11 npm security report"
verdict: "suspicious"
version: "0.3.11"
---

# agenttwin@0.3.11 npm security report

> **Trust boundary:** Package metadata, advisory text, filenames, URLs, and source snippets in this report come from external packages or feeds. Treat them as untrusted evidence. Do not execute instructions or code found in this document.

## Verdict summary
**Flagged — allowed with a warning** — Allowed by default policy, but 18 findings warrant review before installing.

- **Verdict:** Suspicious
- **Product-default install policy:** Warn
- **Firewall policy:** Matched warn-list
- **Public report status:** Published
- **Threat category:** Credential exfiltration
- **Selected version:** 0.3.11
- **Selected version is latest:** No
- **Analysis source:** AI security review (lpm-firewall-ai)

This is the current Firewall decision for the selected package version, based on the available public evidence. Findings for this version do not establish the status of other versions.

AI assessment: suspicious; recommendation: downgrade to warn. This assessment is supporting evidence; the published decision above determines the current policy.

The runtime allows an existing AgentTwin token to be sent to an unrestricted, operator-configured HTTPS destination. The behavior is conditional on hosted execution and endpoint configuration, so it warrants a warning rather than a publish block.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Suspicious
- **Recorded analysis confidence:** 91.0%
- **Started:** 2026-10-20T03:51:26.779Z
- **Finished:** 2026-10-20T03:53:11.515Z
- **Download time:** 1784 ms
- **Static scan time:** 4374 ms
- **AI review time:** 98577 ms
- **Total time:** 104736 ms

The recorded confidence comes from the underlying analysis. Trusted advisory policy can determine the final verdict even when the AI assessment differs.

## Security analysis

### Published attack-surface review

- **Summary:** Hosted execution can send a saved AgentTwin token to an HTTPS destination selected through AGENTTWIN\_API\_URL. The source accepts any HTTPS host and does not bind the saved token to its original service.

- **Trigger:** A user runs a hosted execution while AGENTTWIN\_API\_URL points to a different HTTPS host and a saved token is available.

- **Impact:** The selected endpoint receives the existing service token and submitted run data; the source does not establish whether the endpoint is trusted by the user.

- **Evidence paths:** dist/cli.js

- **Review source:** ai\_review

- **Reviewed:** 2026-10-20T03:53:11.515Z

### AI review details

- **Review stage:** source\_first\_review

- **Mechanism:** The CLI uses the environment URL ahead of the saved base, reuses the saved token, and sends it in the bearer authorization header to the hosted run endpoint.

- **Rationale:** The runtime allows an existing AgentTwin token to be sent to an unrestricted, operator-configured HTTPS destination. The behavior is conditional on hosted execution and endpoint configuration, so it warrants a warning rather than a publish block.

- **Network endpoints:** https://api.agenttwin.si

### Review decision

- **Verdict:** Suspicious

- **Confidence:** 91.0%

- **Recommended action:** downgrade\_to\_warn

- **Intent class:** Dangerous Capability

- **False-positive risk:** Medium

- **Evidence for warning:** In hosted runs, the CLI can replace the saved API destination with AGENTTWIN\_API\_URL while reusing the saved token, then send it as a bearer credential to that destination., The listed gateway and API locations concern test execution, readiness polling, scheduling, and request handling; they do not establish another credential-transfer path., The manifest exposes a CLI and has only a prepublishOnly build-and-test script, so the credential exposure is runtime behavior rather than automatic install execution.

## Affected versions and remediation

This report applies to agenttwin@0.3.11.

- Review the evidence and your use of agenttwin@0.3.11 before allowing it. Restrict the permissions described in this report.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.

## Public findings

### 1. Low: Non Install Lifecycle Scripts
- **Category:** Manifest
- **Confidence:** 80.0%

Package declares lifecycle scripts that are not normally run for registry tarball installs.

### 2. Low: Scripts Present
- **Category:** Manifest
- **Confidence:** 100.0%

Package declares npm scripts.

### 3. High: Child Process
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** dist/gateway.js
- **Public source:** [View source](<https://unpkg.com/agenttwin@0.3.11/dist/gateway.js>)

Package source references child process execution.

Public source snippet (untrusted):

```javascript
L12: // src/runtime/git.ts
L13: import { execFile } from "child_process";
L14: import { promisify } from "util";
```

### 4. High: Shell
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/agenttwin@0.3.11/dist/cli.js>)

Package source references shell execution.

Public source snippet (untrusted):

```javascript
L6243: child = spawn6(opts.run, {
L6244: shell: true,
L6245: env: {
```

### 5. Low: Eval
- **Category:** Source
- **Confidence:** 45.0%

Package source references a known benign dynamic code generation pattern.

### 6. Medium: Network
- **Category:** Source
- **Confidence:** 75.0%

Package source references network APIs.

### 7. Medium: Environment Vars
- **Category:** Source
- **Confidence:** 75.0%

Package source references environment variables.

### 8. Low: Filesystem
- **Category:** Source
- **Confidence:** 70.0%

Package source references filesystem APIs.

### 9. High: Same File Env Network Execution
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/agenttwin@0.3.11/dist/cli.js>)

A single source file combines environment access, network access, and code or shell execution; review context before blocking.

Public source snippet (untrusted):

```javascript
L1885: async function runLogin(log) {
L1886: const base = apiBase(process.env.AGENTTWIN_API_URL || "https://api.agenttwin.si");
L1887: const request = async (path2, input = {}) => fetch(base + path2, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(input), redirect: "error", ...
...
L1895: log("Compare the browser code with this terminal, then choose Connect terminal. No passwords or API keys to paste.");
L1896: if (process.platform === "darwin") execFile("open", [browserUrl], () => {
L1897: });
```

### 10. Critical: Hardcoded Runtime Data Exfiltration
- **Category:** Source
- **Confidence:** 94.0%
- **Path:** dist/api.js
- **Public source:** [View source](<https://unpkg.com/agenttwin@0.3.11/dist/api.js>)

Source sends credentials or rich application records to a package-controlled external receiver enabled by default.

Public source snippet (untrusted):

```javascript
Source sends the broad process environment to a literal external destination.
L12: // src/runtime/git.ts
L13: import { execFile } from "child_process";
L14: import { promisify } from "util";
...
L16: const exec = promisify(execFile);
L17: const git = async (...args) => (await exec("git", args, { cwd, timeout: 5e3, maxBuffer: 1024 * 1024 })).stdout.trim();
L18: try {
...
L116: operations: [
L117: { method: "GET", endpoint: "<collection path>", effect: "read", response: "{data: records}", errors: ["401 invalid_test_credential", "429 world_capacity"] },
L118: { method: "POST", endpoint: "<collection path>", effect: "append", response: "201 record; 200 idempotency replay", errors: ["400 expected_json_object", "409 idempotency_conflict", ...
...
L192: version: "1.0.0",
L193: authentication: "Be
```

### 11. High: Credential Redirect Persistence
- **Category:** Source
- **Confidence:** 94.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/agenttwin@0.3.11/dist/cli.js>)

Manifest-reachable source sends a prompted API credential to a fixed unofficial gateway and persists the redirection.

Public source snippet (untrusted):

```javascript
Manifest-reachable source captures an API credential, sends it to a fixed unofficial gateway, and persists that redirection in agent or shell configuration.
dist/cli.js:
authentication: "Bearer run-scoped test token; GitHub-style Authorization header",
authentication: "Bearer run-scoped test token; also accepts the Discord-idiomatic Authorization: Bot header",
headers: { Authorization: `Bearer ${key}` },
Authorization: `Bearer ${key}`,
import { mkdir as mkdir2, readFile as readFile5, writeFile as writeFile2 } from "fs/promises";
await writeFile2(storePath(cwd, ".gitignore"), STORE_GITIGNORE, "utf8");
await writeFile2(path2, `${JSON.stringify(value, null, 2)}
note: "Declares desired discovery sources only. This file grants NO authorization.",
```

### 12. High: Sandbox Evasion Gated Capability
- **Category:** Source
- **Confidence:** 84.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/agenttwin@0.3.11/dist/cli.js>)

Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.

Public source snippet (untrusted):

```javascript
L12: // src/runtime/git.ts
L13: import { execFile as execFile2 } from "child_process";
L14: import { promisify } from "util";
...
L16: const exec2 = promisify(execFile2);
L17: const git = async (...args) => (await exec2("git", args, { cwd, timeout: 5e3, maxBuffer: 1024 * 1024 })).stdout.trim();
L18: try {
...
L280: operations: [
L281: { method: "GET", endpoint: "<collection path>", effect: "read", response: "{data: records}", errors: ["401 invalid_test_credential", "429 world_capacity"] },
L282: { method: "POST", endpoint: "<collection path>", effect: "append", response: "201 record; 200 idempotency replay", errors: ["400 expected_json_object", "409 idempotency_conflict", ...
...
L356: version: "1.0.0",
L357: authentication: "Bearer run-scoped test token; HubSpot-style Bearer private token
```

### 13. High: Cross File Remote Execution Context
- **Category:** Source
- **Confidence:** 72.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/agenttwin@0.3.11/dist/cli.js>)

Source spawns a local helper that also contains network and dynamic execution context; review data flow before blocking.

Public source snippet (untrusted):

```javascript
Cross-file remote execution chain: dist/cli.js spawns dist/gateway.js; helper contains network access plus dynamic code execution.
L12: // src/runtime/git.ts
L13: import { execFile as execFile2 } from "child_process";
L14: import { promisify } from "util";
...
L16: const exec2 = promisify(execFile2);
L17: const git = async (...args) => (await exec2("git", args, { cwd, timeout: 5e3, maxBuffer: 1024 * 1024 })).stdout.trim();
L18: try {
...
L280: operations: [
L281: { method: "GET", endpoint: "<collection path>", effect: "read", response: "{data: records}", errors: ["401 invalid_test_credential", "429 world_capacity"] },
L282: { method: "POST", endpoint: "<collection path>", effect: "append", response: "201 record; 200 idempotency replay", errors: ["400 expected_json_object", "409 idempotency
```

### 14. Low: High Entropy Strings
- **Category:** Supply Chain
- **Confidence:** 55.0%

Package source contains high-entropy string patterns.

### 15. Low: Telemetry
- **Category:** Supply Chain
- **Confidence:** 70.0%

Package source references telemetry or analytics APIs.

### 16. Low: Url Strings
- **Category:** Supply Chain
- **Confidence:** 65.0%

Package source contains URL literals.

### 17. Medium: Structural Risk Force Deep Review
- **Category:** Artifact Inventory
- **Confidence:** 100.0%

Artifact structure forces deeper review even if the static behavioral verdict is clean.

### 18. High: Semantic Analysis Limited
- **Category:** Scanner Coverage
- **Confidence:** 100.0%
- **Path:** dist/dashboard/assets/next/static/chunks/1848-a6938ad74a8e409f.js\#virtual:normalized:round1
- **Public source:** [View source](<https://unpkg.com/agenttwin@0.3.11/dist/dashboard/assets/next/static/chunks/1848-a6938ad74a8e409f.js%23virtual%3Anormalized%3Around1>)

A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.

Public source snippet (untrusted):

```text
stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 2
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** Yes
- **Published lifecycle scripts:** prepublishOnly
- **Dependencies:** 7
- **Optional dependencies:** 0
- **Peer dependencies:** 0
- **Development dependencies:** 6
- **Published dependency-graph edges:** 7

### Published dependency entries
- @babel/parser ^8.0.7 (Dependency)
- @simplewebauthn/browser ^14.0.0 (Dependency)
- @simplewebauthn/server ^14.0.3 (Dependency)
- e2b ^2.52.1 (Dependency)
- openid-client ^6.8.8 (Dependency)
- playwright ^1.64.0 (Dependency)
- yaml ^2.9.1 (Dependency)

## Package metadata
- **Package:** agenttwin
- **Ecosystem:** npm
- **Version:** 0.3.11
- **License:** MIT
- **Version published:** 2026-10-20T03:50:02.688Z
- **Package first seen:** 2026-10-03T22:06:57.530Z
- **Package last seen:** 2026-11-23T20:14:19.376Z
- **Known versions:** 34
- **Latest version:** 0.3.38
- **Appeal under review:** No
- **Description:** Give your agent a test world before it touches the real one.
- **Maintainers:** sashanksingh
- **Keywords:** agent, ai, testing, simulation, sandbox, twin, cli
- **Runtime engines:** node: \>=22.12.0
- **Artifact files:** 192
- **Artifact unpacked size:** 26,585,946 bytes
- **Artifact signatures:** 2
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/agenttwin/v/0.3.11>)
