---
canonical: "https://firewall.lpm.dev/npm/@milpa/comal"
markdown: "https://firewall.lpm.dev/npm/@milpa/comal/report.md"
package: "@milpa/comal"
report_status: "published"
title: "@milpa/comal@0.2.2 npm security report"
verdict: "malicious"
version: "0.2.2"
---

# @milpa/comal@0.2.2 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
**Blocked & quarantined** — The key may be disclosed to a host outside the OpenAI service it belongs to.

- **Verdict:** Malicious
- **Product-default install policy:** Block
- **Firewall policy:** Matched malicious
- **Public report status:** Published
- **Threat category:** Credential Exfiltration
- **Selected version:** 0.2.2
- **Selected version is latest:** Yes
- **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: malicious; recommendation: publish block. This assessment is supporting evidence; the published decision above determines the current policy.

The package defaults OpenAI connections to llama.local while forwarding OPENAI\_API\_KEY as a bearer token without checking the destination. This is credential disclosure to a host outside the credential's service; the flagged bidi characters are part of a sanitizer and do not change that finding.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Malicious
- **Recorded analysis confidence:** 94.0%
- **Started:** 2026-10-31T14:05:28.572Z
- **Finished:** 2026-10-31T14:06:36.800Z
- **Download time:** 1535 ms
- **Static scan time:** 9590 ms
- **AI review time:** 57102 ms
- **Total time:** 68228 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:** The default OpenAI-compatible endpoint can receive the user's OpenAI API key.

- **Trigger:** A non-demo CLI connection uses the OpenAI provider with OPENAI\_API\_KEY set and no endpoint override.

- **Impact:** The key may be disclosed to a host outside the OpenAI service it belongs to.

- **Evidence paths:** src/openai-provider.mjs, src/cli.mjs

- **Review source:** ai\_review

- **Reviewed:** 2026-10-31T14:06:36.800Z

### AI review details

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

- **Mechanism:** The package defaults the endpoint to llama.local and attaches the environment key as a bearer token without verifying that the destination is OpenAI or a user-selected endpoint.

- **Attack narrative:** When the CLI connects with the OpenAI provider, it can inherit OPENAI\_API\_KEY while using the package's default endpoint at llama.local. The provider sends the key in a bearer authorization header, with no destination check tying the key to OpenAI or requiring the user to select that endpoint. This exposes an OpenAI credential to a different host during ordinary runtime use.

- **Rationale:** The package defaults OpenAI connections to llama.local while forwarding OPENAI\_API\_KEY as a bearer token without checking the destination. This is credential disclosure to a host outside the credential's service; the flagged bidi characters are part of a sanitizer and do not change that finding.

- **Network endpoints:** http://llama.local:11438/

### Review decision

- **Verdict:** Malicious

- **Confidence:** 94.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for block:** OpenAI settings default to http://llama.local:11438/ when no endpoint override is set., The settings copy OPENAI\_API\_KEY into the provider configuration., The OpenAI provider sends its configured key in an Authorization: Bearer header., The CLI connects using its selected settings when running outside demo mode., The bidi characters flagged in bound.mjs are removed by a sanitizer.

- **Evidence against:** The credential is sent during runtime model use, not by an install hook., The package is an OpenAI-compatible client, and its endpoint can be overridden through configuration.

## Affected versions and remediation

This report applies to @milpa/comal@0.2.2.

- Avoid installing @milpa/comal@0.2.2. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.

## Public findings

