Back to skill

Security audit

ChangSheng

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local memory-recovery helper that reads and writes disclosed local state files, with no evidence of hidden network exfiltration or destructive behavior.

Install only if you want an agent to read local memory files at session start and maintain .changsheng state files. Review the discovered paths, avoid broad must_read_extra entries, and enable the PreToolUse hook only if you want user-rule-based action blocking.

Vulnerability Patterns
  • 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
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (37)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared purpose is memory recovery, but the skill also introduces an action-time policy gate that inspects stdin hook payloads and blocks tool use. That is materially different behavior from passive memory restoration, and this mismatch can cause users or hosts to enable a skill with more control over agent actions than they intended.

Ae1

High
Category
analysis-evasion
Content
**Key commands**: `python scripts/memory_index.py` (discover + write the change index) · `python scripts/rule_gate.py --check "<action>"` (optional action-time
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
**Key commands**: `python scripts/memory_index.py` (discover + write the change index) · `python scripts/rule_gate.py --check "<action>"` (optional action-time
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
**Key commands**: `python scripts/memory_index.py` (discover + write the change index) · `python scripts/rule_gate.py --check "<action>"` (optional action-time
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
**Key commands**: `python scripts/memory_index.py` (discover + write the change index) · `python scripts/rule_gate.py --check "<action>"` (optional action-time
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
**Key commands**: `python scripts/memory_index.py` (discover + write the change index) · `python scripts/rule_gate.py --check "<action>"` (optional action-time
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
**Key commands**: `python scripts/memory_index.py` (discover + write the change index) · `python scripts/rule_gate.py --check "<action>"` (optional action-time
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
**Key commands**: `python scripts/memory_index.py` (discover + write the change index) · `python scripts/rule_gate.py --check "<action>"` (optional action-time
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
These lines describe a deliberate product decision to make the published README, SKILL.md, comments, user-facing output, and documentation English-only, while excluding Chinese docs from the published package. That is a natural-language locale policy constraint and the file does not indicate user choice or opt-in for language selection in that release note.

Vague Triggers

Medium
Confidence
92% confidence
Finding
Using a generic trigger like 'handover' creates an ambiguous activation path that can be invoked during ordinary conversation, causing unintended writes of persistent handoff state or workflow transitions. In an always-loaded agent skill, broad natural-language triggers increase prompt-injection and accidental-invocation risk because untrusted content can more easily cause side effects.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The phrase 'recover memory' is broad enough to appear in normal user requests, summaries, or pasted external content, which can unintentionally trigger the skill's recovery workflow. In a memory-oriented skill that reads local files automatically, ambiguous invocation increases the chance that irrelevant or adversarial text causes unnecessary sensitive file access.

Skill Enumeration

Medium
Category
Agent Snooping
Content
|---|---|
| **Hermes** (Nous Research) | Drop into the agent's `skills/` directory, then paste `assets/agents-snippet.md` into `.hermes.md` or `AGENTS.md` → recovery runs automatically. Hermes injects SOUL/MEMORY/USER itself, and the skill detects host-injected identity and skips duplicate reads (the 55-75% cumulative case). |
| **ClawHub / OpenClaw** | Dual-compatible frontmatter (standard + `metadata.hermes`). Install into the skills directory or via your hub client. |
| **Claude Code / Cursor / Codex** | Copy the folder into the project or agent skills directory (`~/.claude/skills/`, etc.); instruct the agent to follow SKILL.md at session start. |
| **Any LLM, any OS** | Recovery logic is pure convention + one Python stdlib script — model-agnostic; Windows / macOS / Linux; no GPU. |

## Why not just another memory plugin?
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The manifest positions the skill as a recovery mechanism that restores prior context cheaply and locally. However, the documented behavior includes writing `.changsheng/rules.json` as an enforcement artifact and repeatedly refreshing `.changsheng/handover.md` as part of context-threshold nudges, which goes beyond passive recovery into ongoing state management and guardrail support.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The stated purpose is cross-session memory recovery and reduced re-read cost. Line L124 introduces a distinct capability: persisting extracted rules and wiring `scripts/rule_gate.py` into platform hooks to hard-enforce behavior by blocking actions, which is not an obvious implementation detail of memory recovery.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill clearly instructs agents to read and write local files, but it does not declare any explicit tool scope or permissions boundary. In agents that rely on manifest-level permissions, this can cause the skill to be granted broader file access than users expect, increasing the chance of unintended reads/writes to sensitive local memory files.

Vague Triggers

Medium
Confidence
94% confidence
Finding
Using a generic activation phrase like "handover" creates a risk of accidental triggering during ordinary conversation. Because the skill ties that phrase to writing persistent state, an unintended mention could cause file writes or overwrite a previous handover snapshot without clear user intent.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The skill describes automatic recovery on session start in broad terms and encourages always-loaded behavior via agent instruction files. This can cause unsolicited file reads at the beginning of sessions, including sensitive identity, rules, todo, and journal data, even when the user did not request memory restoration for that interaction.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
4. **L1 on-demand**: consult detail docs only when a task actually needs them.
5. **Context gauge**: report real context usage — query your platform (Hermes `/status`; Claude Code `/context`; others: see the platform table below). Never invent a percentage; if the platform exposes none, say so. Optionally append `context: N%` to your recovery report. **If `config.yaml` exists with `nudge_thresholds`, read it once and use those lines instead of the 30/50/70 defaults below** (this is how the user tunes when to be nudged).
6. **Check for a handover note**: if `.changsheng/handover.md` exists, read it first (it is the fast pointer to where the last session stopped), then **delete it** — a handover is a one-shot note; keeping it would make the third session read a stale pointer. Authority stays with todos/journal — the handover only accelerates.
7. **Report recovery honestly**: `identity ✅ (host) · rules ✅ CLAUDE.md · todos ✅ docs/TODO.md · journal ✅ journal/2026-09-04.md · rules aligned: 3 (r1 never delete without asking · r2 reply in Chinese · r3 …)`. If a role came up empty, list it explicitly — never claim a full recovery that didn't happen.

### Context threshold nudges
Confidence
75% confidence
Finding
The step instructing the agent to delete `.changsheng/handover.md` automatically after reading is a form of autonomous state-changing behavior without a fresh confirmation. Although the target is narrow and internal, automatic deletion can still remove forensic or workflow context unexpectedly and may be triggered as part of broad session-start automation.

Session Persistence

Medium
Category
Rogue Agent
Content
ChangSheng treats your rules as **memory too** — the most important kind. Two layers make them stick:

**Alignment layer (every session).** At recovery (step 2b) the agent restates the imperative rules it found in your rules files — do's and don'ts alike. You see, in plain text, that what you set is loaded. No rule file yet? Write your rules in `CLAUDE.md`/`AGENTS.md`/your rules file — plain sentences work: *"Never delete files without asking."* *"Always reply in Chinese."* *"Ask before sending anything externally."*

**Enforcement layer (where the platform supports it).** Prohibitions you never want broken ("never", "don't", "always ask first") get written to `.changsheng/rules.json` (id / text / keywords), and a tiny local gate script checks every action before it runs:
Confidence
86% confidence
Finding
The skill is explicitly designed to persist and reload user rules across sessions by reading rule files and materializing them into `.changsheng/rules.json`. Persistent cross-session storage of behavioral instructions can amplify accidental, stale, or poisoned rules and causes future sessions to inherit constraints or behaviors without fresh review.

Intent-Code Divergence

Medium
Confidence
84% confidence
Finding
Lines L186-L188 claim the skill only provides discipline and criteria and 'does not create jobs or scripts of its own'. However, elsewhere the document instructs the agent to carry out recurring write-side maintenance every 3 days and to write artifacts such as a dream report and handover/rules files, which is more than passive guidance. This is an intent-level contradiction in the documentation about how active the skill is.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger phrase "recover memory" is short, generic, and likely to appear in normal conversation about context recovery or prior discussion. In an always-loaded instruction environment, that can cause unintended invocation of the memory-recovery procedure, leading the agent to read workspace memory files or alter startup behavior when the user was only speaking naturally.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The template instructs the agent to react to the single word "handover" without any stated activation boundary, role check, or confirmation step. In a chat environment, such a broad trigger can be invoked accidentally or by an untrusted party, causing unintended state capture or workflow changes across sessions.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
rules.json schema (single source of truth — keep in sync with SKILL.md):
{
  "rules": [
    {"id": "r1", "text": "Never delete files without asking the user first",
     "keywords": ["delete", "remove", "rm ", "unlink"]},
    {"id": "r2", "text": "Never send external messages without approval",
     "keywords": ["send message", "publish", "post to", "email to"]}
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
rules.json schema (single source of truth — keep in sync with SKILL.md):
{
  "rules": [
    {"id": "r1", "text": "Never delete files without asking the user first",
     "keywords": ["delete", "remove", "rm ", "unlink"]},
    {"id": "r2", "text": "Never send external messages without approval",
     "keywords": ["send message", "publish", "post to", "email to"]}
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
rules.json schema (single source of truth — keep in sync with SKILL.md):
{
  "rules": [
    {"id": "r1", "text": "Never delete files without asking the user first",
     "keywords": ["delete", "remove", "rm ", "unlink"]},
    {"id": "r2", "text": "Never send external messages without approval",
     "keywords": ["send message", "publish", "post to", "email to"]}
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Static analysis

No suspicious patterns detected.