{
  "$schema": "https://bestaiskill.com/schemas/agent-install/2.json",
  "skill": "wps-doc-scraper",
  "built": "2026-10-26",
  "control_level": 4,
  "control_level_label": "L4 高权限",
  "capabilities": [
    "execute_command",
    "network",
    "write_file"
  ],
  "required_controls": {
    "agent": [
      "sandbox_recommended",
      "graded_authorization"
    ],
    "admin": [
      "approval_process",
      "rollback_support",
      "full_audit"
    ]
  },
  "evidence": [
    {
      "file": "scripts/",
      "summary": "Execute local script or command: python3 scripts/wps_processon_extract.py --url <kdocs/processon 链接> --outpu"
    },
    {
      "file": "网络端点",
      "summary": "Declare external network access: GET https://drive.kdocs.cn/api/v5/links/<share_id>?review=true (reads public link metadata; with C"
    },
    {
      "file": "本地工作目录",
      "summary": "File I/O and artifact output: Writes under the user-specified --output-dir: processon-api.json (raw response containing the full upstream payload), processon-de"
    }
  ],
  "verification": {
    "method": "第二遍独立复核（找茬视角）：①glob 清点目录（含隐藏）确认资产面为 SKILL.md + agents/openai.yaml + references×4 + scripts×2，共 8 个文件；②以 raw 分段精读两份脚本（wps_processon_extract.py 前 140 行 + 写盘/文件名段、render_svg_tiles.py 关键段），核对「无鉴权/无登录/无条件绕过」声明与代码实际行为；③提取全目录域名与端点并逐条回查调用点；④检索凭据类 token（token/cookie/session/password/api_key/getenv/Authorization/keychain）确认无命中，并单独核对请求头构成；⑤检索安全降级与执行类 token（CERT_NONE/verify=False/--no-verify/shell=True/eval/exec/os.system/base64 大块）并逐项判定；⑥核对写盘路径与文件名净化实现；⑦核对 4 份 reference 与 SKILL.md 的硬规则是否互相矛盾（尤其「禁止绕过」与「浏览器兜底」是否冲突）；⑧git 核对 pin commit 与目录最后一次提交。",
    "second_pass": [
      {
        "item": "「无登录、不读凭证」声明是否有反例",
        "status": "ok",
        "detail": "反例检索失败：两份脚本的 import 均无 http.cookiejar/requests/session 等会话设施；fetch_json 只构造 4 个固定头（User-Agent/Accept/Referer + Content-Type 隐式由 urllib 处理），无 Authorization、无 Cookie 注入、无 keychain 或环境变量读取（grep getenv/os.environ 零命中）。全目录 grep token/cookie/session/password/api_key 仅命中文档中「不得绕过密码提示」这类规则文本。声明成立。"
      },
      {
        "item": "「禁止绕过」红线与「浏览器 DOM 兜底」是否冲突",
        "status": "ok",
        "detail": "不冲突且边界写得清楚：permission-and-failure-boundaries.md 允许「Use the user's already-open browser session only to view content the user can legitimately access.」，同时禁止「Logging into WPS/KDocs without explicit user instruction」与「Bypassing CAPTCHAs, tenant restrictions, paywalls...」。SKILL.md 的浏览器兜底也限定在「公开链接」与「已渲染出的内容」，并要求失败时按边界上报。即兜底用于取公开可见内容，不是用来越权。"
      },
      {
        "item": "写盘是否有路径/文件名风险",
        "status": "discrepancy",
        "detail": "部分防护、部分缺口（如实记录）：文件名做了 safe_filename 净化（剥离换行、把 \\/:*?\"<>| 替换为 _、strip(' .')、压缩空白、截断 140 字符），可防非法字符；但**输出路径本身未做任何约束**——--output-dir 与 <title>-全画布.svg 的拼接结果没有 resolve/越界检查，用户（或上游传入的路径参数）若给出 / 或系统目录，脚本会直接在其下建目录写文件。与 repomix-unmixer 的关键区别：本处的路径来自用户命令行与本地文件名，**不可由远端文档内容控制**（远端只影响 title 字符串，而 title 已经过 safe_filename 清洗），因此不构成「外部内容 → 任意写入」的攻击链。风险等级低，但「无路径校验」这一事实应予记录。"
      },
      {
        "item": "是否漏记外部端点（域名全量回查）",
        "status": "ok",
        "detail": "提取结果：drive.kdocs.cn（元数据 API）、wps.processon.com（view 页与 wpsapi 数据 API）、www.kdocs.cn（Referer 与分享页宿主）、www.w3.org（SVG 命名空间字符串，非网络请求）、example.com（文档占位）。逐条已归入 external_deps 的 7 个条目；无未记载的隐蔽外发。"
      },
      {
        "item": "是否有安全降级或隐蔽执行",
        "status": "ok",
        "detail": "检索结果：无 CERT_NONE/verify=False/--no-verify（urllib 默认走系统 CA 校验）、无 shell=True、无 eval/exec/os.system、无 base64 大块（render_svg_tiles 的 svg 处理是文本拼接而非编码载荷）、无 >200 字符无空格长行。两份脚本全文可读、逻辑线性。"
      },
      {
        "item": "「保真」宣称与实际输出是否相符（有无夸大）",
        "status": "ok",
        "detail": "基本相符，且作者把限制写进文档：manifest 验收检查包含「No text output contains �」「Partial extraction is marked partial in notes」，SKILL.md 也要求「Report extraction gaps plainly. Do not silently produce a polished Markdown file from partial data.」。脚本确实先落原始 JSON 再落派生件（processon-api.json → processon-definition.json → <title>.md），符合「保留原始件」的宣称。唯一需注意：Markdown 的完整度上限取决于上游 definition 是否含全部节点，文档第 4 条硬规则已承认「Do not infer hidden nodes or missing text」。"
      },
      {
        "item": "平台依赖是否被如实声明",
        "status": "ok",
        "detail": "如实：SKILL.md 明确 'Use scripts/render_svg_tiles.py to make the PNG through macOS Quick Look square tiles'，脚本内也有 shutil.which(\"qlmanage\") is None → raise RenderError(\"macOS qlmanage was not found\") 的硬失败，reference 的失败边界清单亦列出「PNG renderer missing Quick Look or ImageMagick」。即非 macOS 环境下该渲染路径不可用是被声明的，不是隐藏缺陷。"
      },
      {
        "item": "pin commit 与 skill.path 是否与任务书表格一致",
        "status": "ok",
        "detail": "git rev-parse HEAD = d5c4678cb5d4fd6acc9c922690df035dbd33d247，与任务书表格『库内 HEAD』逐字一致；目录位于仓库根，相对路径 wps-doc-scraper；本目录最后一次提交 878f947（2026-09-07）。GitHub API 复核 MIT / stars 1392 / pushed 2026-09-15T09:30:04Z。"
      }
    ],
    "level": 1,
    "level_label": "V1 已固定",
    "commit": "d5c4678cb5d4fd6acc9c922690df035dbd33d247",
    "sha256": "dc2d17f32517aa55cf321a68403ad9ad638ae74f89f90558d0dbe92d7fa0ea4e",
    "reviewed_by": null,
    "reviewed_at": null
  },
  "assessed_at": "2026-10-25",
  "method_version": "2.0",
  "mirror": {
    "archive": "https://skillpub.pages.dev/r2/v/2026-09-15/wps-doc-scraper.tar.gz",
    "sha256": "dc2d17f32517aa55cf321a68403ad9ad638ae74f89f90558d0dbe92d7fa0ea4e",
    "commit": "d5c4678cb5d4fd6acc9c922690df035dbd33d247"
  },
  "original": {
    "github": "https://github.com/daymade/claude-code-skills/tree/main/wps-doc-scraper",
    "path": "wps-doc-scraper",
    "commit": "d5c4678cb5d4fd6acc9c922690df035dbd33d247"
  }
}