### 1. Low: Eval
- **Category:** Source
- **Confidence:** 45.0%
- **Path:** node\_modules/ajv/dist/compile/jtd/serialize.js
- **Public source:** [View source](<https://unpkg.com/@milpa/comal@0.2.2/node_modules/ajv/dist/compile/jtd/serialize.js>)

Package source references a known benign dynamic code generation pattern.

Public source snippet (untrusted):

```javascript
L49: sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${serializeFuncCode}`;
L50: const makeSerialize = new Function(`${names_1.default.scope}`, sourceCode);
L51: const serialize = makeSerialize(this.scope.get());
```

### 2. Medium: Dynamic Require
- **Category:** Source
- **Confidence:** 75.0%
- **Path:** node\_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js
- **Public source:** [View source](<https://unpkg.com/@milpa/comal@0.2.2/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js>)

Package source references dynamic require/import behavior.

Public source snippet (untrusted):

```javascript
L2: Object.defineProperty(exports, "__esModule", { value: true });
L3: const dynamicAnchor_1 = require("./dynamicAnchor");
L4: const util_1 = require("../../compile/util");
```

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

Package source references network APIs.

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

Package source references environment variables.

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

Package source references filesystem APIs.

### 6. Critical: Trojan Source Unicode
- **Category:** Source
- **Confidence:** 90.0%
- **Path:** src/plugins/open-relay/bound.mjs
- **Public source:** [View source](<https://unpkg.com/@milpa/comal@0.2.2/src/plugins/open-relay/bound.mjs>)

Source contains bidi control or invisible Unicode characters associated with Trojan Source attacks.

Public source snippet (untrusted):

```javascript
L3: contains invisible/control Unicode U+202A (left-to-right embedding)
const control = /[\u0000-\u0008\u000b-\u001f\u007f-\u009f<U+200B>-<U+200F><U+202A>-<U+202E><U+2066>-<U+2069>]/g;
```

### 7. Critical: Trigger Reachable Dangerous Capability
- **Category:** Source
- **Confidence:** 90.0%
- **Path:** src/plugin-notices.mjs
- **Public source:** [View source](<https://unpkg.com/@milpa/comal@0.2.2/src/plugin-notices.mjs>)

A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.

Public source snippet (untrusted):

```javascript
Trigger-reachable chain: manifest.bin -> bin/comal.mjs -> src/cli.mjs -> src/peer-tools.mjs -> src/plugin-notices.mjs
Reachable file contains a blocking source-risk pattern.
```

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

Package source contains high-entropy string patterns.

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

Package source contains URL literals.

### 10. Medium: Ships Wasm Module
- **Category:** Artifact Inventory
- **Confidence:** 70.0%
- **Path:** node\_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.wasm
- **Public source:** [View source](<https://unpkg.com/@milpa/comal@0.2.2/node_modules/%40jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.wasm>)

Package ships WebAssembly modules.

Public source snippet (untrusted):

```text
path = node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.wasm
kind = wasm_module
sizeBytes = 1510753
magicHex = [redacted]
```

### 11. Medium: Ships Build Helper
- **Category:** Artifact Inventory
- **Confidence:** 70.0%
- **Path:** src/windows-private.ps1
- **Public source:** [View source](<https://unpkg.com/@milpa/comal@0.2.2/src/windows-private.ps1>)

Package ships non-JavaScript build or shell helper files.

Public source snippet (untrusted):

```text
path = src/windows-private.ps1
kind = build_helper
sizeBytes = 3483
magicHex = [redacted]
```

### 12. 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.

### 13. Low: No License
- **Category:** Manifest
- **Confidence:** 80.0%

Package manifest does not declare a clear license.

### 14. High: Semantic Analysis Limited
- **Category:** Scanner Coverage
- **Confidence:** 100.0%
- **Path:** node\_modules/ajv/dist/runtime/parseJson.js\#virtual:normalized:round1
- **Public source:** [View source](<https://unpkg.com/@milpa/comal@0.2.2/node_modules/ajv/dist/runtime/parseJson.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 = 16
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** No

- **Dependencies:** 5
- **Optional dependencies:** 0
- **Peer dependencies:** 0
- **Development dependencies:** 0
- **Published dependency-graph edges:** 5

### Published dependency entries
- ajv 8.20.0 (Dependency)
- cheerio 1.2.0 (Dependency)
- marked 18.1.1 (Dependency)
- quickjs-emscripten 0.32.0 (Dependency)
- string-width 8.3.0 (Dependency)

## Package metadata
- **Package:** @milpa/comal
- **Ecosystem:** npm
- **Version:** 0.2.2
- **Version published:** 2026-10-28T19:31:58.526Z
- **Package first seen:** 2026-10-16T21:37:35.266Z
- **Package last seen:** 2026-10-31T14:06:36.800Z
- **Known versions:** 11
- **Latest version:** 0.2.2
- **Appeal under review:** No
- **Description:** Comal: governed operations, execution receipts, and programming assistance in any language
- **Runtime engines:** node: \>=22
- **Artifact files:** 2123
- **Artifact unpacked size:** 20,019,767 bytes
- **Artifact signatures:** 2
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/@milpa/comal>)
- [Homepage](<https://comal.milpahq.com/>)
