Back to skill

Security audit

Tongyong Shenhe

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed moderation automation tool, but it needs review because it stores powerful admin credentials and a reusable TOTP seed in plaintext, can submit live moderation decisions, and may send content to an unexplained external API endpoint.

Install only if this is an approved internal moderation workflow. Use a least-privileged service account, avoid storing a reusable TOTP seed in plaintext, protect config and export files with strict permissions, verify or replace the API endpoint before setting an API key, and run dry-run or fetch-only first before allowing live submissions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

other

Error
Location
review.py:237
Finding

Administrative Content Is Disclosed to a Hard-Coded External Moderation Domain

Content
View full analysis
Dict[str, Any]: """调用技术部统一审核 API(POST /v2/moderations)""" try: import requests as req except ImportError: raise RuntimeError("API 审核需要 requests 库: pip install requests") mod_cfg = config["moderation"] api_url = mod_cfg["api_url"].rstrip("/") payload = { "content": text, "type": mod_cfg.get("type", "post"), "model": "auto", "strictness": mod_cfg.get("strictness", "standard"), } headers = { "X-Project-Key": mod_cfg["api_key"], "Content-Type": "application/json", } last_err = None for attempt in range(3): try: resp = req.post( f"{api_url}/v2/moderations", json=payload, headers=headers, timeout=15 ) if resp.status_code == 429: time.sleep(2 * (attempt + 1)) continue resp.raise_for_status() data = resp.json() return data.get("data", {}).get("result", {}) except Exception as e: last_err = e if attempt < 2: time.sleep(2) raise RuntimeError(f"审核 API 失败(重试3次): {last_err}") ``` ### Technical Analysis When an API key is configured, the Skill transmits pending administrative content to the configured moderation endpoint. The example configuration supplies `https://zyaokkmo.cc` as the default endpoint, while the documentation describes it only as a technical-department API and does not establish its ownership, authorization, retention policy, or permitted data c ...[truncated 1789 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
config.example.json:19
Finding

Administrator Password and Reusable TOTP Seed Are Stored in Plaintext Configuration

