Back to skill

Security audit

1688-item-batch-opt-apply

Security checks for vulnerabilities and agentic risk

Overview

Product changes require confirmation, but automatic exports can install extra software despite the main instructions promising a CSV fallback.

Before installing, request an export mode that uses CSV without installing packages, or provision a reviewed dependency in an isolated environment. Keep individual product confirmations until batch cards are supported, and verify the selected products and final changes.

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
  • 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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

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 · scripts/_const.py (reported line 13)May include surrounding context.

python
import os
import re

# Skill 名称(供输出文案使用;.env 中的 SKILL_NAME 由平台替换,不在代码里读取)
SKILL_NAME = "1688-item-batch-opt-apply"

# ── 台账与产物路径(均相对当前工作目录)────────────────────────────────────

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

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.

The CLI directs users to the batch-apply card instead of the manifest's current per-task confirmation flow.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The manifest explicitly describes individual task cards as the current application-confirmation mechanism, with batch-apply deferred until that component launches. At L40–L43, the CLI unconditionally instructs the agent to display a batch application confirmation card, without a rollout check or per-task fallback.

Content

No source excerpt is available for this finding.

The application service unconditionally uses the batch-apply flow that the manifest reserves for a future upgrade.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The manifest specifies a current per-task single-card application flow and defers the combined batch-apply card until launch. L82–L95 instead always constructs route=batch-apply and persists every included task as requested, with no availability gate or implementation of the declared current flow.

Content

No source excerpt is available for this finding.

Exporting results can automatically install a package into the running Python environment.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

Exporting results unexpectedly triggers a network-backed package installation when openpyxl is missing, rather than taking the promised CSV fallback. This crosses the export operation's expected boundary and can introduce unreviewed dependency code or alter shared environment dependencies without explicit authorization.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The subprocess call does not expose shell injection because its arguments are fixed, but it silently installs an unpinned package during an ordinary export operation. This introduces a supply-chain execution path and modifies the running Python environment using the configured package index, despite the documented CSV fallback.

Content

Scanner excerpt · scripts/capabilities/export_results/service.py (reported line 39)May include surrounding context.

python
if _HAS_OPENPYXL:
        return openpyxl
    try:
        subprocess.run(
            [sys.executable, "-m", "pip", "install", "--quiet", "openpyxl"],
            check=True, timeout=120,
            stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,

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/capabilities/query_offer_prop/service.py (reported line 57)May include surrounding context.

python
fd, path = tempfile.mkstemp(prefix="batch-cpv-", suffix=".json")
        with os.fdopen(fd, "w", encoding="utf-8") as stream:
            json.dump({"items": items}, stream, ensure_ascii=False)
        result = subprocess.run(
            [executable, "call", "query_offer_prop", "--json-file", path, "--raw"],
            shell=False, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE,
            stderr=subprocess.PIPE, text=True, encoding="utf-8", errors="replace",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
87% confidence
Finding

The open-ended version constraint allows installations to consume future, unreviewed releases and does not provide reproducible dependency resolution. A compromised or defective eligible release could affect the agent environment, although no compromised dependency is demonstrated here.

Content

Scanner excerpt · requirements.txt (reported line 7)May include surrounding context.

text
# openpyxl 用于结果导出为 .xlsx;缺失时自动降级 csv(utf-8-sig,
# Excel 打开不乱码),不因缺依赖阻断主流程。
# 注:任务输入侧(Excel 等文件)由主 Agent 自行读取结构化,不走脚本解析。
openpyxl>=3.0.0

Unverifiable Dependency: openpyxl has 2 known advisory(ies) (CVE-2017-5992 (Improper Restriction of XML External Entity Reference in Openpyxl); CVE-2017-5992 (Openpyxl 2.4.1 resolves external entities by default, which allows remote attack)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

OSV returned advisories for this package, but its resolved version is unknown. A package-name lookup does not establish whether the installed release is affected by those advisories.

Content

No source excerpt is available for this finding.