Back to skill

Security audit

ai-content-discloser

Security checks for vulnerabilities and agentic risk

Overview

This is a small AI-disclosure generator, but it needs Review because its install instructions use mutable global installation and its output can claim human review without verifying that review happened.

Review the install path before use: prefer a pinned commit or audited local copy instead of the global unpinned npx command. Also treat generated disclosures as templates only; remove or change the human-reviewed claim unless a real human review has occurred, and verify China/EU legal wording against current official requirements.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:79
Finding
Unpinned Third-Party Package Execution Through npx## Vulnerability Details **File Location**: `SKILL.md:79` **Vulnerability Type**: Unpinned and unverified third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash npx skills add zhaoxinghua09-cell/agent-skills -g ``` ### Technical Analysis The documented installation command invokes the `skills` package through `npx` without specifying a package version or integrity hash. If the package is not already installed locally, `npx` may retrieve and execute its currently published version. The retrieved package is outside the reviewed artifact, and its implementation can change after this skill has been audited. Package initialization code, lifecycle behavior, or CLI logic therefore executes without being covered by this audit. The global installation option also increases the potential scope of filesystem changes. Exploitation requires compromise or malicious replacement of the referenced package, its publisher account, or another relevant part of the package distribution chain. ### Attack Path 1. An attacker compromises the package publisher account, package distribution channel, or a mutable upstream release. 2. The attacker publishes a malicious version of the unpinned `skills` package. 3. A user follows the installation command in `SKILL.md`. 4. `npx` retrieves the malicious current package version. 5. The package executes with the privileges of the invoking user. 6. The malicious package can access or modify resources available to that user, including files, environment variables, and user-level configuration. ### Impact Assessment Successful exploitation could result in arbitrary code execution with the invoking user's privileges. The affected scope could include user-owned files, accessible credentials in the environment, development configuration, and globally installed user-level components. Administrative privileges are not obtained inherently, but impact would increase if the user run ...[truncated 37 chars]
Remediation
## Remediation Suggestions - Pin the package to a specifically audited version rather than executing the latest available release. - Verify package provenance, publisher identity, and integrity before execution. - Use lockfiles or cryptographic integrity hashes where the installation mechanism supports them. - Avoid global installation unless it is necessary for the documented functionality. - Prefer an installation process that retrieves a reviewed source revision identified by an immutable commit hash. - Document the expected package name, version, checksum, and trusted registry. - Recommend execution from a non-privileged account and explicitly warn users not to run the command with administrative privileges.

T09 · Insecure Skill Coding Practices

Note
Location
scripts/ai_content_discloser.py:42
Finding
Unconditional Human-Review Attestation Produces Unverified Compliance Metadata## Vulnerability Details **File Location**: `scripts/ai_content_discloser.py:42-59` **Vulnerability Type**: Unverified security and compliance assertion **Risk Level**: Low ### Vulnerable Code ```python zh_lvl, en_lvl = LEVELS[a.ai_level] who = f"({a.brand})" if a.brand else "" tool = f",使用工具:{a.tool}" if a.tool else "" explicit_zh = (f"本文由 AI {zh_lvl} 产出{who}{tool}," f"已经人工审核校对。披露日期:{a.date}。依据《人工智能生成合成内容标识办法》" f"与 EU AI Act 第 50 条进行标识;口径以官方最新文本为准。") explicit_en = (f"This content is {en_lvl}{(' by ' + a.brand) if a.brand else ''}" f"{(', produced with ' + a.tool) if a.tool else ''}, and has been human-reviewed. " f"Labeled per China's AI Content Labeling Measures and EU AI Act Art.50; " f"latest official text prevails.") implicit = { "content_type": a.type, "ai_generated": a.ai_level == "full", "ai_involvement": a.ai_level, "tool": a.tool or None, "disclosure_date": a.date, "human_reviewed": True, "note": "隐式标识:写入文件元数据 / HTML meta / 图片 EXIF(字段名以平台规范为准)", } ``` ### Technical Analysis The CLI always states that the generated content has been reviewed by a human and always sets `human_reviewed` to `True`. It does not accept a review-status argument, request explicit confirmation, authenticate a reviewer, or inspect any evidence that a review occurred. Consequently, the output converts an unverified assumption into an affirmative provenance and compliance assertion. This does not provide code execution or system access, but it is an integrity flaw in the skill's primary output. Automated publishing systems that trust the generated JSON could propagate the false assertion without further validation. ### Attack Path 1. A user or automated workflow processes content that has not received human review. 2. The CLI is invoked with the required content type and AI involvement options. 3. The program u ...[truncated 859 chars]
Remediation
## Remediation Suggestions - Add an explicit review-state argument, such as `--review-status reviewed|pending|not-reviewed`. - Require affirmative confirmation before generating a positive human-review claim. - Default to `human_reviewed: false`, `null`, or an equivalent unknown state when no confirmation is supplied. - Omit the human-review sentence when review status is unknown. - For compliance-sensitive workflows, record reviewer identity, review timestamp, and evidence reference separately from user-controlled descriptive fields. - Validate review evidence in the calling workflow rather than treating a CLI flag alone as proof. - Add tests confirming that an unreviewed or unspecified state cannot produce a positive review attestation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The installation instruction uses `npx skills add zhaoxinghua09-cell/agent-skills -g` without pinning an exact package version. This causes users to fetch and execute whatever package version is current at install time, which creates a supply-chain risk if the package is updated maliciously, compromised, or if an unintended breaking version is published.

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
The module docstring is written as China/EU compliance guidance and presents a fixed Chinese-language framing for disclosures, while the tool does not let users choose jurisdiction or locale. This can violate language/locale policy when the skill is used in broader contexts because it defaults users into a specific regulatory and language context without opt-in.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
This attestation is written primarily in Chinese, with only limited English labeling, and does not indicate that the user can choose another language. The policy for natural-language violations applies to all file types and allows fixed locale only when clearly justified or opt-in is provided, which is not present here.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
The category field is written as "AI 治理", indicating a fixed Chinese-language label in the manifest. The file provides no indication that language is selectable or that the skill is intentionally region-specific, which can violate a language/locale policy requiring user choice or documented justification.

Static analysis

No suspicious patterns detected.