Преглед изворни кода

feat(skill): fix license, declare env vars, harden credential examples

- Add license: AGPL-3.0-only to SKILL.md frontmatter (was showing as
  MIT-0 on ClawHub due to missing field)
- Declare OPENAI_API_KEY in openclaw.requires.env and primaryEnv so the
  runtime key requirement is visible in skill metadata
- Rewrite setup example to use --api-key-env OPENAI_API_KEY instead of
  --api-key sk-xxx, avoiding shell history exposure
- Add 'Security & Trust' section documenting no install hooks, local
  file I/O only, no telemetry, trusted-base-URL guidance, and npm
  provenance verification command

Addresses OpenClaw scanner flags: metadata missing env vars, API keys
in command history, custom base-URL redirect risk.
Ma пре 6 месеци
родитељ
комит
aa4f217870
1 измењених фајлова са 17 додато и 4 уклоњено
  1. 17 4
      skills/SKILL.md

+ 17 - 4
skills/SKILL.md

@@ -2,7 +2,8 @@
 name: inkos
 description: Autonomous novel writing CLI agent with web workbench (InkOS Studio) - use for creative fiction writing, novel generation, style imitation, chapter continuation/import, EPUB export, AIGC detection, and fan fiction. Native English support with 10 built-in English genre profiles (LitRPG, Progression Fantasy, Isekai, Cultivation, System Apocalypse, Dungeon Core, Romantasy, Sci-Fi, Tower Climber, Cozy Fantasy). Also supports Chinese web novel genres (xuanhuan, xianxia, urban, horror, other). Multi-agent pipeline, two-phase writer (creative + settlement), 33-dimension auditing, token usage analytics, creative brief input, structured logging (JSON Lines), multi-model routing, custom OpenAI-compatible provider support, and InkOS Studio web UI for visual book management, chapter review, real-time writing progress, market radar, and analytics.
 version: 2.3.0
-metadata: { "openclaw": { "emoji": "📖", "requires": { "bins": ["inkos", "node"], "env": [] }, "primaryEnv": "", "homepage": "https://github.com/Narcooo/inkos", "install": [{ "id": "npm", "kind": "node", "package": "@actalk/inkos", "label": "Install InkOS (npm)" }] } }
+license: AGPL-3.0-only
+metadata: { "openclaw": { "emoji": "📖", "requires": { "bins": ["inkos", "node"], "env": ["OPENAI_API_KEY"] }, "primaryEnv": "OPENAI_API_KEY", "homepage": "https://github.com/Narcooo/inkos", "install": [{ "id": "npm", "kind": "node", "package": "@actalk/inkos", "label": "Install InkOS (npm)" }] } }
 ---
 
 # InkOS - Autonomous Novel Writing Agent
@@ -37,9 +38,11 @@ Truth files are persisted as schema-validated JSON (`story/state/*.json`) with m
 inkos init my-writing-project
 
 # Configure your LLM provider (OpenAI, Anthropic, or any OpenAI-compatible API)
-inkos config set-global --provider openai --base-url https://api.openai.com/v1 --api-key sk-xxx --model gpt-4o
-# For compatible/proxy endpoints, use --provider custom:
-# inkos config set-global --provider custom --base-url https://your-proxy.com/v1 --api-key sk-xxx --model gpt-4o
+# Prefer --api-key-env so the key never appears in shell history:
+export OPENAI_API_KEY=sk-xxx
+inkos config set-global --provider openai --base-url https://api.openai.com/v1 --api-key-env OPENAI_API_KEY --model gpt-4o
+# For compatible/proxy endpoints, use --provider custom and point ONLY to trusted endpoints:
+# inkos config set-global --provider custom --base-url https://your-trusted-proxy.com/v1 --api-key-env OPENAI_API_KEY --model gpt-4o
 ```
 
 ### Multi-Model Routing (Optional)
@@ -562,6 +565,16 @@ inkos down
 8. **Check analytics**: Use `inkos analytics` to track quality trends over time
 9. **Export frequently**: Keep backups with `inkos export`
 
+## Security & Trust
+
+- **License**: AGPL-3.0-only (all packages). Full source on GitHub for auditability.
+- **No install hooks**: npm package has no `preinstall`/`postinstall`/`install` scripts. Install is inert.
+- **Local-only file I/O**: all read/write stays inside the project directory (`books/*`, `inkos.json`, `inkos.log`). No writes outside the working directory.
+- **No telemetry**: InkOS does not phone home, collect usage stats, or ship any data to InkOS-controlled servers. The only outbound traffic is to the LLM provider endpoint you explicitly configure.
+- **Credential handling**: always prefer `--api-key-env <VAR_NAME>` over `--api-key <literal>` so keys never hit shell history. Keys are stored in `inkos.json` under your project directory — treat it like a secret and add it to `.gitignore` if you commit the project.
+- **Custom provider base-URL**: `--provider custom` forwards your API key to whatever URL you specify. Only point it at endpoints you trust (your own proxy or an audited reverse-proxy). Never paste an untrusted `--base-url`.
+- **No elevated privileges**: InkOS requires no sudo, no global state mutation, no network listening port (Studio binds `localhost:4567` only).
+
 ## Support & Resources
 
 - **Homepage**: https://github.com/Narcooo/inkos