Content
View full analysis
Dict[str, Any]: p = Path(path).resolve() if not p.exists(): sys.exit(f"配置文件不存在: {p}") config = json.loads(p.read_text(encoding="utf-8")) required = [ ("site.base_url", config.get("site", {}).get("base_url")), ("site.module", config.get("site", {}).get("module")), ("auth.username", config.get("auth", {}).get("username")), ("auth.password", config.get("auth", {}).get("password")), ("auth.totp_seed", config.get("auth", {}).get("totp_seed")), ] ``` The deployment documentation instructs operators to populate these fields: ```text | `auth.username` | Yes | Backend username | `admin` | | `auth.password` | Yes | Backend password | `123456` | | `auth.totp_seed` | Yes | TOTP secret | `JBSWY3DPEHPK3PXP` | ``` ### Technical Analysis The operational design requires a site username, password, and reusable TOTP seed to be placed in a JSON file. The file is read directly as plaintext, and the implementation does not verify restrictive file permissions or support a protected secret store. A TOTP seed is a long-lived second-factor secret, not a temporary one-time code. Anyone who obtains both the password and seed can continuously generate valid TOTP codes, effectively defeating the intended separation between authentication factors. The example file itself contains empty placeholders rather than live credentials. The vulnerability arises when deployment instructions are followed and production secrets are placed into `config.json`. No evidence in the reviewed project shows a `.gitignore` rule, permission enforcement, encryption, or secret-manager integration. ### Attack Pa ...[truncated 1075 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
review.py:430
Finding

Fetched Moderation Content Is Exported to a Predictable Plaintext File Without Permission Enforcement

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
DEPLOY.md:29
Finding

Optional Python Dependency Is Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (17)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The guide instructs operators to retrieve and use the raw TOTP seed for automation, which is more sensitive than a transient 6-digit code because possession of the seed allows indefinite generation of future MFA codes. In the context of a backend moderation/admin system, combining the seed with username and password effectively collapses MFA into a stored secret and materially weakens account security if the workstation, repo, or config file is exposed.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `SKILL.md` | 本文档 |

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · review.py (reported line 171)May include surrounding context.

python
return []
    data = json.loads(p.read_text(encoding="utf-8"))
    rules = [r for r in data.get("rules", []) if r.get("enabled", True)]
    return rules


def apply_rules(item: Dict, content_fields: List[str], rules: List[Dict]) -> Optional[Dict]:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The deployment guide explicitly tells users to place a backend URL, username, password, and raw TOTP seed into a local config.json file, but provides no warning about the sensitivity of these secrets or how to protect them. In this skill’s context, those credentials grant access to moderation backends and enable automated MFA generation, so compromise of the file could directly lead to full account takeover of privileged admin workflows.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill describes behavior that requires sensitive capabilities—network access, shell/VPN operations, reading configuration, and likely writing output—but it declares no explicit tool scope or permission boundaries. In a credentialed moderation workflow that logs into internal admin panels with username/password/TOTP and can submit approval decisions, this absence of least-privilege constraints increases the risk of unintended or abused actions if the skill is invoked in a broader agent environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description and entire user-facing documentation are written only in Chinese, with no indication that other language options are supported or that Chinese-only use is a justified regional constraint. Under the policy rule for natural-language violations, forcing a single language without user opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guide encourages a default workflow that automatically submits approve/reject decisions to a live backend, but it does not prominently warn users that these actions change remote moderation state and may be difficult or impossible to undo. In a moderation/admin context, accidental execution can cause unauthorized publication, rejection, or workflow corruption at scale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation describes optional API-based review but does not clearly disclose that content may be sent to an external service for analysis. Users may unknowingly transmit sensitive, private, or regulated content off-system, creating confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The API-enhanced mode section explicitly instructs users to send locally approved content to a technical department AI service, but it lacks a direct warning that this is an off-system transfer. Because this skill processes moderation queues from administrative backends, the transmitted data may include user-generated content or sensitive business data, increasing privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring and usage guidance are written entirely in Chinese, and the CLI description/messages throughout the file are likewise Chinese-only. This imposes a specific language on users without any opt-in or documented locale constraint, which matches the language/locale policy violation criteria.

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 · review.py (reported line 99)May include surrounding context.

python
]
        cmd.append(url)
        try:
            return subprocess.check_output(cmd, text=True, timeout=30)
        except subprocess.TimeoutExpired:
            raise RuntimeError(f"curl 超时: {url}")
        except subprocess.CalledProcessError as e:

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The fetch-only mode bulk-exports pending review content, including raw fields, to a local JSON file. In a moderation skill, this creates a clear data-exfiltration and privacy risk because potentially sensitive unpublished content can be copied outside the source system without access controls, minimization, encryption, or audit enforcement.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The pattern \d{7,} matches any sequence of 7 or more digits, which will catch many benign values such as order numbers, dates with IDs, tracking numbers, prices, or other ordinary numeric content. In a configuration-driven moderation skill used across multiple sites, this creates substantial overblocking risk and can let a rule author suppress legitimate content at scale.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The custom keyword rules include very broad terms such as “名字”, “软件”, and “卡”, plus generic contact-related tokens like “tg”, “企鹅”, and any .com-like string. In a general-purpose content review skill, these patterns will frequently match ordinary user content and can be abused or will naturally cause large-scale false positives, effectively turning moderation into a denial-of-service against benign submissions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The natural-language content of the file is entirely Chinese, and the document does not indicate that language choice is optional or that the skill is intentionally limited to Chinese-speaking users. Per the policy, forcing a specific language without user opt-in can be a locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language instructions force a specific language for all users of the skill documentation. Under the stated policy, language constraints should either offer user choice or be explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The value for the site name description is written only in Chinese, which indicates a locale-specific assumption in the skill configuration without any visible opt-in or justification. Under the policy rule for language or locale constraints, this is a natural-language policy concern because the file does not state that the skill is intended only for Chinese-speaking users or a China-specific deployment.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.