---
canonical: "https://firewall.lpm.dev/npm/@minonl/dia/v/0.0.51"
markdown: "https://firewall.lpm.dev/npm/@minonl/dia/v/0.0.51.md"
package: "@minonl/dia"
report_status: "published"
title: "@minonl/dia@0.0.51 npm security report"
verdict: "suspicious"
version: "0.0.51"
---

# @minonl/dia@0.0.51 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
**Flagged as agent extension risk** — Allowed by default with warning: install-time first-party agent extension setup was detected.

- **Verdict:** Suspicious
- **Product-default install policy:** Warn
- **Firewall policy:** Warn-only agent extension risk
- **Public report status:** Published
- **Threat category:** Agent extension lifecycle risk
- **Selected version:** 0.0.51
- **Selected version is latest:** No
- **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: suspicious; recommendation: downgrade to warn. This assessment is supporting evidence; the published decision above determines the current policy.

The eligible global-install hook automatically adds the package's own skill to agent environments, which warrants a warning under the agent-extension lifecycle rule. The kit's messaging behavior matches the package's stated purpose, and the reviewed setup showed no unrelated network contact or credential collection.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Suspicious
- **Recorded analysis confidence:** 87.0%
- **Started:** 2026-11-18T08:31:23.028Z
- **Finished:** 2026-11-18T08:32:17.529Z
- **Download time:** 510 ms
- **Static scan time:** 2381 ms
- **AI review time:** 51609 ms
- **Total time:** 54501 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:** On eligible global installs, the postinstall hook installs the package's own agent skill and messaging plugin files.

- **Trigger:** npm postinstall during a global install outside CI, unless DIA\_NO\_POSTINSTALL=1 is set.

- **Impact:** The package adds its own skill to agent environments and its instructions prompt agents to check session identity and unread messages at session start.

- **Evidence paths:** package.json, scripts/postinstall.mjs, dist/cli.js, kits/dia-msg/dia.json, kits/dia-msg/skills/dia-msg/SKILL.md

- **Review source:** ai\_review

- **Reviewed:** 2026-11-18T08:32:17.529Z

### AI review details

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

- **Mechanism:** The hook invokes dia postinstall, which force-installs the bundled dia-msg kit; its manifest links the skill into agent skill directories.

- **Rationale:** The eligible global-install hook automatically adds the package's own skill to agent environments, which warrants a warning under the agent-extension lifecycle rule. The kit's messaging behavior matches the package's stated purpose, and the reviewed setup showed no unrelated network contact or credential collection.

- **Files touched:** ~/.config/opencode/skill/dia-msg, ~/.agents/skills/dia-msg, ~/.dsh/skills/dia-msg, ~/.config/opencode/plugins/dia-inbox/server.ts

### Review decision

- **Verdict:** Suspicious

- **Confidence:** 87.0%

- **Recommended action:** downgrade\_to\_warn

- **Intent class:** Unknown

- **False-positive risk:** Medium

- **Evidence for warning:** The postinstall hook runs the package CLI only for global installs outside CI, unless DIA\_NO\_POSTINSTALL=1 is set., The postinstall command force-installs the package's bundled dia-msg kit and writes a bootstrap stamp., The kit manifest links its own skill into OpenCode, agents, and dsh skill directories., The skill instructs dia agents to check session identity and unread messages at the start of each session.

- **Evidence against:** The kit is bundled with the package and describes cross-session messaging, which matches the package's stated agent-framework purpose., The hook skips local installs, CI, and installations with DIA\_NO\_POSTINSTALL=1., The inspected lifecycle and kit setup show no unrelated network contact or credential collection.

## Affected versions and remediation

This report applies to @minonl/dia@0.0.51.

- Review the evidence and your use of @minonl/dia@0.0.51 before allowing it. Restrict the permissions described in this report.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.

## Public findings

### 1. High: Install Time Lifecycle Scripts
- **Category:** Manifest
- **Confidence:** 90.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/package.json>)

Package defines install-time lifecycle scripts.

Public source snippet (untrusted):

```json
scripts.postinstall = node scripts/postinstall.mjs
```

### 2. Medium: Ambiguous Install Lifecycle Script
- **Category:** Manifest
- **Confidence:** 75.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/package.json>)

Install-time lifecycle script is not statically allowlisted and needs review.

Public source snippet (untrusted):

```json
scripts.postinstall = node scripts/postinstall.mjs
```

### 3. Low: Non Install Lifecycle Scripts
- **Category:** Manifest
- **Confidence:** 80.0%

Package declares lifecycle scripts that are not normally run for registry tarball installs.

### 4. Low: Scripts Present
- **Category:** Manifest
- **Confidence:** 100.0%

Package declares npm scripts.

### 5. High: Child Process
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/dist/cli.js>)

Package source references child process execution.

Public source snippet (untrusted):

```javascript
L1294: // src/ingest.ts
L1295: import { execFileSync } from "node:child_process";
L1296: import { createHash as createHash2 } from "node:crypto";
```

### 6. Low: Weak Crypto
- **Category:** Source
- **Confidence:** 64.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/dist/cli.js>)

Package source references weak cryptographic algorithms.

Public source snippet (untrusted):

```javascript
L18: function diaHome() {
L19: const h = process.env.DIA_ROOT || process.env.DIA_DATA_DIR;
L20: return h && h.length ? h : join3(homedir2(), ".dia");
...
L26: return env;
L27: process.stderr.write(`! warn: DIA_INSTALL_DIR=${env} 不存在，忽略该覆盖并自动探测安装目录
L28: `);
...
L55: try {
L56: out.push(JSON.parse(line));
L57: } catch {}
...
L173: } from "node:fs";
L174: import { basename as basename3, dirname as dirname4, isAbsolute as isAbsolute2, join as join7, resolve as resolve4, sep as sep3 } from "node:path";
L175: import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
```

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

