Back to skill

Security audit

team-memory

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent local team-memory skill, but it needs Review because it handles sensitive employee data and has verified file-boundary and export weaknesses.

Install only in an environment where the user is authorized to store employee and performance information. Keep the data directory private, avoid public repos or broad cloud sync, and do not share export ZIPs until symlink rejection and member-ID containment checks are fixed. Prefer running scripts with filesystem access limited to the skill directory and its locked data root.

Vulnerability Patterns
  • 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
  • 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

Warning
Location
scripts/migrate-v1-to-v2.sh:48
Finding

Path Traversal Through Unvalidated Member Identifiers

Content
View full analysis
None: nonlocal current if not current: return member_id = current.get("id", "") name = current.get("name", "") alias = current.get("alias", "") if not member_id or not name: errors.append(f"成员配置缺少 id 或 name: {current}") else: members.append(Member(member_id, name, alias)) for key in [name, alias]: if not key: continue old = identity_owner.get(key) if old and old != member_id: errors.append(f"成员名称/别名冲突: {key} 同时指向 {old} 和 {member_id}") identity_owner[key] = member_id current = None ``` The unchecked value is subsequently used to construct and write the migration destination: ```python for member in members: for suffix, target_name in mapping.items(): src = members_dir / f"{member.name}-{suffix}.md" if not src.exists(): continue dst = members_dir / member.member_id / target_name planned.append((src, dst, member)) ``` ```python for src, dst, _ in planned: backup_target = backup_dir / src.relative_to(data_dir) backup_target.parent.mkdir(parents=True, exist_ok=True) shutil.copy2(src, backup_target) dst.parent.mkdir(parents=True, exist_ok=True) shutil.copy2(src, dst) ``` The importer contains the same unchecked configuration parsing pattern: ```python def finish_current() -> None: nonlocal current if not curren ...[truncated 4784 chars]
Remediation
View remediation
str: if not MEMBER_ID_RE.fullmatch(member_id): raise ValueError(f"Invalid member ID: {member_id!r}") return member_id ``` 2. Resolve every destination and explicitly enforce containment: ```python members_root = (data_dir / "members").resolve() destination = (members_root / member_id / "timeline.md").resolve() if not destination.is_relative_to(members_root): raise TeamMemoryPathError("Member path escapes the locked members directory") ``` 3. Apply containment checks before all reads, writes, copies, backups, directory creation, and existence checks. 4. Reject absolute identifiers, path separators, `.` and `..` components, control characters, and platform-specific separator variants. 5. Reject symlinked destination directories and files. Where practical, inspect each existing path component with `lstat()` and fail if any component is a symbolic link. 6. Validate member IDs parsed from both `skill-config.yaml` and `tasks/tasks.md`; do not assume that Markdown generated by another script remains trusted. 7. Add regression tests covering relative traversal, absolute paths, nested separators, symlink destinations, and valid `member-NNN` identifiers. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/export-data.py:67
Finding

Export Process Follows Symbolic Links and Can Package External Files

Content
View full analysis
str: try: return str(path.resolve().relative_to(base.resolve())) except ValueError: return str(path.resolve()) ``` ### Technical Analysis `Path.is_file()`, normal file opening, and `ZipFile.write()` follow a symbolic link to its target. Consequently, a symlink stored beneath the Team Memory data tree can point to a readable file elsewhere on the host. Although the directory traversal begins under the locked data directory, the exporter ...[truncated 1800 chars]
Remediation
View remediation
Vulnerability Patterns
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (30)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
4. 如果没有命中,询问是否创建新成员;创建时使用 `scripts/new-member.sh`。

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill clearly instructs the agent to read and write local files and execute shell/Python scripts, but it does not declare any explicit tool scope or permission boundaries. That creates a real security risk because an integrating platform may grant broader-than-necessary access, enabling unintended file modification, data disclosure, or command execution against sensitive local team records.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This skill is designed to store highly sensitive employee performance notes, complaints, stakeholder feedback, and promotion evidence, yet the description does not prominently warn users about the privacy and employment sensitivity of that data. In practice, this increases the chance that operators mishandle personal data, index files, exports, or backups without applying appropriate consent, retention, and access controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The template explicitly instructs storing real names and detailed employee and stakeholder records, including performance observations, 1:1 notes, complaints, and management assessments. Even though it mentions local privacy protection, this file does not provide minimization, consent, retention, access control, or redaction guidance, creating a real privacy and insider-risk issue if users follow the template as written.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file is entirely written as Chinese-only user/system interaction examples, which effectively imposes a specific language on users. Under the policy, language constraints should either be optional for the user or clearly documented as region-specific and justified, neither of which appears here.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are very broad, natural-language aliases for common managerial requests, so this reference can be invoked unintentionally during ordinary conversation. In a skill handling sensitive team memory, accidental invocation may surface private summaries, personnel signals, or evidence indexes when the user did not explicitly intend to access this specific capability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

