registry  /  @defend-tech/opencode-optima  /  0.1.137

@defend-tech/opencode-optima@0.1.137

> ClickUp-first delivery automation for OpenCode teams.

AI Security Review

scanned 4d ago · by lpm-firewall-ai

No confirmed malicious attack surface. The package is a high-capability OpenCode workflow plugin, but risky primitives are tied to configured or user-invoked workflow, QA, GitHub, ClickUp, and sanitize operations.

Static reason
One or more suspicious static signals were detected.
Trigger
OpenCode plugin enablement or explicit CLI/tool invocation
Impact
No unconsented install/import-time compromise identified; configured tools can modify project state and external services as intended.
Mechanism
workflow automation plugin with configured API clients, local state writes, browser QA automation, and git/systemctl helpers
Rationale
Static inspection found powerful automation capabilities but no lifecycle hook, hidden import-time execution, credential harvesting, destructive payload, or off-purpose exfiltration. The suspicious primitives are consistent with the package's documented OpenCode/Optima workflow, QA, GitHub, and ClickUp automation roles.
Evidence
package.jsonscripts/optima-sanitize-host.jsdist/sanitize_cli.jsdist/index.js.optima/**$OPENCODE_CONFIG_DIR/agents/*.md~/.local/share/opencode/opencode-optima/**
Network endpoints6
api.clickup.com/api/v2/api.github.com/127.0.0.1:3001127.0.0.1:9223chatgpt.com/auth.openai.com/

Decision evidence

public snapshot
AI called this Clean at 88.0% confidence as Benign with medium false-positive risk.
Evidence for block
  • dist/index.js exposes QA browser tools that evaluate user-supplied commands with new Function.
  • dist/index.js can write .optima runtime/config files, sync OpenCode agent markdown, and run git/systemctl in explicit tools.
  • dist/index.js contacts ClickUp/GitHub/OpenCode/Chrome CDP endpoints when configured.
Evidence against
  • package.json has no install/postinstall lifecycle hooks; main is an OpenCode plugin and bin is an explicit sanitize CLI.
  • Network endpoints are package-aligned: api.clickup.com, api.github.com, local OpenCode, and local Chrome CDP.
  • File writes are scoped to .optima, OPENCODE_CONFIG_DIR agents, QA artifacts/state, or explicit worktree operations.
  • scripts/optima-sanitize-host.js only chooses source/dist CLI and imports main; no hidden payload.
  • No credential harvesting/exfiltration beyond configured API tokens used as Authorization for ClickUp/GitHub API calls.
Behavioral surface
Source
ChildProcessCryptoDynamicRequireEnvironmentVarsEvalFilesystemNetworkShellWebSocket
Supply chain
HighEntropyStringsUrlStrings
Manifest
NoLicense
scanned 3 file(s), 1.59 MB of source, external domains: 127.0.0.1, api.clickup.com, api.github.com, auth.openai.com, chatgpt.com, git-scm.com

Source & flagged code

5 flagged · loading source
dist/index.jsView file
9406import path5 from "node:path"; L9407: import { execFileSync } from "node:child_process"; L9408: function toGitPath(worktree, targetPath) {
High
Child Process

Package source references child process execution.

dist/index.jsView on unpkg · L9406
14957if (!script.trim()) return { ok: false, error: "script_required" }; L14958: const fn = new Function("page", "context", "browser", "artifactsDir", `return (async () => { L14959: ${script} ... L14965: } L14966: async function withQaBrowser({ provider = DEFAULT_QA_PROVIDER, cdpUrl = "", clickupTaskId = "", startUrl = "https://chatgpt.com/" } = {}, callback) { L14967: const chromium = await loadPlaywrightChromium(); L14968: const browser = await chromium.connectOverCDP(normalizeCdpUrl(cdpUrl), { L14969: timeout: Number(process.env.OPTIMA_QA_PLAYWRIGHT_CONNECT_TIMEOUT_MS || DEFAULT_QA_PLAYWRIGHT_CONNECT_TIMEOUT_MS) L14970: });
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/index.jsView on unpkg · L14957
14401const browser = {}; L14402: const fn = new Function("cdp", "target", "artifactsDir", "command", "page", "context", "browser", `return (async () => { L14403: ${script}
Low
Eval

Package source references a known benign dynamic code generation pattern.

dist/index.jsView on unpkg · L14401
scripts/optima-sanitize-host.jsView file
9const cliPath = fs.existsSync(sourceCli) ? sourceCli : distCli; L10: const { main } = await import(cliPath); L11:
Medium
Dynamic Require

Package source references dynamic require/import behavior.

scripts/optima-sanitize-host.jsView on unpkg · L9
dist/sanitize_cli.jsView file
2592Cross-file remote execution chain: dist/sanitize_cli.js spawns dist/index.js; helper contains network access plus dynamic code execution. L2592: if (typeof node_buffer.Buffer === "function") { L2593: return node_buffer.Buffer.from(src, "base64"); L2594: } else if (typeof atob === "function") { ... L5197: yield* this.next(token); L5198: yield* this.end(forceDoc, endOffset); L5199: } ... L5201: *next(token) { L5202: if (node_process.env.LOG_STREAM) L5203: console.dir(token, { depth: null }); ... L7491: // WTF! L7492: // https://git-scm.com/docs/gitignore L7493: // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
High
Cross File Remote Execution Context

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

dist/sanitize_cli.jsView on unpkg · L2592

Findings

4 High3 Medium6 Low
HighChild Processdist/index.js
HighShell
HighSame File Env Network Executiondist/index.js
HighCross File Remote Execution Contextdist/sanitize_cli.js
MediumDynamic Requirescripts/optima-sanitize-host.js
MediumNetwork
MediumEnvironment Vars
LowScripts Present
LowEvaldist/index.js
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings
LowNo License