Back to skill

Security audit

Record Keeper

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent record keeper, but it automatically sends record contents to an external embedding service and indexes broad local record data without clear opt-in controls.

Review before installing. Use this only in workspaces where sending record text and search queries to SiliconFlow is approved. Do not store confidential personnel, financial, customer, incident, credential, or unreleased planning data unless the organization has accepted that data flow. Prefer adding explicit opt-in, local embeddings, category/file exclusions, redaction, and symlink/path validation before production use.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/embed.py:303
Finding

Mandatory External Transmission of Potentially Sensitive Record Contents

Content
View full analysis
list[float]: MAX_CHARS = 15000 if len(text) > MAX_CHARS: text = text[:MAX_CHARS] client = get_client() for attempt in range(1, 4): try: response = client.embeddings.create( model=CONFIG["model"], input=text ) return response.data[0].embedding except Exception: if attempt < 3: import time time.sleep(1 * attempt) else: raise ``` ```python for rf in record_files: rid = record_id(rf) fh = file_hash(rf) old_fh = db_status(conn, rid) if old_fh is None: status = "NEW" elif old_fh != fh: status = "UPDATED" else: status = "SKIPPED" if status == "SKIPPED": skipped_count += 1 continue try: plain_text = extract_record_content(rf) embedding = embed_text(plain_text) except Exception as e: continue ``` The Skill instructions require `embed.py init` to run immediately after every record creation or modification, including when the user did not explicitly request external indexing. Supported record categories include personnel ...[truncated 2631 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/embed.py:286
Finding

Symlink Traversal Allows External Disclosure of Files Outside the Records Directory

Content
View full analysis
str: with open(filepath, "r", encoding="utf-8") as f: content = f.read() plain = (content .replace("#", "") .replace("*", "") .replace("`", "") .replace("-", "") .replace(">", "")) return plain ``` ```python record_files = sorted( f for f in CONFIG["records_dir"].rglob("*.md") if "archive" not in str(f) ) for rf in record_files: rid = record_id(rf) fh = file_hash(rf) old_fh = db_status(conn, rid) if old_fh is None: status = "NEW" elif old_fh != fh: status = "UPDATED" else: status = "SKIPPED" if status == "SKIPPED": skipped_count += 1 continue try: plain_text = extract_record_content(rf) embedding = embed_text(plain_text) except Exception as e: continue ``` ### Technical Analysis The recursive scan assumes that every `*.md` entry found beneath `records/` is a legitimate record. It does not: - Reject symbolic links - Resolve paths before access - Confirm that the resolved target remains inside the canonical records directory - Open files using no-follow semantics Standard Python file access follows a final-component symbolic link. Therefore, a Markdown symlink located under `records/` can target a readable file elsewhere in the workspace or filesystem. The target content is then treated as a record and submitted to the external embedding API. The string-based exclusion of paths containing `archive` does not provide a security boundary and does not prevent traversal through symbolic links. ### Attack Path 1. An attacker obtains the ability to create a filesyste ...[truncated 1670 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/status.py:196
Finding

Ambiguous Wildcard Filename Matching Can Update the Wrong Record

