---
canonical: "https://firewall.lpm.dev/npm/@principles/pd-cli/v/1.165.0"
markdown: "https://firewall.lpm.dev/npm/@principles/pd-cli/v/1.165.0.md"
package: "@principles/pd-cli"
report_status: "published"
title: "@principles/pd-cli@1.165.0 npm security report"
verdict: "suspicious"
version: "1.165.0"
---

# @principles/pd-cli@1.165.0 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 11 findings warrant review before installing.

- **Verdict:** Suspicious
- **Product-default install policy:** Warn
- **Firewall policy:** Matched warn-list
- **Public report status:** Published
- **Threat category:** Credential exfiltration
- **Selected version:** 1.165.0
- **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 is not shown sending credentials automatically, but its runtime setup example explicitly pairs an Anthropic token with a hard-coded third-party endpoint. That creates a meaningful credential exposure risk if users follow the example, so this warrants a warning rather than a malicious verdict.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Suspicious
- **Recorded analysis confidence:** 86.0%
- **Started:** 2026-11-05T07:52:48.109Z
- **Finished:** 2026-11-05T07:53:50.852Z
- **Download time:** 771 ms
- **Static scan time:** 1835 ms
- **AI review time:** 60137 ms
- **Total time:** 62743 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:** A runtime configuration example risks directing an Anthropic credential to a hard-coded third-party endpoint.

- **Trigger:** A user follows the example when configuring the runtime, then starts a runtime-backed run with ANTHROPIC\_AUTH\_TOKEN set.

- **Impact:** The configured service could receive the Anthropic credential. The inspected code does not establish that this endpoint is contacted automatically.

- **Evidence paths:** .lpm-dependency-evidence-7b20ebc1-ca17-4361-92cc-189c14931e35/0/npm-linux/dist/runtime-v2/pain-signal-runtime-factory.js, .lpm-dependency-evidence-7b20ebc1-ca17-4361-92cc-189c14931e35/0/npm-linux/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js

- **Review source:** ai\_review

- **Reviewed:** 2026-11-05T07:53:50.852Z

### AI review details

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

- **Mechanism:** The example sets apiKeyEnv to ANTHROPIC\_AUTH\_TOKEN and baseUrl to token-plan-cn.xiaomimimo.com; the runtime adapter reads the configured environment variable as its API key.

- **Rationale:** The package is not shown sending credentials automatically, but its runtime setup example explicitly pairs an Anthropic token with a hard-coded third-party endpoint. That creates a meaningful credential exposure risk if users follow the example, so this warrants a warning rather than a malicious verdict.

- **Files touched:** .pd/config.yaml

- **Network endpoints:** token-plan-cn.xiaomimimo.com

### Review decision

- **Verdict:** Suspicious

- **Confidence:** 86.0%

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

- **Intent class:** Critical Vulnerability

- **False-positive risk:** Medium

- **Evidence for warning:** A runtime configuration error example pairs ANTHROPIC\_AUTH\_TOKEN with https://token-plan-cn.xiaomimimo.com/v1 and directs users to add these settings to their config., The runtime adapter reads the configured environment variable as its API key when starting a run., The package has no install lifecycle scripts; its CLI is invoked through the declared pd binary.

- **Evidence against:** The foreign host appears in a configuration example, not as an unconditional request endpoint., The API key read occurs in the runtime startRun path, which requires a run to be started., The package presents itself as a CLI for pain recording, sample management, and governance tasks.

## Affected versions and remediation

This report applies to @principles/pd-cli@1.165.0.

- Review the evidence and your use of @principles/pd-cli@1.165.0 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. Low: Scripts Present
- **Category:** Manifest
- **Confidence:** 100.0%

Package declares npm scripts.

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

Package source references network APIs.

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

Package source references environment variables.

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

Package source references filesystem APIs.

