Loading npm security reports…
Loading npm security reports…
pantheon-opencode@2.1.3: AI-agent control-surface risk – flagged | LPM Firewall
Soft block: AI-agent control surface
Warn by default; block when configured. Installation can change agent instructions and related control files without an explicit init or update command, influencing subsequent agent behavior.
AI security reviewscanned on Nov 14, 2026, 14:03 UTC · by lpm-firewall-ai The package's postinstall path automatically writes agent prompts and global instructions into an existing OpenCode configuration, without an explicit user setup request. This meets the install-time AI-agent control-surface hijack rule.
Static reason
One or more suspicious static signals were detected.; source matched previously finalized malicious package; routed for review
Trigger
Installing or updating the package when an OpenCode config directory exists.
Impact
Installation can change agent instructions and related control files without an explicit init or update command, influencing subsequent agent behavior.
Mechanism
postinstall runs sync-tui, which invokes syncCopyArtifacts to copy agent prompts and routing, skills, commands, MCP scripts, and global AGENTS.md into the user's OpenCode config.
Policy narrative
Installing or updating the package runs a postinstall hook that refreshes an existing global OpenCode setup. It writes package-provided agent prompts and global instructions, along with related skills and runtime files, into the user's OpenCode configuration without requiring an explicit setup command. This is an automatic install-time change to AI-agent control surfaces outside the package directory.
Evidence
package.json scripts/postinstall.mjs scripts/sync-tui.mjs scripts/sync-artifacts.mjs
configDir/agents/*
configDir/routing.yml
configDir/AGENTS.md
configDir/commands/*.md
configDir/scripts/*
configDir/.pantheon/code-mode/*
configDir/.pantheon/tiers.json
Decision evidencepublic snapshot AI identified this as a dangerous AI-agent capability at 94.0% confidence with low false-positive risk.
Evidence for policy risk
The npm postinstall script automatically invokes scripts/sync-tui.mjs. When an OpenCode config directory exists, sync-tui calls syncCopyArtifacts; it also does so when the TUI plugin copy is absent. The sync routine copies agent prompts into the global agents directory and writes routing configuration. The sync routine writes package-provided instructions into the global AGENTS.md file. Evidence against
The sync exits without writing when no OpenCode config directory exists. The package describes itself as an OpenCode multi-agent orchestration platform, and the copied artifacts serve that function. The reviewed install path shows no credential collection or network endpoint. Behavioral surface
Source Child process · Crypto · Dynamic require · Environment variables · Filesystem · Network · Shell
Supply chain High entropy strings · Possible obfuscation · URL strings
Manifest No manifest risk signals triggered.
Scanned 219 files · 3.75 MB of source
10 external domains referenced
api.githubcopilot.com api.openai.com api.typesafe.ai github.com mcp.grep.app models.dev nodejs.org opencode.ai registry.npmjs.org www.python.org Findings21 high · 6 medium · 5 low Source & flagged code24 flagged High Install time lifecycle scripts
Package defines install-time lifecycle scripts.
package.json View on unpkg Medium Ambiguous install lifecycle script
Install-time lifecycle script is not statically allowlisted and needs review.
package.json View on unpkg Shared scanner record · 2 findings · 1 line scripts.postinstall = node scripts/postinstall.mjs && node scripts/sync-tui.mjs
High Child process
Package source references child process execution.
bin/pantheon-init.mjs View on unpkg · L166 Code excerpt · 3 lines 166 if (command === 'prune' ) {
167 const { spawnSync } = await import ('node:child_process' )
168 const pruneScript = path.join (ROOT, 'scripts' , 'prune.mjs' )
Code excerpt · 3 lines 288 cwd,
289 shell: true ,
290 encoding: 'utf8' ,
Medium Dynamic require
Package source references dynamic require/import behavior.
scripts/vision-status.mjs View on unpkg · L38 Code excerpt · 2 lines 39 const require = createRequire (import .meta.url)
40
High External AI agent control surface mutation
Runtime or CLI source writes behavior-bearing configuration into a user or project AI-agent control surface.
scripts/install/agents-md.mjs View on unpkg Scanner record · 30 lines Runtime or CLI code links a write operation to an explicit external AI-agent control path:
ble = generateagentstable(agents)
const sections = [
title,
'',
`this project uses the pantheon multi-agent framework with ${agentcount} specialized agents.`,
'',
'## available agents',
'',
agenttable,
]
if (extrasections) {
sections.push('', extrasections.trimend())
}
sections.push(
High Trigger reachable external AI agent control surface mutation
Manifest-trigger-reachable source writes behavior-bearing configuration into a user or project AI-agent control surface.
scripts/install/opencode.mjs View on unpkg Scanner record · 19 lines Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
if (componentset.has('agents')) {
section('agents')
const srcdir = join(root, 'src', 'agents')
if (!sourcedirvalid(srcdir)) {
warning(`agent source directory not found: ${srcdir}`)
stats.errors++
} else {
const agentstep = step(s.installingagents)
const dstdir = join(target, agentprefix)
assertpathwithin(target, dstdir)
assertnosymlinkancestors(dstdir)
if (!dryrun) {
mkdirsync(dstdir, { recursive: true })
assertnosymlinkancestors(dstdir)
High Cross file remote execution context
Source spawns a local helper that also contains network and dynamic execution context; review data flow before blocking.
scripts/build-plugin.mjs View on unpkg · L9 Code excerpt · 6 lines Cross-file remote execution chain: scripts/build-plugin.mjs spawns src/plugin/index.js; helper contains network access plus dynamic code execution.
9
10 import { execFileSync } from 'node:child_process'
11 import { existsSync } from 'node:fs'
⋯
14
15 const __dirname = dirname (fileURLToPath (import .meta.url))
16 const root = join (__dirname, '..' )
High Runtime package install
Package source invokes a package manager install command at runtime.
scripts/install-mcp.mjs View on unpkg · L119 Code excerpt · 3 lines 119 try {
120 execSync ('npx --yes @upstash/context7-mcp --help 2>&1' , {
121 stdio: 'pipe' ,
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/install-mcp.mjs View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = scripts/install-mcp.mjs
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
Medium Ships build helper
Package ships non-JavaScript build or shell helper files.
scripts/test-opencode-sandbox.sh View on unpkg Scanner record · 4 lines path = scripts/test-opencode-sandbox.sh
kind = build_helper
sizeBytes = 78454
magicHex = [redacted]
.pantheon/code-mode/compress-inline.py View file High Payload in excluded dir
Package hides binary, compressed, or executable-looking payloads in test/fixture/hidden paths.
.pantheon/code-mode/compress-inline.py View on unpkg Scanner record · 4 lines path = .pantheon/code-mode/compress-inline.py
kind = payload_in_excluded_dir
sizeBytes = 17142
magicHex = [redacted]
High Semantic analysis limited
A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.
scripts/manifest-inventory.mjs View on unpkg Scanner record · 1 line stage = ast_semantic_analysis; reason = ast_trace_path_limit_exceeded; limitedFiles = 3
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/doctor.mjs View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = scripts/doctor.mjs
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/versioning.mjs View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = scripts/versioning.mjs
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
src/plugins/tui/dist/tui.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = src/plugins/tui/dist/tui.js
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
src/plugins/tui/src/index.tsx View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = src/plugins/tui/src/index.tsx
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
src/plugins/tui/src/pantheon-settings.tsx View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
src/plugins/tui/src/pantheon-settings.tsx View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = src/plugins/tui/src/pantheon-settings.tsx
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/decision-router-budget.mjs View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = scripts/decision-router-budget.mjs
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/install/shared.mjs View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = scripts/install/shared.mjs
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/optimize.mjs View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = scripts/optimize.mjs
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/package-evidence.mjs View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = scripts/package-evidence.mjs
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/prune.mjs View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = pantheon-opencode@2.1.2
matchedPath = scripts/prune.mjs
matchedIdentity = npm:cGFudGhlb24tb3BlbmNvZGU:2.1.2
similarity = 1.000
summary = normalized source hash matched finalized malicious source
AI assessment confidence 94%
Certainty of the AI review, not severity.
Verdict details False-positive risk, Review stage, Firewall policy This finding concerns changes to an AI agent's instructions or configuration without explicit user action. It does not by itself establish malware intent. The CLI warns by default and blocks when configured for this policy.
Package metadata npm Author ils15
Version 2.1.3
Published Nov 14, 2026
License MIT
Dependencies 5
Integrity verified
Package size 1.49 MB
Files 373
Keywords github copilot agents skills plugin orchestration
Runtime surface package.json Entrypoints exports map bin → pantheon-opencode
Runtime node >=26.4.0
Artifact 5.37 MB unpacked · 373 files 2 signatures · provenance
Install lifecycle postinstall prepare prepublishOnly
On this report AI security review Decision evidence Findings32 Flagged code24 Remediation High Cross file remote execution context Code↓
Package metadata 8 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
Low Non install lifecycle scripts
'- build: `npm run build`',
'- focused test: run the smallest relevant check for the changed behavior',
'- full suite: `npm test` (ci/release gates or broad/high-risk changes)',
'- lint: `npm run lint`',
'- tdd: write failing test first, then implement',
'- coverage minimum: 80%',
}
if (clean && existssync(dstdir)) {
assertnosymlinkancestors(dstdir)
const existing = readdirsync(dstdir)
for (const f of existing) {
summary = normalized source hash matched finalized malicious source