Back to skill

Security audit

adaptive-identity-agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is a role/persona-stacking assistant, but it requests shell and file-editing powers that its own documented workflow does not need.

Review this skill before installing. Its persona and memory-thread behavior is disclosed and not inherently unsafe, but the package should not need Bash, Write, or Edit for the documented workflow. Prefer a version limited to reading bundled references and optional web fact-checking, and avoid using it in sensitive workspaces unless those mutation and shell permissions are removed or tightly controlled.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:8
Finding
Overprivileged Tool Configuration Enables Unnecessary Shell Execution and File Modification## Vulnerability Details **File Location**: `SKILL.md`, line 8 **Vulnerability Type**: Excessive tool permissions that violate least privilege **Risk Level**: Medium ### Vulnerable Code Snippet ```yaml allowed-tools: Read, Write, Edit, Glob, Grep, Bash, WebSearch, WebFetch ``` ### Technical Analysis The skill requests `Write`, `Edit`, and `Bash` capabilities even though its declared function is to adapt conversational identity perspectives, read bundled reference material, and optionally verify facts online. Those capabilities are not required for the documented workflow. In particular, `Bash` provides a general-purpose local command-execution channel, while `Write` and `Edit` permit filesystem modification. This conflicts with the project's stated read-only operating model: ```markdown 参考身份库 `references/identity-matrix.md` 为可选参考、运行时只读:叠加/卸载/唤醒是会话内状态,不修改库文件、不回写叠加记录。 ``` The project contains no scripts or implementation that directly exercises these permissions. Therefore, this finding concerns exposed capability and attack surface rather than evidence that commands are currently executed maliciously. Nevertheless, making unnecessary privileged tools available weakens isolation and could let adversarial input steer the agent into operations beyond the skill's legitimate purpose. ### Attack Path 1. The skill is loaded, making all tools listed in `allowed-tools` available to the agent. 2. An attacker submits a task, embedded instruction, or indirect prompt that requests a shell command or filesystem modification. 3. Because `Bash`, `Write`, and `Edit` are authorized at the skill level, the agent may invoke them despite those operations being unrelated to identity stacking. 4. Depending on runtime sandboxing and the agent's effective account permissions, the operation could execute local commands or alter accessible files. No automatic trigger, persistence mechanism, or remote payload retrieval behavior was found in the reviewed project. ### Impact Asses ...[truncated 722 chars]
Remediation
## Remediation Suggestions 1. Apply least privilege by removing tools unnecessary for the declared workflow: ```yaml allowed-tools: Read, Glob, Grep, WebSearch, WebFetch ``` 2. Remove `Bash`, `Write`, and `Edit` unless a concrete, documented feature requires them. 3. Consider omitting `WebSearch` and `WebFetch` by default and enabling them only when the user explicitly requests current factual verification. 4. If future functionality genuinely requires file modification: - Restrict writes to a dedicated application-owned directory. - Require explicit user confirmation before every mutation. - Reject absolute paths and path traversal sequences. - Prevent modification of skill definitions, reference files, executable files, configuration, and startup locations. 5. If shell execution becomes necessary: - Replace general-purpose `Bash` access with narrowly scoped tools. - Use fixed executable allowlists and structured arguments. - Prohibit shell interpolation and dynamic command construction. - Run commands in a sandbox with minimal filesystem and network access. 6. Add automated validation that rejects tool declarations exceeding those required by the documented execution framework.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list is extremely broad and includes common conversational concepts such as identity switching, cross-domain tasks, and @identity patterns, making accidental invocation likely. Because the skill also has powerful tool access and dynamic role behavior, overbroad activation increases the chance that users are routed into this behavior without clear consent or understanding.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The skill activates based on inferred 'potential needs,' emotion cues, and scene prediction rather than explicit user requests, which creates ambiguous and overly permissive activation conditions. This can cause unintended persona switching, memory-thread behavior, or tool-enabled workflows to start from ordinary conversation, weakening user control and increasing the attack surface for prompt steering.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
Setting '数字原生·中文简体·当代' as the default cultural module imposes a specific locale and cultural framing without prior user choice. While not a direct code-execution risk, it can bias outputs, reduce user autonomy, and lead to inappropriate default assumptions in multilingual or cross-cultural contexts.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The file states "语言=跟随用户(默认中文简体)", which establishes a default locale preference rather than purely deferring to the user's choice. Under the policy, forcing or defaulting to a specific language without explicit opt-in can be a language/locale policy violation unless clearly justified.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The file prescribes fixed Chinese output formats for every response and system annotation without providing a user-language preference or fallback path. In an agent skill, this can degrade safety and usability because users may miss critical disclosures, identity-stack notices, or limitation warnings if they are presented only in a language the user does not understand.

Static analysis

No suspicious patterns detected.