Back to skill

Security audit

微排版公众号文章排版

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious with medium confidence, mainly because scanners report image transfers without a clear privacy warning and the skill does not declare its tool scope.

Consider the suspicious verdict before installing. In particular, check whether you are comfortable with user-provided images being sent to external services and with the skill's environment, file, and network capabilities. The scan is incomplete: it reports four unresolved local references and did not analyze the binary image.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (18)

Tainted flow: 'request' from os.environ.get (line 113, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/fetch_ai_assets.py (reported line 119)May include surrounding context.

python
for attempt in (1, 2):
        try:
            with urllib.request.urlopen(request, timeout=30, context=context) as resp:
                payload = json.loads(resp.read().decode("utf-8"))
        except urllib.error.HTTPError as error:
            body = error.read().decode("utf-8", errors="replace")

Tainted flow: 'request' from os.environ.get (line 125, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/publish.py (reported line 132)May include surrounding context.

python
context = build_ssl_context()
    try:
        with urllib.request.urlopen(request, timeout=30, context=context) as resp:
            status = resp.status
            raw = resp.read().decode("utf-8")
    except urllib.error.HTTPError as error:

Tainted flow: 'request' from os.environ.get (line 175, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/upload_images.py (reported line 179)May include surrounding context.

python
request.add_header("Content-Type", "application/json")
    request.add_header("Accept", "application/json, text/plain, */*")
    request.add_header("Authorization", f"Bearer {api_key}")
    with urllib.request.urlopen(request, timeout=REQUEST_TIMEOUT, context=context) as resp:
        raw = resp.read().decode("utf-8")
        status = resp.status
    return status, json.loads(raw) if raw else {}

Tainted flow: 'request' from os.environ.get (line 189, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/upload_images.py (reported line 193)May include surrounding context.

python
request.add_header("Content-Type", content_type)
    request.add_header("Accept", "application/json, text/plain, */*")
    request.add_header("Authorization", f"Bearer {api_key}")
    with urllib.request.urlopen(request, timeout=REQUEST_TIMEOUT, context=context) as resp:
        raw = resp.read().decode("utf-8")
        status = resp.status
    return status, json.loads(raw) if raw else {}

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

User-provided images are uploaded without a user-facing privacy warning before transfer.

Medium
Category
Output Handling
Confidence
87% confidence
Finding

The workflow directs supplied images to be uploaded during asset preparation, before the final publication confirmation, without a specific privacy notice or upload-consent gate. Although external publishing is the skill's purpose, providing an image for layout does not necessarily authorize immediate third-party storage of its contents and embedded metadata.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/api-ai-assets.md (reported line 28)May include surrounding context.

md
`GET /api/v1/ai-assets?tag={tag}&per_page=48&cursor={cursor}`

| 参数       | 说明                                                                                 |
| ---------- | ------------------------------------------------------------------------------------ |
| `tag`      | 必填。一个标签,去空白后 1–32 个字符。服务端按 `tags has tag` 过滤,只返回已发布素材 |
| `per_page` | 脚本固定传 48,这是上限                                                              |

User-provided images are automatically uploaded without a privacy warning.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

This source instructs the agent to download supplied URLs or use local images and then upload the files, without first disclosing the external transfer and obtaining informed authorization. Explicitly choosing custom images limits the workflow's scope, but does not necessarily authorize remote storage of sensitive image content or location metadata.

Content

No source excerpt is available for this finding.

The before/after workflow sends an image URL and prompt to the Jimeng image-generation service without a privacy warning.

Medium
Category
Output Handling
Confidence
87% confidence
Finding

The workflow instructs the agent to submit the first image's URL and the requested changes to an external image-generation service. Although use of Jimeng is explicitly requested, the instructions do not warn that image content and potentially sensitive prompt details will be shared with that service.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/api_base.py (reported line 70)May include surrounding context.

python
def self_test() -> None:
    assert validate_api_base("https://weipaiban.cn") == "https://weipaiban.cn"
    assert validate_api_base("https://api.weipaiban.cn/") == "https://api.weipaiban.cn"
    assert validate_api_base("http://127.0.0.1:3000") == "http://127.0.0.1:3000"
    assert validate_api_base("http://localhost") == "http://localhost"
    assert validate_api_base("https://::1:8787") == "https://::1:8787"

The title layout requires an English subtitle without explicit language opt-in.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

L21 instructs the agent to place a small English subtitle beneath the main title. This imposes a specific output language without offering a language choice or explaining why English is necessary.

Content

No source excerpt is available for this finding.

The heading specification mandates an English label without language opt-in.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

L21 requires an English small label as part of the heading structure. The instruction does not defer to the user's language or offer a language choice; a visual style alone does not justify this language restriction.

Content

No source excerpt is available for this finding.

The heading layout requires an English label without user opt-in.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

L19 directs the agent to include an English small label beside the title and applies the same structure to secondary headings. It imposes English on generated content without an explicit language choice or documented necessity.

Content

No source excerpt is available for this finding.

The theme mandates English heading labels without an explicit language choice.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

L21 requires an English small label within the title layout and repeats that structure for secondary headings. The theme does not provide language opt-in or justify why these labels must be English.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE (reported line 625)May include surrounding context.

text
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE (reported line 637)May include surrounding context.

text
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF

The mandatory AI disclosure fixes output text in Chinese without a language choice.

Low
Category
Output Handling
Confidence
91% confidence
Finding

The workflow requires a fixed Chinese-language disclosure at the end of every article. It provides no translation option or exception for users requesting another language, and gives no justification for requiring this locale.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/build_oss_src.py (reported line 287)May include surrounding context.

python
missing = [
        name
        for name in ("url", "natural_w", "natural_h", "target_w", "target_h")
        if getattr(args, name) in (None, "")
    ]
    if missing:
        parser.error(f"缺少参数: {', '.join(missing)}")