Package source references network APIs.

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

Package source references environment variables.

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

Package source references filesystem APIs.

### 10. High: Cross File Remote Execution Context
- **Category:** Source
- **Confidence:** 72.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/dist/cli.js>)

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

Public source snippet (untrusted):

```javascript
Cross-file remote execution chain: dist/cli.js spawns packages/graph-web/dist/main.js; helper contains network access plus dynamic code execution.
L18: function diaHome() {
L19: const h = process.env.DIA_ROOT || process.env.DIA_DATA_DIR;
L20: return h && h.length ? h : join3(homedir2(), ".dia");
...
L26: return env;
L27: process.stderr.write(`! warn: DIA_INSTALL_DIR=${env} 不存在，忽略该覆盖并自动探测安装目录
L28: `);
...
L55: try {
L56: out.push(JSON.parse(line));
L57: } catch {}
...
L173: } from "node:fs";
L174: import { basename as basename3, dirname as dirname4, isAbsolute as isAbsolute2, join as join7, resolve as resolve4, sep as sep3 } from "node:path";
L175: import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
```

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

Package source contains high-entropy string patterns.

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

Package source contains URL literals.

### 13. Medium: Ships Build Helper
- **Category:** Artifact Inventory
- **Confidence:** 70.0%
- **Path:** packages/job/install.sh
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/packages/job/install.sh>)

Package ships non-JavaScript build or shell helper files.

Public source snippet (untrusted):

```shell
path = packages/job/install.sh
kind = build_helper
sizeBytes = 1570
magicHex = [redacted]
```

### 14. High: Payload In Excluded Dir
- **Category:** Artifact Inventory
- **Confidence:** 85.0%
- **Path:** packages/job/tests/p2.test.sh
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/packages/job/tests/p2.test.sh>)

Package hides binary, compressed, or executable-looking payloads in test/fixture/hidden paths.

Public source snippet (untrusted):

```shell
path = packages/job/tests/p2.test.sh
kind = payload_in_excluded_dir
sizeBytes = 2368
magicHex = [redacted]
```

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

### 16. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** packages/graph-web/dist/main.js
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/packages/graph-web/dist/main.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = @minonl/dia@0.0.50
matchedPath = packages/graph-web/dist/main.js
matchedIdentity = npm:QG1pbm9ubC9kaWE:0.0.50
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 17. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/dist/cli.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = @minonl/dia@0.0.50
matchedPath = dist/cli.js
matchedIdentity = npm:QG1pbm9ubC9kaWE:0.0.50
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 18. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** packages/graph-web/src/main.ts
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/packages/graph-web/src/main.ts>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```typescript
matchType = normalized_sha256
matchedPackage = @minonl/dia@0.0.50
matchedPath = packages/graph-web/src/main.ts
matchedIdentity = npm:QG1pbm9ubC9kaWE:0.0.50
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 19. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** packages/wt/bin/dia-wt
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/packages/wt/bin/dia-wt>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```text
matchType = normalized_sha256
matchedPackage = @minonl/dia@0.0.50
matchedPath = packages/wt/bin/dia-wt
matchedIdentity = npm:QG1pbm9ubC9kaWE:0.0.50
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 20. High: Known Malware Source Fingerprint Signature
- **Category:** Supply Chain
- **Confidence:** 94.0%
- **Path:** packages/graph-web/dist/main.js
- **Public source:** [View source](<https://unpkg.com/@minonl/dia@0.0.51/packages/graph-web/dist/main.js>)

Source fingerprint signature matches a known malicious package signature; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = malicious_source_fingerprint_signature
signature = fcf88fd6d5160836
signatureType = suspicious_hashes
sourceLabel = final_verdict:malicious
matchedPackage = @minonl/dia@0.0.50
matchedPath = packages/graph-web/dist/main.js
matchedIdentity = npm:QG1pbm9ubC9kaWE:0.0.50
similarity = 1.000
shingleOverlap = 17
summary = package final verdict is malicious
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** Yes
- **Published lifecycle scripts:** postinstall, prepublishOnly
- **Dependencies:** 0
- **Optional dependencies:** 0
- **Peer dependencies:** 0
- **Development dependencies:** 1
- **Published dependency-graph edges:** 0

## Package metadata
- **Package:** @minonl/dia
- **Ecosystem:** npm
- **Version:** 0.0.51
- **License:** MIT
- **Version published:** 2026-11-18T08:27:25.204Z
- **Package first seen:** 2026-11-05T03:25:30.492Z
- **Package last seen:** 2026-11-22T05:07:02.675Z
- **Known versions:** 35
- **Latest version:** 0.1.1
- **Appeal under review:** No
- **Description:** dia (嗲) — lightweight agent framework: knowledge index, audit, session ingest
- **Maintainers:** minonl
- **Runtime engines:** bun: \>=1.2, node: \>=24
- **Artifact files:** 121
- **Artifact unpacked size:** 1,861,623 bytes
- **Artifact signatures:** 2
- **Attestations:** Yes
- **Provenance:** https://slsa.dev/provenance/v1

## References
- [HTML security report](<https://firewall.lpm.dev/npm/@minonl/dia/v/0.0.51>)
- [Repository](<https://github.com/minonl/dia>)
- [Issues](<https://github.com/minonl/dia/issues>)
