registry  /  @treeseed/sdk  /  0.12.22

@treeseed/sdk@0.12.22

Shared Treeseed SDK for content-backed and D1-backed object models.

AI Security Review

scanned 9d ago · by lpm-firewall-ai

No confirmed malicious install-time or import-time attack surface was found. The package contains broad Treeseed workflow/deployment automation, but the risky operations are exposed as SDK/CLI functions rather than unconsented lifecycle behavior.

Static reason
One or more suspicious static signals were detected.; previous stored version diff introduced dangerous source
Trigger
User-invoked Treeseed SDK/CLI workflow, config, verification, dependency install, or deployment operations.
Impact
Can modify Treeseed project/workspace files, run git/npm/provider CLIs, and contact Treeseed/GitHub/Cloudflare/Railway endpoints when explicitly invoked.
Mechanism
Package-aligned workflow automation, managed dependency installation, cloud API calls, and local project config writes.
Rationale
Static inspection found powerful but package-aligned Treeseed automation, with no postinstall/import-time execution, no credential harvesting/exfiltration, and no unconsented mutation of foreign AI-agent control surfaces. The scanner findings map to user-invoked verification, dependency, workflow, and cloud-deployment capabilities rather than a concrete malicious delivery path.
Evidence
package.jsondist/scripts/prepare.jsdist/verification.jsdist/managed-dependencies.jsdist/workflow/operations.jsdist/operations/services/config-runtime.jsdist/operations/services/deploy.jsdist/platform-operation-store.jsREADME.mdscripts/prepare.ts
Network endpoints12
github.com/cli/cli/releases/download/v2.90.0api.treeseed.devapi.treeseed.dev/search/templatesregistry.npmjs.org/auth.docker.io/registry-1.docker.io/hub.docker.com/api.github.com/pypi.org/crates.io/hex.pm/api.cloudflare.com/client/v4

Decision evidence

public snapshot
AI called this Clean at 86.0% confidence as Benign with low false-positive risk.
Evidence for block
  • Powerful Treeseed workflow code can run git/npm/cloud provider actions and write project config when invoked.
  • dist/managed-dependencies.js can download GitHub CLI from github.com and run npm install/rebuild for Treeseed tool dependencies.
  • dist/operations/services/config-runtime.js writes Treeseed machine/config files and gitignore entries during config/finalize flows.
Evidence against
  • package.json has no postinstall/install hook; prepare points to missing scripts/prepare.ts in the packed artifact, while shipped dist/scripts/prepare.js only runs build:dist and is not the declared hook.
  • No evidence of lifecycle-triggered writes to foreign AI-agent control surfaces such as CLAUDE.md, .mcp.json, Cursor/Codex settings, or home agent skills.
  • dist/verification.js is a declared user-invoked bin that runs local verification/act workflows and writes temp workflow/lock files.
  • Network endpoints are package-aligned release/deployment checks or managed tool downloads; credentials are Treeseed/GitHub/Cloudflare/Railway envs used by explicit operations.
  • Scanner eval hit in dist/platform-operation-store.js is database exec, not JS eval.
  • README and exports describe an SDK for Treeseed content, workflow, deployment, and agent runtime objects.
Behavioral surface
Source
ChildProcessCryptoDynamicRequireEnvironmentVarsEvalFilesystemNetworkShell
Supply chain
HighEntropyStringsTelemetryUrlStrings
Manifest
CopyleftLicense
scanned 337 file(s), 4.47 MB of source, external domains: 127.0.0.1, api.cloudflare.com, api.github.com, api.preview.treeseed.dev, api.treeseed.dev, api.treeseed.local, auth.docker.io, backboard.railway.com, cli.github.com, crates.io, discord.gg, example.com, gateway.ai.cloudflare.com, github.com, hex.pm, host.docker.internal, hub.docker.com, knowledge.coop, preview.treeseed.dev, pypi.org, registry-1.docker.io, registry.npmjs.org, smoke.example.com, staging.treeseed-e2e.example.com, treeseed.dev, www.treeseed.dev