Content
View full analysis
Remediation
View remediation
` for automated workflows. 7. Add tests for duplicate topic names and inputs containing `%`, `_`, and backslashes. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (33)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill presents itself as operating within a closed set of record categories and Markdown archive rules, yet it also relies on an undeclared SQLite database and auxiliary workflow commands unrelated to basic record creation. Hidden stateful behavior and access to undeclared resources can bypass user expectations and complicate auditing of what data is stored or changed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill presents itself as operating within a closed set of record categories and Markdown archive rules, yet it also relies on an undeclared SQLite database and auxiliary workflow commands unrelated to basic record creation. Hidden stateful behavior and access to undeclared resources can bypass user expectations and complicate auditing of what data is stored or changed.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill requires automatic vector indexing immediately after each write, but does not clearly warn users that indexing may send record contents to an external embedding provider. Because records may contain meeting notes, personnel details, plans, or incident information, silent transmission to a third party materially increases privacy and confidentiality risk.

Content

No source excerpt is available for this finding.

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 294)May include surrounding context.

❌ 禁止写法(pattern 匹配失败):

bash
cd /path && python3 embed.py init        # 第一个词是 cd
source .env && python3 embed.py init     # 第一个词是 source
export KEY=val && cmd                    # 第一个词是 export

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script sends full record contents to a third-party embedding service via an OpenAI-compatible client, which materially changes the skill from local record archiving into external data processing. Because work records may contain sensitive internal notes, HR/admin information, incident details, or planning data, this creates a real confidentiality and data-governance risk if users expect records to remain local.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares broad behavior involving file reads/writes and environment-derived external API usage, but does not define an explicit tool/permission scope. That weakens least-privilege controls and makes it harder for a host agent or reviewer to understand and constrain what the skill may access.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a closed-format archival skill, but the body requires building and querying a vector index using an external embedding service. That discrepancy can cause users to provide sensitive work notes under the assumption of local storage only, when the content may also be processed for indexing and search.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill instructs automatic file creation in the workspace as part of normal operation, but does not require a clear user-facing notice or confirmation before persisting data. In practice, this can lead to unintended writes of sensitive or inaccurate work content, especially when classification is automatic.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation instructs the agent to use an external embedding provider and inherit an API key from the host environment, without clearly justifying that network transfer is necessary for simple note recording. This creates a real confidentiality risk because internal work records may be transmitted to a third-party service during automatic indexing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire template and reporting format are written as a fixed Chinese monthly report, with no indication that the user can select another language or that the skill is intentionally limited to a Chinese-only audience. This creates a natural-language policy issue because it imposes a specific language/locale without user opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire template and its required output structure are specified only in Chinese, including the title, section headings, labels, and usage description. This effectively imposes a specific language/locale on the generated report, and the file does not mention user opt-in, alternative languages, or a region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file is natural-language guidance, so SQP-3 applies. The title and all normative status descriptions are written in Chinese and prescribe fixed terminology and mappings, but the document does not offer user opt-in or an alternative locale/language, which can violate language-choice policy for general-purpose skills.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is presented as a record-keeping/archive standard, but this section expands its behavior to include external embedding generation and a separate vector database. That scope expansion increases data-handling and attack surface beyond what a user would reasonably expect from a documentation/filing skill, especially when record contents may be processed externally.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document instructs use of an external API key for embedding generation, implying record contents may be sent to a third-party service. For work records that may contain internal or sensitive information, this creates a confidentiality risk if users are not clearly warned and do not explicitly approve such sharing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide describes embedding generation via an external API but does not provide a user-facing warning that record contents may be transmitted off-host for processing. Because work records can contain sensitive business, personnel, or incident information, silent third-party sharing creates a significant privacy and compliance risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instructions direct execution of a script that scans all files under records/ and writes derived data into vectors/embeddings.db. This exceeds the skill's stated role of storing files under records/YYYY-MM/ and introduces bulk processing of user content, which can unintentionally capture sensitive records and persist additional metadata.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The template explicitly instructs generating next-year recommendations based on 'industry trend search results' but provides no constraints on what may be sent to external services, no approval requirement, and no warning that internal annual-report context could be exposed during search or summarization. In a record-keeping skill handling enterprise work summaries, this creates a realistic risk of leaking sensitive business context, plans, metrics, or OKR details to third-party networked tools.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This file contains multiple user-facing docstrings, CLI help text, and log messages in Chinese, which effectively imposes a language/locale on users of the skill. There is no indication that the skill is China- or Chinese-specific, nor any opt-in or fallback language support.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The hardcoded external API endpoint confirms intentional network egress to a third-party service. In the context of a local work-record archiving skill, this increases risk because the service handles potentially sensitive corporate records and search terms outside the local environment.

Content

Scanner excerpt · scripts/embed.py (reported line 31)May include surrounding context.

python
# =====================================================================
CONFIG = {
    "api_key_env": "SILICONFLOW_API_KEY",
    "base_url": "https://api.siliconflow.cn/v1",
    "model": "BAAI/bge-m3",
    "dimension": 1024,
    "vectors_dir": Path.cwd() / "vectors",

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

A work-record archiving skill, as described, does not inherently require credential handling or outbound authenticated API access. The code loads SILICONFLOW_API_KEY from the environment and uses it to authenticate external embedding requests, introducing a capability outside the manifest's stated operational scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Record contents are transmitted to an external API without any user-facing consent, warning, or contextual notice at the point of transmission. In a record-keeping skill, users may reasonably assume local handling, so silent off-platform transfer of potentially sensitive business content raises privacy, compliance, and trust risks.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest says categories are strictly closed to 13 values and filenames must follow specific formats, but the code merely extracts the second dash-separated token as category and falls back to "unknown". It then scans all .md files under records/ and indexes them regardless of whether they match the declared category set or filename conventions, so actual behavior is looser than the claimed standard.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language strings and top-level description are entirely in Chinese, including usage and operational messages, which effectively forces a specific language for user interaction. Under the language/locale policy, this is a violation unless the skill offers language choice or clearly documents a justified locale-specific constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest states the record categories are strictly closed to 13 values and cannot be extended, but the code explicitly allows additional categories 'adjust' and 'sql' in the category-to-status map. This expands the skill's effective supported record scope beyond what the manifest claims.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file performs safety-relevant write operations by altering the database schema and committing changes, but it provides no prior confirmation prompt or explicit warning before making those changes. Although success messages are printed after execution, they do not disclose the impact in advance, so a user may trigger irreversible state changes without clear notice.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.