### 5. High: Copied Package Dependency Bridge
- **Category:** Source
- **Confidence:** 83.0%
- **Path:** dist/commands/health-codex.js
- **Public source:** [View source](<https://unpkg.com/@principles/pd-cli@1.165.0/dist/commands/health-codex.js>)

Package metadata claims a different repository identity while copied source loads a runtime dependency bridge.

Public source snippet (untrusted):

```javascript
package = @principles/pd-cli; repositoryIdentity = principles; dependency = @principles/codex-adapter
L194: try {
L195: codexAdapter = await import('@principles/codex-adapter');
L196: }
```

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

Package source contains high-entropy string patterns.

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

Package source contains URL literals.

### 8. Medium: Structural Risk Force Deep Review
- **Category:** Artifact Inventory
- **Confidence:** 80.0%

Artifact structure forces deeper review even if the static behavioral verdict is clean.

### 9. Medium: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 86.0%
- **Path:** .lpm-dependency-evidence-7b20ebc1-ca17-4361-92cc-189c14931e35/0/npm-linux/dist/runtime-v2/pain-signal-runtime-factory.js
- **Public source:** [View source](<https://unpkg.com/@principles/pd-cli@1.165.0/.lpm-dependency-evidence-7b20ebc1-ca17-4361-92cc-189c14931e35/0/npm-linux/dist/runtime-v2/pain-signal-runtime-factory.js>)

A runtime configuration error example pairs ANTHROPIC\_AUTH\_TOKEN with https://token-plan-cn.xiaomimimo.com/v1 and directs users to add these settings to their config.

Public source snippet (untrusted):

```javascript
del: mimo-v2.5-pro\n` +
                `    apiKeyEnv: ANTHROPIC_AUTH_TOKEN\n` +
                `    baseUrl: https://token-plan-cn.xiaomimimo.com/v1\n` +
                `\nnextAction: fill these fields in .pd/config.yaml runtimeProfiles (or Console -> Control Center). pi-ai is the only runtime backend PD runs internal agents
```

### 10. Medium: Ai Review Evidence
- **Category:** Ai Review
- **Confidence:** 86.0%
- **Path:** .lpm-dependency-evidence-7b20ebc1-ca17-4361-92cc-189c14931e35/0/npm-linux/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js
- **Public source:** [View source](<https://unpkg.com/@principles/pd-cli@1.165.0/.lpm-dependency-evidence-7b20ebc1-ca17-4361-92cc-189c14931e35/0/npm-linux/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js>)

The runtime adapter reads the configured environment variable as its API key when starting a run.

Public source snippet (untrusted):

```javascript
async startRun(input) {
        const runId = crypto.randomUUID();
        const startedAt = new Date().toISOString();
        // Read API key
        const apiKey = process.env[this.config.apiKeyEnv];
        if (!apiKey) {
            throw new PDRuntimeError('runtime_unavailable', `API key not found in env: ${this.config.apiKeyEnv}
```

### 11. Medium: Suspicious Lifecycle Evidence
- **Category:** Manifest
- **Confidence:** 86.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/@principles/pd-cli@1.165.0/package.json>)

The package has no install lifecycle scripts; its CLI is invoked through the declared pd binary.

Public source snippet (untrusted):

```json
"name": "@principles/pd-cli",
  "version": "1.165.0",
  "description": "PD CLI — Pain recording, sample management, and governance tasks for Principles Disciple",
  "type": "module",
  "bin": {
    "pd": "dist/index.js"
  },
  "files": [
    "dist",
    "README.md",
    "LICENSE",
    "NOTICE"
  ],
  "scripts": {
    "build": "npm run clean && tsc -p tsconfig.build.json && node ../../scripts/build/check-dist-hygiene.mjs",
```

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

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

### Published dependency entries
- @principles/codex-adapter ^0.8.1 (Dependency)
- @principles/core ^4.0.1 (Dependency)
- @principles/host-runtime ^2.0.1 (Dependency)
- @principles/install-layout ^0.4.1 (Dependency)
- @principles/workbuddy-adapter ^0.5.2 (Dependency)
- better-sqlite3 ^13.0.3 (Dependency)
- commander ^12.0.0 (Dependency)
- js-yaml ^5.4.3 (Dependency)
- principles-disciple ^2.6.1 (Dependency)

## Package metadata
- **Package:** @principles/pd-cli
- **Ecosystem:** npm
- **Version:** 1.165.0
- **License:** Apache-2.0
- **Version published:** 2026-11-05T07:24:20.984Z
- **Package first seen:** 2026-08-19T11:26:30.912Z
- **Package last seen:** 2026-11-21T06:48:07.645Z
- **Known versions:** 103
- **Latest version:** 2.10.0
- **Appeal under review:** No
- **Description:** PD CLI — Pain recording, sample management, and governance tasks for Principles Disciple
- **Maintainers:** principles-disciple
- **Artifact files:** 455
- **Artifact unpacked size:** 2,796,033 bytes
- **Artifact signatures:** 2
- **Attestations:** Yes
- **Provenance:** https://slsa.dev/provenance/v1

## References
- [HTML security report](<https://firewall.lpm.dev/npm/@principles/pd-cli/v/1.165.0>)
- [Repository](<https://github.com/csuzngjh/principles>)
- [Homepage](<https://github.com/csuzngjh/principles#readme>)
- [Issues](<https://github.com/csuzngjh/principles/issues>)