Source & flagged code

7 flagged · loading source
dist/scenes/render-media-assets.jsView file
2import { createHash } from "node:crypto"; L3: import { spawnSync } from "node:child_process"; L4: import { extname, join } from "node:path";
High
Child Process

Package source references child process execution.

dist/scenes/render-media-assets.jsView on unpkg · L2
dist/platform-operation-store.jsView file
173async function createPostgresRelationalAdapter(databaseUrl) { L174: const importer = new Function("specifier", "return import(specifier)"); L175: const { Pool } = await importer("pg");
Low
Eval

Package source references a known benign dynamic code generation pattern.

dist/platform-operation-store.jsView on unpkg · L173
dist/scenes/seed.jsView file
21if (!existsSync(applyModulePath)) return null; L22: const module = await import(pathToFileURL(applyModulePath).href); L23: return module.applyLocalSeedViaApiFromCli ?? module.applyLocalSeedFromCli ?? null;
Medium
Dynamic Require

Package source references dynamic require/import behavior.

dist/scenes/seed.jsView on unpkg · L21
dist/platform/book-export.jsView file
132} L133: function loadTenant(projectRoot = process.cwd()) { L134: const manifestPath = resolve(projectRoot, "src", "manifest.yaml"); ... L203: } L204: async function withCleanNodeExecArgv(action) { L205: const previousExecArgv = [...process.execArgv]; ... L224: copy: false, L225: stdout: false L226: };
Low
Weak Crypto

Package source references weak cryptographic algorithms.

dist/platform/book-export.jsView on unpkg · L132
dist/workflow/operations.jsView file
matchType = previous_version_dangerous_delta matchedPackage = @treeseed/sdk@0.12.19 matchedIdentity = npm:QHRyZWVzZWVkL3Nkaw:0.12.19 similarity = 0.958 summary = stored previous version shares package body but lacks this dangerous source file
Critical
Previous Version Dangerous Delta

This package version adds a dangerous source file absent from the previous stored version; route for source-aware review.

dist/workflow/operations.jsView on unpkg
4212runtime: { L4213: mode: process.env.TREESEED_LOCAL_DEV_MODE ?? "cloudflare", L4214: apiBaseUrl: process.env.TREESEED_API_BASE_URL ?? "http://127.0.0.1:3000", L4215: webUrl: "http://127.0.0.1:8787" ... L4220: } L4221: const result = spawnSync(process.execPath, args, { L4222: cwd: tenantRoot,
High
Same File Env Network Execution

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

dist/workflow/operations.jsView on unpkg · L4212
dist/managed-dependencies.jsView file
472const remediation = [ L473: "Run `npx trsd install --json` to install or inspect managed tools.", L474: "Run `npx trsd secrets:unlock` or provide TREESEED_KEY_PASSPHRASE so machine secrets can be decrypted.", ... L486: } L487: const result = (options.spawn ?? spawnSync)(gh.command, [...gh.argsPrefix, "auth", "status", "--hostname", "github.com"], { L488: cwd: options.tenantRoot,
High
Runtime Package Install

Package source invokes a package manager install command at runtime.

dist/managed-dependencies.jsView on unpkg · L472

Findings

1 Critical4 High4 Medium9 Low
CriticalPrevious Version Dangerous Deltadist/workflow/operations.js
HighChild Processdist/scenes/render-media-assets.js
HighShell
HighSame File Env Network Executiondist/workflow/operations.js
HighRuntime Package Installdist/managed-dependencies.js
MediumDynamic Requiredist/scenes/seed.js
MediumNetwork
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
LowNon Install Lifecycle Scripts
LowScripts Present
LowEvaldist/platform-operation-store.js
LowWeak Cryptodist/platform/book-export.js
LowFilesystem
LowHigh Entropy Strings
LowTelemetry
LowUrl Strings
LowCopyleft License