---
canonical: "https://firewall.lpm.dev/npm/dsh-half-page/v/0.3.23"
markdown: "https://firewall.lpm.dev/npm/dsh-half-page/v/0.3.23.md"
package: "dsh-half-page"
report_status: "published"
title: "dsh-half-page@0.3.23 npm security report"
verdict: "suspicious"
version: "0.3.23"
---

# dsh-half-page@0.3.23 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 — allowed with a warning** — Allowed by default policy, but 9 findings warrant review before installing.

- **Verdict:** Suspicious
- **Product-default install policy:** Warn
- **Firewall policy:** Matched warn-list
- **Public report status:** Published
- **Threat category:** Unknown
- **Selected version:** 0.3.23
- **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 package’s reading and writing features otherwise fit its stated purpose, and no install-time or external network behavior was identified. However, two reachable handlers use an unsafe path-prefix check that permits traversal outside the intended directory, so this is a real vulnerability warranting a warning.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Suspicious
- **Recorded analysis confidence:** 94.0%
- **Started:** 2026-11-10T06:37:45.785Z
- **Finished:** 2026-11-10T06:39:05.173Z
- **Download time:** 253 ms
- **Static scan time:** 230 ms
- **AI review time:** 78904 ms
- **Total time:** 79388 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:** Path traversal in file reading and work signing can expose or modify files outside the configured works directory.

- **Trigger:** A crafted request to `/dsh-reading.file` or `/dsh-reading.sign`, or a `reading_sign` call with a traversal path.

- **Impact:** A crafted path can read local file contents through the file route or modify a file through the signing route.

- **Evidence paths:** index.js

- **Review source:** ai\_review

- **Reviewed:** 2026-11-10T06:39:05.173Z

### AI review details

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

- **Mechanism:** The code checks whether a normalized path string starts with the works directory, without resolving the path and verifying that it remains inside that directory. It then reads or writes the resulting path.

- **Rationale:** The package’s reading and writing features otherwise fit its stated purpose, and no install-time or external network behavior was identified. However, two reachable handlers use an unsafe path-prefix check that permits traversal outside the intended directory, so this is a real vulnerability warranting a warning.

- **Files touched:** The requested path `p` handled by `/dsh-reading.file`, `join(root, rel)` handled by `signWork`

### Review decision

- **Verdict:** Suspicious

- **Confidence:** 94.0%

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

- **Intent class:** Critical Vulnerability

- **False-positive risk:** Medium

- **Evidence for warning:** The `/dsh-reading.file` handler authorizes paths using a normalized string-prefix check, then reads and returns the requested file; a path containing `..` can escape the works directory., `signWork` joins caller-supplied `rel` to the works directory and uses the same prefix check before modifying the file, allowing a crafted relative path to target files outside that directory., The signing endpoint accepts `rel` from its request body. This is a reachable path traversal issue, though it requires a crafted request or tool call.

- **Evidence against:** The package is a reading and writing plugin with HTTP routes and tools for managing books, notes, and works., The manifest contains module exports and package files; no install lifecycle script is defined.

## Affected versions and remediation

This report applies to dsh-half-page@0.3.23.

- Review the evidence and your use of dsh-half-page@0.3.23 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. Medium: Network
- **Category:** Source
- **Confidence:** 75.0%

Package source references network APIs.

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

Package source references environment variables.

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

Package source references filesystem APIs.

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

Package source contains high-entropy string patterns.

### 5. Medium: Stripped Provenance Metadata
- **Category:** Manifest
- **Confidence:** 94.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/dsh-half-page@0.3.23/index.js>)

The `/dsh-reading.file` handler authorizes paths using a normalized string-prefix check, then reads and returns the requested file; a path containing `..` can escape the works directory.

Public source snippet (untrusted):

```javascript
const okPath = norm(p).startsWith(norm(root)) || norm(p) === norm(notesAbs)
          if (!okPath) return res.end(JSON.stringify({ ok: false, error: '只能读作品目录或读后
```

### 6. Medium: Stripped Provenance Metadata
- **Category:** Manifest
- **Confidence:** 94.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/dsh-half-page@0.3.23/index.js>)

The `/dsh-reading.file` handler authorizes paths using a normalized string-prefix check, then reads and returns the requested file; a path containing `..` can escape the works directory.

Public source snippet (untrusted):

```javascript
const text = await readTextSmart(await readFile(p))
          res.end(JSON.stringify({ ok: true, path: p, text: text.slice(0, 200000) }))
        } catch (e) {
          res.end(JS
```

### 7. Medium: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 94.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/dsh-half-page@0.3.23/index.js>)

`signWork` joins caller-supplied `rel` to the works directory and uses the same prefix check before modifying the file, allowing a crafted relative path to target files outside that directory.

Public source snippet (untrusted):

```javascript
if (!n(abs).startsWith(n(root))) throw new Error('不在作品目录里')
  let raw = await readFile(abs, 'utf8')
  const fm = raw.match(/^(?:\uFEFF)?---\r?\n([\s\S]*?)\r?\n---\r?\n?/)
  if (fm) {
    let inner = fm[1]
    if (/^\s*(?:by|author|作者)\s*[:：]/m.test(inner)) inner = inner.replace(/^\s*(?:by|author|作者)\s*[:：].*$/m, 'by: ' + who)
    else inner = inner.replace(/\s*$/, '') + '\nby: ' + who
```

### 8. Medium: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 94.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/dsh-half-page@0.3.23/index.js>)

`signWork` joins caller-supplied `rel` to the works directory and uses the same prefix check before modifying the file, allowing a crafted relative path to target files outside that directory.

Public source snippet (untrusted):

```javascript
await writeFile(abs, raw, 'utf8')
  return abs
}

  const worksDir = async () => {
    const { dir } = await config()
    try {
      const c = JSON.parse(stripBom(await readFile(C
```

### 9. Medium: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 94.0%
- **Path:** index.js
- **Public source:** [View source](<https://unpkg.com/dsh-half-page@0.3.23/index.js>)

The signing endpoint accepts `rel` from its request body. This is a reachable path traversal issue, though it requires a crafted request or tool call.

Public source snippet (untrusted):

```javascript
path: '/dsh-reading.sign',
      async handler(req, res) {
        res.setHeader('content-type', 'application/json; charset=utf-8')
        let body = ''
        for await (const c of req) body += c
        let j = {}
        try { j = JSON.parse(body || '{}') } catch {}
        const who = String(j.by || '').trim()
        const rel = String(j.rel || '').trim()
        if (!who) return res.
```

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

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

## Package metadata
- **Package:** dsh-half-page
- **Ecosystem:** npm
- **Version:** 0.3.23
- **License:** MIT
- **Version published:** 2026-11-10T02:40:44.471Z
- **Package first seen:** 2026-11-10T06:36:44.424Z
- **Package last seen:** 2026-11-24T02:44:56.982Z
- **Known versions:** 15
- **Latest version:** 0.3.51
- **Appeal under review:** No
- **Description:** 一间会自己读书的书房：一章一章地读，记下读到哪了；读完想说什么就写在那一章边上，想写点自己的东西也放在这儿。
- **Author:** 鹿野 \<luye@dsh.local\>
- **Maintainers:** yangxinrong
- **Keywords:** dsh, deepseek-harness, plugin, reading, agent
- **Runtime engines:** dsh: \>=0.2.1-rc.0 \<0.3.0-0
- **Artifact files:** 8
- **Artifact unpacked size:** 73,735 bytes
- **Artifact signatures:** 2
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/dsh-half-page/v/0.3.23>)
