Back to skill

Security audit

GitHub配置同步

Security checks for vulnerabilities and agentic risk

Overview

This GitHub sync skill can automatically upload and restore Hermes secrets, sessions, memories, and skills with too little user control.

Review carefully before installing. Use only a private repository you own, remove .env, auth.json, sessions, and any secrets from the sync flow, check git status and diffs before every push, and do not pull memories or skills from a repository unless you trust and have reviewed the exact changes.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/hermes-sync.sh:34
Finding

Automatic Collection and Git Upload of Credentials and Private Hermes Data

Content
View full analysis
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
scripts/hermes-sync.sh:62
Finding

Unverified Remote Content Can Overwrite Persistent Memories and Installed Skills

Content
View full analysis
/dev/null || true cp -r skills/* "$HERMES_DIR/skills/" 2>/dev/null || true [ -f ".env" ] && cp .env "$HERMES_DIR/.env" [ -f "auth.json" ] && cp auth.json "$HERMES_DIR/auth.json" [ -d "sessions" ] && cp -r sessions/* "$HERMES_DIR/sessions/" 2>/dev/null || true ``` ### Technical Analysis Pull mode retrieves the latest content from the configured Git remote and immediately copies that content into active Hermes directories. There is no commit pinning, signature verification, checksum validation, file review, trusted-author policy, or confirmation prompt. The affected destinations include: - `~/.hermes/memories`, which represents persistent Agent state. - `~/.hermes/skills`, which can contain Agent instructions and executable scripts. - `~/.hermes/config.yaml`, which controls Hermes configuration. - `~/.hermes/.env` and `~/.hermes/auth.json`, which may control credentials and authentication state. - `~/.hermes/sessions`, which contains conversation state. Because `git pull` obtains a mutable remote revision, the effective payload can change after this Skill package has been audited. A repository maintainer, compromised GitHub account, malicious collaborator, or attacker who gains write access to the remote can introduce content that will be imported during the next pull. Copying attacker-controlled files into the memory directory enables persistent memory poisoning. Copying them into the skills directory can alter instructions and may lead to code execution later if Hermes loads or invokes scripts from an imported Skill. The shell script itself does not directly ...[truncated 2230 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (24)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README explicitly instructs users to copy the entire Hermes configuration, memories, and skills directories into a Git repository and push them to GitHub, but it provides no warning about secrets, tokens, private prompts, personal data, or embedded credentials that may exist in those files. In this context, the omission is dangerous because users are encouraged to publish or sync highly sensitive local application state to a remote service, potentially exposing credentials and private data across devices or through repository misconfiguration.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill markets itself as a simple Hermes config/data sync tool, but the documented behavior includes committing and pushing data to a remote GitHub repository and optionally syncing highly sensitive files such as .env, auth.json, and sessions. That mismatch prevents informed consent and increases the chance users will expose credentials, tokens, or private conversation history without appreciating the risk.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger list includes broad everyday terms like 同步, github, git, 备份, 上传, 下载, which can cause the skill to activate in many unrelated contexts. Overbroad activation is dangerous here because the skill contains instructions that can move sensitive data into a Git repository and overwrite local Hermes state.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

The upload workflow copies .env, auth.json, and sessions from the Hermes directory into a Git-tracked location, enabling collection and remote transmission of credentials and private session data. In this context, the skill is not merely reading config; it is operationalizing secret access and publication.

Content

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

md
cp ~/.hermes/config.yaml .
cp -r ~/.hermes/memories .
cp -r ~/.hermes/skills .
cp ~/.hermes/.env .           # 可选,包含API密钥
cp ~/.hermes/auth.json .      # 可选,包含认证信息
cp -r ~/.hermes/sessions .    # 可选,对话历史

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill normalizes copying API keys and authentication data into GitHub-backed storage with only mild wording like 'optional' rather than a strong risk warning. In the context of a sync skill, users may follow the steps mechanically and inadvertently expose long-lived secrets that enable account takeover or third-party API abuse.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instructions explicitly direct users to place .env and auth.json into a GitHub-synced repository. This is a direct secret-handling anti-pattern that can expose API keys, tokens, and authentication state to any party gaining repository or device access.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The download workflow restores .env and auth.json onto another machine, propagating secrets and auth state across devices. This increases blast radius if any synced copy is compromised and can violate least-privilege expectations for per-device authentication.

Content

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

md
cp config.yaml ~/.hermes/config.yaml
cp -r memories/* ~/.hermes/memories/
cp -r skills/* ~/.hermes/skills/
cp .env ~/.hermes/.env           # 可选
cp auth.json ~/.hermes/auth.json # 可选
cp -r sessions/* ~/.hermes/sessions/  # 可选

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

The sync content table explicitly identifies .env and auth.json as sensitive yet still includes them in the documented sync scope, reinforcing unsafe handling of credentials. This makes the dangerous behavior easier to justify and repeat despite acknowledging the data sensitivity.

Content

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

md
| config.yaml | 主配置文件 | 否 |
| memories/ | 个人记忆和偏好 | 否 |
| skills/ | 所有技能 | 否 |
| .env | API密钥(可选) | ⚠️ 是 |
| auth.json | 认证信息(可选) | ⚠️ 是 |
| sessions/ | 对话历史(可选) | 否 |
| reddit_research/ | 创业研究数据 | 否 |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
84% confidence
Finding

The documented workflow culminates in git push, which sends all staged files to a remote repository. In the context of earlier steps that copy broad Hermes contents and optional secrets into the repo, this becomes a high-risk publication step that can exfiltrate sensitive local data.

Content

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

md
│  cp -r ~/.hermes/skills .                               │
│  git add .                                              │
│  git commit -m "更新配置"                                │
│  git push                                               │
└─────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────┐

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
92% confidence
Finding

The rollback command git reset --hard HEAD^ paired with git push --force can destroy local and remote history, causing data loss and hard-to-recover state across synchronized devices. This is especially risky in a backup/sync skill where preserving history and recoverability should be central.

Content

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

回滚

bash
# 回滚到上一个版本
git reset --hard HEAD^
git push --force

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

Copying the .env file into a Git-backed sync directory is direct credential handling and can disclose API keys, secrets, and environment-based authentication material to anyone with repository access. In a sync-to-GitHub skill, this is especially dangerous because exfiltration can happen through routine use rather than a separate attack step.

Content

Scanner excerpt · scripts/hermes-sync.sh (reported line 39)May include surrounding context.

sh
cp -r "$HERMES_DIR/skills" .
    
    # 可选文件
    [ -f "$HERMES_DIR/.env" ] && cp "$HERMES_DIR/.env" .
    [ -f "$HERMES_DIR/auth.json" ] && cp "$HERMES_DIR/auth.json" .
    [ -d "$HERMES_DIR/sessions" ] && cp -r "$HERMES_DIR/sessions" .

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script explicitly copies .env, auth.json, and sessions into a Git repository, which can expose API keys, bearer tokens, refresh tokens, and authenticated session material if the repository is pushed to a remote. Storing credential artifacts in source control creates a durable, easily replicated leak path and can enable direct account compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script silently stages and pushes highly sensitive credential and session files without any explicit warning, consent prompt, or visibility into what is being uploaded. Because the skill is marketed as convenient sync, users may not realize they are publishing secrets and active sessions to a remote Git service.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

This finding reflects the same credential-restoration behavior in the pull path: secret-bearing files are copied from the repository into the active Hermes directory. That design turns the repository into a credential transport mechanism and magnifies the blast radius of any repo compromise or accidental exposure.

Content

Scanner excerpt · scripts/hermes-sync.sh (reported line 70)May include surrounding context.

sh
cp -r skills/* "$HERMES_DIR/skills/" 2>/dev/null || true
    
    # 可选文件
    [ -f ".env" ] && cp .env "$HERMES_DIR/.env"
    [ -f "auth.json" ] && cp auth.json "$HERMES_DIR/auth.json"
    [ -d "sessions" ] && cp -r sessions/* "$HERMES_DIR/sessions/" 2>/dev/null || true

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

This finding reflects the same credential-restoration behavior in the pull path: secret-bearing files are copied from the repository into the active Hermes directory. That design turns the repository into a credential transport mechanism and magnifies the blast radius of any repo compromise or accidental exposure.

Content

Scanner excerpt · scripts/hermes-sync.sh (reported line 70)May include surrounding context.

sh
cp -r skills/* "$HERMES_DIR/skills/" 2>/dev/null || true
    
    # 可选文件
    [ -f ".env" ] && cp .env "$HERMES_DIR/.env"
    [ -f "auth.json" ] && cp auth.json "$HERMES_DIR/auth.json"
    [ -d "sessions" ] && cp -r sessions/* "$HERMES_DIR/sessions/" 2>/dev/null || true

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

All user-facing instructions in the file are presented in Chinese, with no alternative language option or opt-in. This can violate a language/locale policy when a skill forces a specific language without user choice and no region-specific justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language content of the skill, including its description, scenarios, instructions, and FAQ, is presented exclusively in Chinese. There is no indication that the skill offers language choice or that the Chinese-only constraint is required for a region-specific or compliance-specific purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instructions tell users to copy credential-bearing files and authentication artifacts into a Git repository as part of routine sync. Even if the repository is intended to be private, this greatly expands the attack surface through accidental exposure, collaborator access, device compromise, or future repository misconfiguration.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The FAQ states that syncing .env to a private repository is acceptable, which downplays the real risk of secret compromise. Private repositories are not equivalent to secret stores; misconfiguration, token theft, collaborator access, backups, and audit gaps can still expose credentials.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The FAQ encourages syncing arbitrary additional files beyond the stated Hermes configuration scope. This broadens the skill into a generic exfiltration or oversharing workflow, increasing the chance that users place sensitive local files into version control and push them remotely without adequate review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The rollback section recommends git reset --hard and git push --force without warning that these commands permanently discard local history and rewrite remote history. Users can easily destroy configuration history, lose unsaved work, or break synchronization across devices.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script does more than sync harmless configuration: it copies Hermes memories, skills, and other runtime artifacts into a Git working tree and then pushes them upstream. In this context, those files may contain prompts, internal state, proprietary skill code, or sensitive user data, so automatically publishing them to GitHub materially increases exposure beyond ordinary config backup.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The pull workflow overwrites local Hermes files from repository contents with no confirmation, backup, or integrity check. If the remote repository is outdated, maliciously modified, or simply wrong for the device, the user can lose local configuration or import unsafe skill content and stale credentials.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

All user-facing comments and console messages are in Chinese, which imposes a language choice on users without opt-in. The file does not indicate that this skill is intentionally limited to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.