Back to skill

Security audit

Hermes Doctor

Security checks for vulnerabilities and agentic risk

Overview

This is a legitimate Hermes troubleshooting skill, but it includes unsafe credential-handling steps that can expose, duplicate, archive, or delete sensitive authentication data.

Install only if you are comfortable with a troubleshooting agent inspecting and modifying Hermes credential stores. Do not paste raw command output, request dumps, .env files, auth.json files, or backup archives into chat or support tickets. Prefer redacted presence checks, interactive secret entry, encrypted backups, and explicit confirmation before deleting or editing credentials, especially anything under ~/.claude.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
templates/triage-checklist.md:48
Finding

Diagnostic commands disclose plaintext API keys from multiple credential stores

Content
View full analysis
&1 | grep -iE "API_KEY|HERMES_HOME" env | grep -iE "API_KEY|HERMES" | head -10 cat "$HOME_DIR/auth.json" | python -c "import sys,json; d=json.load(sys.stdin); print(list(d['credential_pool'].keys()))" grep -E "^[A-Z_]+_API_KEY=" "$HOME_DIR/.env" grep -E "api_key|provider|base_url" "$HOME_DIR/config.yaml" | head -20 ``` ### Technical Analysis The triage procedure prints complete API-key assignments from the Windows user registry, current process environment, `.env`, and potentially `config.yaml`. The output is not redacted and is broader than necessary because it enumerates every matching API key rather than checking only whether the affected provider has a configured credential. Although access to credential configuration is relevant to authentication troubleshooting, displaying the secret values is unnecessary. The Agent generally only needs the variable name, whether it is set, its source, and possibly a non-reversible fingerprint. The output may be captured by: - Agent conversation context and execution transcripts - Terminal scrollback or session recording - CI and diagnostic logs - Remote support sessions - Screenshots or copied troubleshooting reports - Other processes or users with access to retained logs ### Attack Path 1. A user invokes the Skill to investigate an authentication failure. 2. The Skill directs the Agent to execute the mandatory triage checklist. 3. The registry, shell environment, `.env`, and configuration searches print plaintext API keys. 4. The command output becomes part of the Agent context or terminal transcript. 5. A log reader, support recipient, local user, or compromised integration retrieves the exposed credentials. 6. The credentials are used to access the corresponding model providers ...[truncated 513 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/auth-troubleshooting.md:17
Finding

Replacement API keys are exposed through command-line arguments and shell commands

Content
View full analysis
/dev/null | awk '/HERMES_HOME/{print $NF}')" [ -z "$HOME_DIR" ] && HOME_DIR="$HOME/.hermes" TS=$(date +%Y%m%d-%H%M%S) cp "$HOME_DIR/.env" "$HOME_DIR/.env.broken-$TS" cp "$HOME_DIR/auth.json" "$HOME_DIR/auth.json.broken-$TS" echo 'DEEPSEEK_API_KEY=sk-NEWKEY' >> "$HOME_DIR/.env" ``` ### Technical Analysis The Skill directs users or Agents to interpolate live API keys into command-line arguments and `echo` commands. Command-line arguments may be exposed through: - Shell history - Process-list inspection while the command is running - Operating-system auditing - Endpoint monitoring and telemetry - Agent tool-call transcripts - Debug logs and command wrappers The `echo` approach additionally records the entire credential in shell history and writes it to `.env` without enforcing owner-only file permissions. The Skill also creates plaintext backup copies of `.env` and `auth.json`, increasing the number and lifetime of credential-bearing files. ### Attack Path 1. The user supplies a replacement API key to repair authentication. 2. The Agent substitutes the key into the documented `--api-key` or `echo` command. 3. The command is retained in shell history, Agent logs, operating-system telemetry, or process metadata. 4. A local user, log collector, support operator, or compromised monitoring component reads the retained command. 5. The extracted API key ...[truncated 490 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/backup-and-migrate.md:11
Finding

Backup procedures create unencrypted archives containing credentials and private Agent data

Content
View full analysis
&1 | awk -F': ' '/HERMES_HOME/{print $2; exit}')" TS=$(date +%Y%m%d-%H%M%S) tar czf ~/hermes-backup-$TS.tar.gz -C "$(dirname "$HOME_DIR")" "$(basename "$HOME_DIR")" tar czf ~/hermes-config-$TS.tar.gz -C "$HOME_DIR" .env config.yaml auth.json ``` The Windows-compatible alternative is: ```bash (cd "$HOME_DIR" && zip -r ~/hermes-config-$TS.zip .env config.yaml auth.json) ``` The documented migration then transfers the full archive: ```bash hermes backup scp ~/hermes-backup-*.zip newhost:~/ ``` The full backup is documented as including `.env`, `auth.json`, `memories/`, `skills/`, `sessions/`, `profiles/`, `SOUL.md`, and `USER.md`. ### Technical Analysis The backup guidance consolidates API keys, OAuth material, configuration secrets, conversation history, long-term memory, user-profile information, and installed Skill content into predictable plaintext archive files. SCP protects the transport channel, but it does not encrypt the archive at rest before or after transfer. The procedure does not: - Enforce restrictive archive permissions - Encrypt the archive - Minimize included data - Separate credentials from ordinary configuration - Verify destination ownership - Define archive retention or secure deletion - Warn that Agent memories and sessions may contain additional secrets Consolidation substantially increases impact because an attacker needs to steal only one file to acquire several categories of sensitive data. ### Attack Path 1. The user follows the backup or migration procedure. 2. The Skill creates a plaintext ZIP or TAR archive under a predictable filename in the user's home directory. 3. The archive remains on the old or new host after migration. 4. A local compromise, permissive file ...[truncated 782 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/credential-pool-and-rotation.md:78
Finding