该技能文档整体以中文编写,且未说明是否支持其他语言、是否可由用户选择语言,或为何必须使用中文。根据规则,若技能在自然语言层面强制特定语言而没有用户选择或明确、合理的限定,属于语言/地区策略风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all operational and upgrade instructions exclusively in Chinese. The policy for natural-language violations calls out language or locale constraints when a skill forces a specific language without user opt-in, and this document does not provide an alternative language option or indicate that Chinese is optional.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guide explicitly supports generating performance materials and promotion evaluations from longitudinal team-memory data, which is highly sensitive HR/personnel information with employment impact. While it includes some evidence-quality rules, it does not add explicit safeguards for sensitive personal data handling, access control, minimization, human review, or warnings against automated decision-making, creating real privacy, bias, and misuse risk.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/adopt-data.py (reported line 140)May include surrounding context.

python
def run_doctor(skill_dir: Path) -> None:
    subprocess.run([sys.executable, str(skill_dir / "scripts" / "doctor.py"), "--skill-dir", str(skill_dir)], check=False)


def run_rebuild_index(skill_dir: Path) -> int:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script parses markdown using fixed Chinese labels like "反馈类型", "证据等级", and "核实状态", and later emits all report content in Chinese. This imposes a specific language/locale on users without opt-in or documented regional justification, which matches the language-policy violation criterion.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/adopt-data.py (reported line 144)May include surrounding context.

python
def run_rebuild_index(skill_dir: Path) -> int:
    return subprocess.run(
        [sys.executable, str(skill_dir / "scripts" / "rebuild-index.py"), "--skill-dir", str(skill_dir)],
        check=False,
    ).returncode

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/export-data.py (reported line 26)May include surrounding context.

python
def run_rebuild_index(skill_dir: Path) -> int:
    return subprocess.run(
        [sys.executable, str(skill_dir / "scripts" / "rebuild-index.py"), "--skill-dir", str(skill_dir)],
        check=False,
    ).returncode

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script prints its completion and summary messages only in Chinese (已导出, 文件数, 包含). This forces a specific language for users regardless of their locale or preferences, which matches the policy-violation category for language/locale constraints without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This shell script contains user-facing comments and runtime messages entirely in Chinese, including usage/help-like output and status messages. Under the stated policy, forcing a specific language without user opt-in or justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · scripts/rebuild-index.py (reported line 471)May include surrounding context.

python
for event in events:
            conn.execute(
                """
                INSERT INTO events VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
                """,
                (
                    event["event_key"],

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python file contains multiple user-facing status messages and generated report headings in Chinese, including console prints and markdown report content. Because the skill does not offer a language/locale option or explain that it is intentionally region-specific, this is a natural-language locale policy concern under the stated rules.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file defines priority values and task section labels entirely in Chinese, and later parsing/rendering logic depends on these exact locale-specific strings. This effectively forces a specific language format without user opt-in or an explicit documented justification in the file, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

User-visible strings in the script are written in Chinese, including errors, status labels, dashboard content, and notices, but the CLI description does not indicate that the tool is Chinese-only or provide any opt-in language selection. This can violate language/locale policy because the skill effectively forces one language for all users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script persists generated Markdown, SVG, and JSON dashboard files that contain sensitive team memory data, including member names, performance signals, stakeholder feedback, and evidence references. In a privacy-focused local memory system, silently writing these artifacts to disk increases the chance of unintended retention, backup propagation, or access by other local users/processes, especially because JSON/SVG exports broaden the number of copies of sensitive material.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This module presents user-facing error text in Chinese, and similar Chinese-only strings appear throughout the file. Under the stated policy, forcing a specific language without user opt-in or documented locale justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This manifest sets language: "zh-CN" as a fixed output locale. Under the policy, forcing a specific language without offering user choice or documenting a justified region-specific constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

All user-facing instructions and descriptions in the skill are presented in Chinese, which effectively forces a specific language for users. The file does not mention that the skill is Chinese-only, provide an opt-in language choice, or justify the locale limitation as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire markdown file presents operational instructions only in Chinese, which can constitute a language/locale policy issue when no user choice or opt-in is provided. There is no indication that the skill is intentionally region-specific or that alternative language support is offered.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

All headings and instructions in the skill file are in Chinese, which effectively forces a specific language for users of the skill. There is no indication that Chinese is optional, user-selected, or required for a documented region-specific purpose.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/team-dashboard.py:31