跳到主要内容
知仓学习社ZHICANG

sn-ppt-doctor

|

读凭据执行命令写文件严重 27 · 高危 11OpenSenseNova/SenseNova-Skills

它会碰到什么

扫了多少7 个文本文件,35 KB
它会碰到什么读凭据执行命令写文件
命中总数40 处
命中统计严重 27 · 高 11 · 中 2 · 低 0
逐条看命中(30 条严重或高危)
  • 严重 ppt_doctor/__main__.py:14cred-paths
    parser.add_argument("--non-interactive", action="store_true", help="Skip interactive .env prompts")
  • 严重 ppt_doctor/__main__.py:15cred-paths
    parser.add_argument("--env-path", type=Path, default=Path.cwd() / ".env")
  • 严重 ppt_doctor/__main__.py:30cred-paths
    print(f"\nWrote .env at {fill.path}. Please re-run /skill sn-ppt-doctor to verify.")
  • 严重 ppt_doctor/check_environment.py:20cred-paths
    5. Interactive .env filler
  • 严重 ppt_doctor/check_environment.py:41cred-paths
    """Load .env into os.environ from a few well-known locations.
  • 严重 ppt_doctor/check_environment.py:44cred-paths
    1. <repo_root>/.env           (where this script sits at <repo>/skills/sn-ppt-doctor/ppt_doctor/check_environment.py)
  • 严重 ppt_doctor/check_environment.py:45cred-paths
    2. <repo_root>/skills/.env    (user may place it here)
  • 严重 ppt_doctor/check_environment.py:46cred-paths
    3. cwd / .env                 (python-dotenv default)
  • 严重 ppt_doctor/check_environment.py:57cred-paths
    for candidate in (repo_root / ".env", repo_root / "skills" / ".env", Path.cwd() / ".env"):
  • 严重 ppt_doctor/check_environment.py:57cred-paths
    for candidate in (repo_root / ".env", repo_root / "skills" / ".env", Path.cwd() / ".env"):
  • 严重 ppt_doctor/check_environment.py:57cred-paths
    for candidate in (repo_root / ".env", repo_root / "skills" / ".env", Path.cwd() / ".env"):
  • 严重 ppt_doctor/check_environment.py:451cred-paths
    # 5. Interactive .env filler
  • 严重 ppt_doctor/check_environment.py:502cred-paths
    parser.add_argument("--non-interactive", action="store_true", help="Skip interactive .env prompts")
  • 严重 ppt_doctor/check_environment.py:503cred-paths
    parser.add_argument("--env-path", type=Path, default=Path.cwd() / ".env")
  • 严重 ppt_doctor/check_environment.py:508cred-paths
    print("Loaded .env:")
  • 严重 ppt_doctor/check_environment.py:513cred-paths
    print("(No .env file loaded. Relying on OS environment variables.)\n")
  • 严重 ppt_doctor/check_environment.py:525cred-paths
    print(f"\nWrote .env at {fill.path}. Please re-run sn-ppt-doctor to verify.")
  • 严重 ppt_doctor/checks.py:17cred-paths
    # Load .env from well-known locations before any checks run
  • 严重 ppt_doctor/checks.py:22cred-paths
    for _candidate in (_repo_root / ".env", _repo_root / "skills" / ".env", Path.cwd() / ".env"):
  • 严重 ppt_doctor/checks.py:22cred-paths
    for _candidate in (_repo_root / ".env", _repo_root / "skills" / ".env", Path.cwd() / ".env"):
  • 严重 ppt_doctor/checks.py:22cred-paths
    for _candidate in (_repo_root / ".env", _repo_root / "skills" / ".env", Path.cwd() / ".env"):
  • 严重 ppt_doctor/interactive.py:1cred-paths
    """Interactive .env filler for sn-ppt-doctor.
  • 严重 SKILL.md:5cred-paths
    Node runtime, and optional deps; interactively writes .env for required vars.
  • 严重 SKILL.md:22cred-paths
    - After you change `.env`, to confirm
  • 严重 SKILL.md:47cred-paths
    python $SKILL_DIR/ppt_doctor/check_environment.py --env-path /custom/.env
  • 严重 SKILL.md:54cred-paths
    Plain text report — one line per check — then a summary. On any hard-check failure, enters interactive mode to fill `.env` (unless `--non-interactive`).
  • 严重 SKILL.md:58cred-paths
    - Modify `sn-image-*` skills or their `.env`
  • ppt_doctor/check_environment.py:81cred-envread
    val = os.environ.get(name, "").strip()
  • ppt_doctor/check_environment.py:186cred-envread
    env["PYTHONPATH"] = os.pathsep.join([skill_root, existing_pp]) if existing_pp else skill_root
  • ppt_doctor/check_environment.py:188exec-spawn
    result = subprocess.run(

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

sn-ppt-doctor

When to use

  • Before the first time you use sn-ppt-entry / sn-ppt-creative / sn-ppt-standard, to verify env is wired
  • After you change .env, to confirm
  • When sn-ppt-entry reports missing-env error and tells you to come here

Hard checks (must pass before sn-ppt-entry can run)

  1. Text chat API key is available via SN_TEXT_API_KEY, shared SN_CHAT_API_KEY, or global SN_API_KEY
  2. Vision chat API key is available via SN_VISION_API_KEY, shared SN_CHAT_API_KEY, or global SN_API_KEY
  3. Image generation API key is available via SN_IMAGE_GEN_API_KEY or global SN_API_KEY
  4. sn-image-base is discoverable and sn_agent_runner.py --help works (auto-resolved as a sibling skill under the same skills/ directory; SN_IMAGE_BASE only needed for non-standard layouts)
  5. node --version >= 18

Soft checks (warnings only)

  • $(pwd)/ppt_decks/ creatable and writable (deck_dir parent; fixed — not configurable via env)
  • sn-ppt-standard/scripts/export_pptx/node_modules exists (run npm install on first use otherwise)
  • Optional env vars (SN_IMAGE_GEN_, SN_CHAT_, SN_TEXT_, SN_VISION_) — displays current value or "unset"
  • pypdf / python-docx Python deps for doc parsing in sn-ppt-entry

Invocation

Single-file entry; no package imports, no -m, no PYTHONPATH needed.

python $SKILL_DIR/ppt_doctor/check_environment.py                      # interactive
python $SKILL_DIR/ppt_doctor/check_environment.py --non-interactive
python $SKILL_DIR/ppt_doctor/check_environment.py --env-path /custom/.env

When used inside OpenClaw, /skill sn-ppt-doctor runs the same entry.

Output

Plain text report — one line per check — then a summary. On any hard-check failure, enters interactive mode to fill .env (unless --non-interactive).

Does NOT

  • Modify sn-image-* skills or their .env
  • Install packages automatically (prints install commands instead)
  • Run any PPT pipeline

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。