Hermes troubleshooting recommends deleting another application's OAuth credential

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:56
Finding

Installation guidance executes an unpinned package globally from a mutable registry source

Content
View full analysis
Remediation
View remediation
`. - Publish and verify package integrity information. - Identify the expected npm publisher and official package location. - Avoid global installation where practical; use an isolated, project-scoped environment. - Do not recommend administrator or root execution. - Review lifecycle scripts and consider initially installing with scripts disabled for verification. - Document how users can verify package signatures, checksums, or provenance attestations. - Regularly review and update the pinned version through a controlled dependency-update process. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (62)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 88)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 96)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 98)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 66)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/known-issues.json (reported line 18)May include surrounding context.

json
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/known-issues.json (reported line 40)May include surrounding context.

json
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/known-issues.json (reported line 43)May include surrounding context.

json
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/known-issues.json (reported line 131)May include surrounding context.

json
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/known-issues.json (reported line 170)May include surrounding context.

json
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/known-issues.json (reported line 171)May include surrounding context.

json
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/known-issues.json (reported line 174)May include surrounding context.

json
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/config-and-paths.md (reported line 26)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/credential-pool-and-rotation.md (reported line 78)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/fallback-and-rate-limit.md (reported line 25)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/fallback-and-rate-limit.md (reported line 80)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/fallback-and-rate-limit.md (reported line 87)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/fallback-and-rate-limit.md (reported line 89)May include surrounding context.

md
---
name: hermes-doctor
description: 诊断与抢救 Hermes Agent (NousResearch) 故障 — 401/Authentication Fails、provider 切换后 key 没注入、credential_pool 缺条目、HERMES_HOME 被环境变量重定向、gateway lock、stale config、备份恢复。Windows 优先。覆盖 .env / auth.json / HKCU\Environment / config.yaml profile 四处残留点排查、hermes auth 子命令族(v2026.4.3+)、credential_pool 4 种 rotation 策略、已知 issues #16394/#15914/#3685/#16677 等的完整 workaround。
version: 1.1.0
license: MIT
homepage: https://github.com/dongsheng123132/hermes-doctor

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The skill recommends manual editing of .env and auth.json, both of which commonly contain live API credentials, and states they may need to be 'double-written' for stability. That creates a real risk of exposing, duplicating, or mishandling secrets and of expanding the attack surface by storing the same credential in multiple places, especially if an agent echoes contents back to the user or writes insecure backups.

Content

Scanner excerpt · SKILL.md (reported line 107)May include surrounding context.

md
1. **`hermes auth` 子命令**(v2026.4.3+,推荐) — `hermes auth add/remove/list/reset`,见 references/credential-pool-and-rotation.md。先 `hermes auth --help` 看你装的版本支不支持
2. **`hermes doctor --fix`** — 修 stale config / WAL / symlink,不动 key
3. **手工 edit `.env` + `auth.json`** — `hermes auth` 不可用或版本太旧时(参 references/auth-troubleshooting.md)。**关键**:目前主流版本(0.10.x 及之前)的 `_resolve_api_key_provider_secret()` 只读 env,不读 credential_pool(issue #15914),所以 .env 和 auth.json 通常需要**双写**才稳定
4. **`hermes setup`** — 重跑全量 wizard,但 issue #16394 让它在 .env 已有 KEY 行时静默跳过,所以先删 .env 那行再跑
5. **重装 venv** — 升级到人工

Credential Access

High
Category
Privilege Escalation
Confidence
86% confidence
Finding

The instruction to delete the .env key line before rerunning setup can cause accidental credential loss or service interruption, and it normalizes direct manipulation of secret stores without pairing the step with immediate safeguards. In an agent setting, that can lead to unsafe automated handling of credentials or destructive edits before the user understands the consequences.

Content

Scanner excerpt · SKILL.md (reported line 108)May include surrounding context.

md
1. **`hermes auth` 子命令**(v2026.4.3+,推荐) — `hermes auth add/remove/list/reset`,见 references/credential-pool-and-rotation.md。先 `hermes auth --help` 看你装的版本支不支持
2. **`hermes doctor --fix`** — 修 stale config / WAL / symlink,不动 key
3. **手工 edit `.env` + `auth.json`** — `hermes auth` 不可用或版本太旧时(参 references/auth-troubleshooting.md)。**关键**:目前主流版本(0.10.x 及之前)的 `_resolve_api_key_provider_secret()` 只读 env,不读 credential_pool(issue #15914),所以 .env 和 auth.json 通常需要**双写**才稳定
4. **`hermes setup`** — 重跑全量 wizard,但 issue #16394 让它在 .env 已有 KEY 行时静默跳过,所以先删 .env 那行再跑
5. **重装 venv** — 升级到人工

## 详细资料

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The troubleshooting guidance directs users to access and populate credential-bearing locations such as .env and auth.json, including adding access_token values manually. In an agent skill context, normalizing direct secret editing is dangerous because it encourages plaintext credential storage and handling outside dedicated secret-management controls.

Content

Scanner excerpt · references/auth-troubleshooting.md (reported line 26)May include surrounding context.

但目前主流版本(0.10.x 及之前)仍命中 issue #15914 — hermes_cli/auth.py 中 _resolve_api_key_provider_secret() 只读 os.getenv(),不读 credential_pool。所以即便 hermes auth add 成功,启动时 env 里没对应 KEY 仍然 fallback 到占位符。这种版本统一改用路径 B。

修复路径 B(手工 .env + auth.json 双写,标准修法):

  1. 备份:cp "$HOME_DIR/auth.json" "$HOME_DIR/auth.json.broken-$(date +%Y%m%d-%H%M%S)" 同时备 .env
  2. 编辑 auth.json,在 credential_pool.<provider> 下加一个对象:
    json

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The JSON example tells the user to insert a live key into access_token and also to mirror it in .env, creating multiple plaintext copies of the same secret. Duplicating secrets across files expands the attack surface and raises the likelihood of leakage through backups, local compromise, debugging artifacts, and version control mistakes.

Content

Scanner excerpt · references/auth-troubleshooting.md (reported line 27)May include surrounding context.

但目前主流版本(0.10.x 及之前)仍命中 issue #15914 — hermes_cli/auth.py 中 _resolve_api_key_provider_secret() 只读 os.getenv(),不读 credential_pool。所以即便 hermes auth add 成功,启动时 env 里没对应 KEY 仍然 fallback 到占位符。这种版本统一改用路径 B。

修复路径 B(手工 .env + auth.json 双写,标准修法):

  1. 备份:cp "$HOME_DIR/auth.json" "$HOME_DIR/auth.json.broken-$(date +%Y%m%d-%H%M%S)" 同时备 .env
  2. 编辑 auth.json,在 credential_pool.<provider> 下加一个对象:
    json
    {
    

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

The statement that Hermes will auto-read DEEPSEEK_API_KEY from .env and that 'double write is safest' reinforces a workflow that stores the same API key in multiple plaintext locations. In troubleshooting documentation, that materially increases the chance of credential exposure and persistence beyond the repair window.

Content

Scanner excerpt · references/auth-troubleshooting.md (reported line 48)May include surrounding context.

md
4. **必须重启 hermes 进程** — auth 是启动时加载的
5. 验证:再发一次请求,看 `<HOME_DIR>/sessions/request_dump_*.json` 里 Authorization 已变成真 key 前 8 位 + `****`

**实战记录**:实地修过一例 — `auth.json.credential_pool.deepseek` 数组缺失 + 命中 #15914,hermes 启动后会自动从 .env 读取 DEEPSEEK_API_KEY 补全 pool,ping → pong。所以**双写最稳**。

## 类型 2:`hermes setup` 静默跳过 API key 输入(issue #16394)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/auth-troubleshooting.md (reported line 58)May include surrounding context.

修复:

bash
cp "$HOME_DIR/.env" "$HOME_DIR/.env.broken-$(date +%Y%m%d-%H%M%S)"
# 编辑 .env,删掉 DEEPSEEK_API_KEY=... 那一行(或注释掉)
hermes setup           # 这次会弹输入框

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The manual backup instructions create archives containing .env and auth.json, which are high-value credential stores. This is dangerous because it normalizes packaging secrets into portable files that can be copied to other hosts, synced to cloud storage, or left on disk unencrypted, significantly increasing the chance of credential theft if the archive is exposed.

Content

Scanner excerpt · references/backup-and-migrate.md (reported line 25)May include surrounding context.

tar czf ~/hermes-backup-$TS.tar.gz -C "$(dirname "$HOME_DIR")" "$(basename "$HOME_DIR")"

只备 config(快)

tar czf ~/hermes-config-$TS.tar.gz -C "$HOME_DIR" .env config.yaml auth.json

text

Windows Git Bash 可用相同命令,zip 也行:`(cd "$HOME_DIR" && zip -r ~/hermes-config-$TS.zip .env config.yaml auth.json)`。