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

@defend-tech/opencode-optima@0.1.130

> Don't just code with AI. Build enterprise-grade software.

AI Security Review

scanned 4d ago · by lpm-firewall-ai

No confirmed malicious attack surface was found. The package is a powerful OpenCode workflow plugin with documented agent config writes, browser automation, and ClickUp/GitHub integrations activated by plugin use or explicit tools.

Static reason
One or more suspicious static signals were detected.
Trigger
OpenCode plugin load or explicit Optima tool/bin invocation
Impact
Can write .optima project files, OpenCode agent config, QA artifacts, and integration state when configured; no stealth exfiltration or install-time payload found.
Mechanism
documented workflow automation and agent configuration sync
Rationale
The suspicious primitives are consistent with the package's documented OpenCode workflow, QA browser, and ClickUp/GitHub automation features, with no lifecycle hook or hidden credential harvesting found. The default OpenCode agent sync is sensitive but package-aligned and visible in README/config behavior rather than an unconsented install-time hijack.
Evidence
package.jsonREADME.mdscripts/optima-sanitize-host.jsdist/index.jsdist/sanitize_cli.js$OPENCODE_CONFIG_DIR/agents/*.md.optima/.config/optima.yaml.optima/codemap.yml.optima/agents/README.md.optima/agent-additions/README.md.gitignore
Network endpoints6
127.0.0.1:3001127.0.0.1:9223api.clickup.com/api/v2/api.github.com/chatgpt.com/auth.openai.com/

Decision evidence

public snapshot
AI called this Clean at 84.0% confidence as Benign with medium false-positive risk.
Evidence for block
  • dist/index.js writes generated OpenCode agent markdown into process.env.OPENCODE_CONFIG_DIR/agents by default during plugin config.
  • dist/index.js exposes user-invoked QA tools that run supplied JS via new Function against Playwright/CDP browser pages.
  • dist/index.js can call configured ClickUp/GitHub/OpenCode HTTP APIs and update ClickUp tasks/webhooks when enabled.
Evidence against
  • package.json has no install/postinstall lifecycle hooks; main is an OpenCode plugin and bin is a user-run sanitizer CLI.
  • README.md documents this as an OpenCode agent/workflow plugin that installs agent roles and repository .optima scaffolding.
  • Network endpoints are product-aligned: local OpenCode/CDP plus ClickUp/GitHub APIs; tokens are read from config/env for those integrations.
  • scripts/optima-sanitize-host.js only imports dist/sanitize_cli.js and runs main when explicitly invoked.
  • Repository writes are tied to documented optima_init/config sync behavior, not hidden install-time execution.
Behavioral surface
Source
ChildProcessCryptoDynamicRequireEnvironmentVarsEvalFilesystemNetworkShellWebSocket
Supply chain
HighEntropyStringsUrlStrings
Manifest
NoLicense
scanned 3 file(s), 1.55 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
14749if (!script.trim()) return { ok: false, error: "script_required" }; L14750: const fn = new Function("page", "context", "browser", "artifactsDir", `return (async () => { L14751: ${script} ... L14757: } L14758: async function withQaBrowser({ provider = DEFAULT_QA_PROVIDER, cdpUrl = "", clickupTaskId = "", startUrl = "https://chatgpt.com/" } = {}, callback) { L14759: const chromium = await loadPlaywrightChromium(); L14760: const browser = await chromium.connectOverCDP(normalizeCdpUrl(cdpUrl), { L14761: timeout: Number(process.env.OPTIMA_QA_PLAYWRIGHT_CONNECT_TIMEOUT_MS || DEFAULT_QA_PLAYWRIGHT_CONNECT_TIMEOUT_MS) L14762: });
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 · L14749
14193const browser = {}; L14194: const fn = new Function("cdp", "target", "artifactsDir", "command", "page", "context", "browser", `return (async () => { L14195: ${script}
Low
Eval

Package source references a known benign dynamic code generation pattern.

dist/index.jsView on unpkg · L14193
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