跳转到正文
报告库
用途分类 / 开发辅助

Insforge Debug Skill 安全审计

作者说它能做什么(原文)

>-

第三方安全检查结论

先别安装或运行

已检查文件
11
发现的风险
7
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。发现 2 项风险
高风险

未固定版本的 npm 包会在诊断时直接执行

原文依据:3 处
发现了什么

所有命令都使用 `npx -y @insforge/cli`,没有指定版本或完整性值。`-y` 会自动接受 npm 安装提示,因此实际运行的代码取决于调用时注册表提供的包版本。

为什么需要注意

如果包、发布账户或依赖链被入侵,代码可在登录了 InsForge、并可能能读取项目文件和环境变量的代理环境中执行。

这是实际执行要求,不是示例警告。所有诊断均通过未固定版本的 `@insforge/cli` 运行,`npx -y` 还会自动接受安装提示;因此一旦执行,用户会运行 npm 当时解析到的包代码。源码未提供版本或完整性固定。用户可要求作者固定并审查版本,或限制 npm 网络访问。

SKILL.md:21来自说明文档打开原文件
**Always use `npx -y @insforge/cli`** — never install the CLI globally.
查看另外 2 个位置
SKILL.md:28来自说明文档打开原文件
```bashnpx -y @insforge/cli diagnose --ai "<issue description>"```
SKILL.md:37来自说明文档打开原文件
All commands run via `npx -y @insforge/cli ...`. The `(command)` shown next to each primitive is the actual CLI command — primitive names are concept labels, **not** CLI subcommand names (e.g., "DB health" is `diagnose db`, not `diagnose db-health`; "Policies" is `db policies`, not `diagnose policies`).
中风险

部署排错会建议重新部署函数,可能改变线上状态

原文依据:2 处
发现了什么

“函数部署失败”的诊断流程建议在需要时重新运行 `functions deploy <slug>`。重新部署不是只读检查,可能替换活动函数或重复一次部分成功的部署;说明未要求确认目标环境或取得用户许可。

为什么需要注意

生产函数可能被新代码替换、短暂不可用,或在原始故障尚未理解时进入不同状态,使事故扩大并掩盖原证据。

函数部署排错流程确实包含重新执行 `functions deploy <slug>`。前两步是观察状态,但第三步会改变远端部署状态,可能覆盖活动函数或再次触发部分成功的部署;“if needed”并不是明确的授权门槛。用户可要求只读取部署日志和函数列表,确认目标项目、slug 和发布影响后才允许重部署。

references/deploy-state.md:46来自说明文档打开原文件
For "function deploy failed":1. `npx -y @insforge/cli logs function-deploy.logs --limit 50` — find the build/push error2. `npx -y @insforge/cli functions list` — confirm the function did or didn't make it into the active list3. Re-run `npx -y @insforge/cli functions deploy <slug>` if needed and capture stdout for the explicit error
查看另外 1 个位置
references/deploy-state.md:33来自说明文档打开原文件
## Edge function deploys`function-deploy.logs` captures backend deploy events (compile errors, push failures, registration errors). `functions list` confirms the final state — if the function isn't there or `status != active`, the deploy didn't fully take.
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 3 项风险
高风险

问题描述和项目可观测数据可能被交给后端 LLM

原文依据:4 处
发现了什么

AI 路径明确把用户提供的问题描述发送给后端 LLM;该代理还能组合日志、数据库健康信息、策略和元数据。错误文本、URL或日志中可能含用户标识、请求内容、令牌或内部结构。材料没有说明 LLM 提供方、保留期限或训练用途。

为什么需要注意

项目或用户数据可能离开本地环境并由未明确的数据处理方处理。泄露的令牌或内部信息可能影响账号及后端安全。

AI 路径会把用户提供的错误、URL、状态码或函数名发给后端 LLM,并允许它自行组合日志、策略、元数据和数据库健康数据。若描述或这些观测数据含令牌、用户信息或内部结构,就可能离开本地环境。源码没有说明提供方、保留或训练政策;用户可要求披露这些政策,并在发送前删减敏感内容或禁用 `--ai`。

references/ai-assisted.md:3来自说明文档打开原文件
The meta-primitive: hand a natural-language problem description to a backend-side LLM agent that combines the other primitives ([logs](logs.md), [metrics](metrics.md), [db-health](db-health.md), [advisor](advisor.md), [policies](policies.md), [metadata](metadata.md)) on its own and returns a diagnosis plus suggested solutions.**Unlike every other primitive in this skill, `diagnose --ai` returns suggestions, not just observations.** Verify before acting.
查看另外 3 个位置
references/ai-assisted.md:10来自说明文档打开原文件
```bashnpx -y @insforge/cli diagnose --ai "<issue description>"```The description should include: the error / failing URL / HTTP status / function slug — whatever concrete signal the user has.
references/ai-assisted.md:13来自说明文档打开原文件
The description should include: the error / failing URL / HTTP status / function slug — whatever concrete signal the user has.
references/logs.md:33来自说明文档打开原文件
Each line has timestamp + source + level + message. When chasing a known-time symptom:1. Get the approximate timestamp from the user (when did the request fail?)2. Increase `--limit` until the window covers it (start 50, bump to 200 if needed)3. Look for the level (`ERROR` / `WARN`) and message — the message usually names the failing componentFor request-correlated symptoms (single failing URL), look for the request line in `postgREST.logs` (REST calls) or `insforge.logs` (auth/realtime/function dispatch) — both include the URL path.
高风险

RLS 排查会以服务角色读取跨用户数据库行

原文依据:2 处
发现了什么

空结果排查明确要求以服务角色执行无过滤的 `SELECT id, user_id FROM <table>`。服务角色绕过用户级 RLS,而且示例没有 WHERE、LIMIT 或仅判断存在性的约束。

为什么需要注意

表中所有用户的标识关系可能出现在终端和代理上下文中,超过确认某位用户数据是否存在所需的范围。终端记录或后续模型调用还可能扩大暴露。

在 RLS 读取为空时,流程明确要求以 service role 执行无 `WHERE`、无 `LIMIT` 的查询。该操作有诊断目的,但可能绕过用户级可见性并读取整表的行标识和用户标识。风险只在执行该可替换占位 SQL 时发生。用户可要求改为最小范围、带条件或仅返回存在性/计数的查询,并先确认数据范围。

SKILL.md:74来自说明文档打开原文件
3. **metadata** — verify auth config (which claim feeds `auth.uid()` / `requesting_user_id()`; for third-party auth like Clerk/Auth0, is the provider registered as a JWT issuer?).4. **db query** (`db query "<sql>"`) — *empty-result variant only*: confirm rows that *should* be visible actually exist by querying as service role (not as the user): `npx -y @insforge/cli db query "SELECT id, user_id FROM <table>"`. Distinguishes "RLS filtered everything" from "no matching data exists".
查看另外 1 个位置
SKILL.md:69来自说明文档打开原文件
> Same bug, two surfacings. Writes (INSERT / UPDATE / DELETE) fail loudly with **403**. Reads (SELECT) fail silently with an **empty array** — PostgREST filters denied rows out instead of returning 403, so the request looks successful with zero rows. Diagnosis path is the same except step 1 only applies to the 403 variant.1. **logs** (`postgREST.logs`) — *403 variant only*: find the policy violation event with table and role context. *Empty-result variant*: skip — no error is logged for silently-filtered rows.2. **policies** — list policies for that table; walk USING / WITH CHECK against the actual request and the JWT claim used.3. **metadata** — verify auth config (which claim feeds `auth.uid()` / `requesting_user_id()`; for third-party auth like Clerk/Auth0, is the provider registered as a JWT issuer?).4. **db query** (`db query "<sql>"`) — *empty-result variant only*: confirm rows that *should* be visible actually exist by querying as service role (not as the user): `npx -y @insforge/cli db query "SELECT id, user_id FROM <table>"`. Distinguishes "RLS filtered everything" from "no matching data exists".
中风险

反馈命令会向外部报告原始错误和复现信息

原文依据:4 处
发现了什么

技能要求在认定平台缺陷时运行 `feedback`,并包含失败命令、详细复现及“逐字”日志错误。它承认本地脱敏只是基于模式,仍可能漏掉业务数据、非标准凭证或其他敏感上下文;同时未要求在提交前取得用户同意。

为什么需要注意

项目内部信息、用户数据或未被规则识别的秘密可能随错误报告发送给 InsForge。

当判断为 InsForge 平台缺陷时,技能主动要求提交反馈,并把详细复现、失败命令和逐字日志错误发送出去。它说明脱敏仅为模式匹配且要求避免用户数据,这降低但不能消除业务数据或非标准凭证泄露风险;同时没有显示提交前确认步骤。用户可要求先预览完整载荷、手工删减,并明确同意后再发送。

SKILL.md:201来自说明文档打开原文件
  --title "<one-line summary>" \  --detail "<what happened vs expected, minimal repro>" \  --command "<the failing call>" \  --error "<verbatim error from logs>" \  --workaround "<what you did instead>"```
查看另外 3 个位置
SKILL.md:207来自说明文档打开原文件
No login required; common PII patterns (emails, credential/key formats, public IPs, home-directory usernames) are redacted locally — pattern-based, so still keep user data out. Use `--component sdk --language <lang>` for SDK defects; `--component docs` or `--component skills` with `--doc` and `--expected` when documentation contradicts reality; `--type feature-request` when the finding is "not supported". Then continue the user's task with the workaround — never block on the report, and never file feedback for problems in the user's own app code or config. Full flag reference: the **insforge-cli** skill's Feedback section.
SKILL.md:193来自说明文档打开原文件
## When the Root Cause Is InsForge ItselfSome diagnoses end at an InsForge-side defect, not a project misconfiguration: a platform bug or regression, an SDK call that misbehaves, docs or a skill that contradict observed behavior, or a missing capability. A debug session is exactly where these get confirmed — report them while the evidence is in hand:
SKILL.md:198来自说明文档打开原文件
```bashnpx -y @insforge/cli feedback --json \  --type bug --component backend --area db \  --title "<one-line summary>" \  --detail "<what happened vs expected, minimal repro>" \  --command "<the failing call>" \  --error "<verbatim error from logs>" \  --workaround "<what you did instead>"```
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 1 项风险
中风险

审计流程延伸到修改 RLS、密钥和配置,未单独要求授权

原文依据:5 处
发现了什么

该技能的公开目的包括诊断和主动审计,但 Advisor 工作流随后指示应用迁移、RLS 编辑、密钥轮换或配置更新。虽然要求验证建议,却没有要求在生产环境变更前取得用户确认。

为什么需要注意

只要求报告或审计的用户,可能意外遭遇访问策略、数据库结构、凭证或运行配置被改变,造成停机、权限错误或应用失效。

Advisor 文档从只读扫描延伸到实际迁移、RLS 编辑、密钥轮换和配置更新。这些操作可能改变访问权限、使旧密钥失效或影响生产服务。文档要求验证静态建议,但没有显示在执行修改前单独确认环境、备份或用户授权。用户可将该技能限制为只读审计,并要求每项生产变更单独审批。

SKILL.md:7来自说明文档打开原文件
  or timeout, login/OAuth/auth errors, RLS denial, realtime channel issues,  slow query on one endpoint, edge function or Vercel deploy failure), proactive  audits (security/RLS review, performance/index review, system health check,  pre-launch readiness), or when the user has an error but doesn't know where  to start.license: Apache-2.0
查看另外 4 个位置
references/advisor.md:52来自说明文档打开原文件
```text1. Scan:    diagnose advisor --severity critical --json2. Triage:  pick one issue, read affectedObject + recommendation3. Verify:  inspect the affected object (db query / db policies / metadata)4. Fix:     apply the change (migration / RLS edit / secret rotation / config update)5. Re-scan: diagnose advisor --json — confirm isResolved=true for that ruleId6. Repeat with next critical, then warnings, then info
references/advisor.md:62来自说明文档打开原文件
- **Scans are not real-time.** A new scan triggers when the platform schedules it; recommendations lag behind very recent changes. Force a fresh scan if needed.- **Recommendations are static suggestions, not auto-fixes.** Always validate against current schema state before applying.- **`affectedObject` is a string, not a typed reference.** It names the object but doesn't link to it — combine with [metadata](metadata.md) / [policies](policies.md) to inspect.- **Not available when linked via `--api-key`.** Requires `insforge login` (Platform auth).
references/advisor.md:44来自说明文档打开原文件
1. **Start with severity**: `--severity critical` first; critical issues block launch.2. **Group by category** to keep the fix mode coherent (don't context-switch between RLS edits and index migrations).3. **`affectedObject` tells you where to fix** — it names the concrete schema object.4. **`recommendation` is usually actionable as-is**. Verify it makes sense (the recommendation may be generic), then apply via the appropriate primitive's tooling.
references/advisor.md:51来自说明文档打开原文件
```text1. Scan:    diagnose advisor --severity critical --json2. Triage:  pick one issue, read affectedObject + recommendation3. Verify:  inspect the affected object (db query / db policies / metadata)4. Fix:     apply the change (migration / RLS edit / secret rotation / config update)5. Re-scan: diagnose advisor --json — confirm isResolved=true for that ruleId6. Repeat with next critical, then warnings, then info```
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。发现 1 项风险
低风险

OOM 诊断会引导到付费扩容,产生持续费用和重启

原文依据:4 处
发现了什么

技能把有相关证据的 OOM 情况指向升级付费计划和更大实例,并说明扩容会改变账单和重启项目。它确实要求先取得同意,但云端 `oom_likely` 判断和间接的崩溃恢复迹象仍应独立核验。

为什么需要注意

用户可能承担更高的持续费用和一次项目重启;如果根因是查询、连接泄漏或流量异常,扩容可能只掩盖问题。

这段代码的正常用途

扩容确实会增加账单并重启项目,但上下文把它限定在有 OOM 证据时,并明确要求先取得用户同意;CLI 本身也有交互确认。手工回退路径还要求将崩溃恢复日志与 5xx 时间相关后才能把 OOM 作为主要判断。因此这是带明确授权和核验条件的恢复操作,不是静默收费。用户仍应核对实例类型、价格和维护窗口。

这项判断针对展示的代码和适用条件,不表示风险已经实际发生。
SKILL.md:163来自说明文档打开原文件
must line up before OOM becomes the leading diagnosis([references/metrics.md](references/metrics.md)). With that evidence the fix is headroom, not aretry loop:1. **Upgrade the instance** — `npx -y @insforge/cli projects upgrade-instance <type>`   (`nano` → `micro` → `small` → `medium` → `large` → `xl`), or dashboard → Project Settings →   Compute & Disk. On the free plan, upgrade to a paid plan first, then pick the size. The   resize changes the bill and the CLI asks for interactive confirmation — get the user's   go-ahead first, then run unattended with the CLI-level `--yes` (the `-y` in `npx -y` is   npm's install flag, not the confirm-skip). The resize is async — poll `projects get` until
查看另外 3 个位置
SKILL.md:173来自说明文档打开原文件
   `operation_status` clears before declaring the incident resolved.2. The resize **restarts the project as part of the change**, which also clears any wedged   state — there is no separate user-facing restart, and a bare restart would only buy minutes   before the next spike OOMs again. OOM under real load on the smallest sizes is common and   expected, not a bug.
SKILL.md:158来自说明文档打开原文件
If the command is unavailable (older CLI/backend, `--api-key` link mode), confirm manually in**logs** (`postgres.logs`) via the crash-recovery aftermath — "terminating connection because ofcrash of another server process" / "automatic recovery in progress" — **time-correlated with the5xx burst**: recovery evidence alone only proves an unclean Postgres restart, so the timestampsmust line up before OOM becomes the leading diagnosis([references/metrics.md](references/metrics.md)). With that evidence the fix is headroom, not aretry loop:
SKILL.md:166来自说明文档打开原文件
1. **Upgrade the instance** — `npx -y @insforge/cli projects upgrade-instance <type>`   (`nano` → `micro` → `small` → `medium` → `large` → `xl`), or dashboard → Project Settings →   Compute & Disk. On the free plan, upgrade to a paid plan first, then pick the size. The   resize changes the bill and the CLI asks for interactive confirmation — get the user's   go-ahead first, then run unattended with the CLI-level `--yes` (the `-y` in `npx -y` is   npm's install flag, not the confirm-skip). The resize is async — poll `projects get` until   `operation_status` clears before declaring the incident resolved.2. The resize **restarts the project as part of the change**, which also clears any wedged

Skill 逻辑拆解

4 个说明模块

该技能以诊断和审计 InsForge 项目为目的,并要求通过 npm 临时获取并运行 InsForge CLI,而不是全局安装。

查看原文
SKILL.md:16来自说明文档打开原文件
Diagnose problems in InsForge projects by combining the backend's observability primitives — logs, metrics, db-health, advisor, policies, metadata, error objects, deploy state, and AI assist. This skill provides:
SKILL.md:21来自说明文档打开原文件
**Always use `npx -y @insforge/cli`** — never install the CLI globally.

诊断过程会读取项目日志、数据库运行状态、RLS 策略、认证配置、存储桶和函数等后端信息。

查看原文
SKILL.md:41来自说明文档打开原文件
|---------------------|-------------|-----------|| **Logs** (`logs <source>`; `diagnose logs` for cross-source aggregate) | Time-stream of events from 5 backend sources (`insforge.logs` / `postgREST.logs` / `postgres.logs` / `function.logs` / `function-deploy.logs`) | [references/logs.md](references/logs.md) || **Metrics** (`diagnose metrics`) | EC2 instance time-series (CPU / memory / disk / network) over `1h` / `6h` / `24h` / `7d` | [references/metrics.md](references/metrics.md) || **DB health** (`diagnose db`) | Current Postgres state via 7 named checks (`connections` / `slow-queries` / `bloat` / `size` / `index-usage` / `locks` / `cache-hit`) | [references/db-health.md](references/db-health.md) || **Advisor** (`diagnose advisor --json`) | Static-scan issues across 3 categories (`security` / `performance` / `health`) with `ruleId` / `affectedObject` / `recommendation` | [references/advisor.md](references/advisor.md) || **Policies** (`db policies`) | Active RLS rules from `pg_policies` (USING / WITH CHECK per cmd per role) — returns all policies as a dump | [references/policies.md](references/policies.md) || **Metadata** (`metadata --json`) | Declarative backend state dump (auth config / tables / buckets / functions / AI models / realtime channels) | [references/metadata.md](references/metadata.md) || **Error objects** (no command — read SDK / HTTP response) | SDK error envelope + HTTP status — the routing table from a client-visible error to the right log source | [references/error-objects.md](references/error-objects.md) |

AI 辅助功能把问题描述交给后端 LLM,并允许该代理组合日志、指标、策略和元数据;技能同时提醒其建议可能出错,必须复核。

查看原文
references/ai-assisted.md:3来自说明文档打开原文件
The meta-primitive: hand a natural-language problem description to a backend-side LLM agent that combines the other primitives ([logs](logs.md), [metrics](metrics.md), [db-health](db-health.md), [advisor](advisor.md), [policies](policies.md), [metadata](metadata.md)) on its own and returns a diagnosis plus suggested solutions.**Unlike every other primitive in this skill, `diagnose --ai` returns suggestions, not just observations.** Verify before acting.
references/ai-assisted.md:39来自说明文档打开原文件
If the verification disagrees with the diagnosis, **trust the primitive observation**, not the suggestion. Suggestions can be plausible-sounding but wrong (LLM may pattern-match on similar errors); raw `pg_stat` numbers and log lines can't lie.

实例扩容会增加账单并重启项目;说明要求先取得用户同意,再使用跳过交互确认的参数。

查看原文
SKILL.md:169来自说明文档打开原文件
   Compute & Disk. On the free plan, upgrade to a paid plan first, then pick the size. The   resize changes the bill and the CLI asks for interactive confirmation — get the user's   go-ahead first, then run unattended with the CLI-level `--yes` (the `-y` in `npx -y` is   npm's install flag, not the confirm-skip). The resize is async — poll `projects get` until   `operation_status` clears before declaring the incident resolved.2. The resize **restarts the project as part of the change**, which also clears any wedged   state — there is no separate user-facing restart, and a bare restart would only buy minutes
从这里开始 · 工作说明SKILL.md
insforge-debug
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

40 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录11 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文
  • references/advisor.md已纳入全文
  • references/ai-assisted.md已纳入全文
  • references/db-health.md已纳入全文
  • references/deploy-state.md已纳入全文
  • references/error-objects.md已纳入全文
  • references/logs.md已纳入全文
  • references/metadata.md已纳入全文
  • references/metrics.md已纳入全文
  • references/policies.md已纳入全文
  • agents/openai.yaml已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • SKILL.md工作说明
  • agents/openai.yaml配套文件
  • references/advisor.md配套文件
  • references/ai-assisted.md配套文件
  • references/db-health.md配套文件
  • references/deploy-state.md配套文件
  • references/error-objects.md配套文件
  • references/logs.md配套文件
  • references/metadata.md配套文件
  • references/metrics.md配套文件
  • references/policies.md配套文件

代码和说明中提到的操作

安装其他软件包
SKILL.md:21来自说明文档打开原文件
**Always use `npx -y @insforge/cli`** — never install the CLI globally.
SKILL.md:28来自说明文档打开原文件
```bashnpx -y @insforge/cli diagnose --ai "<issue description>"```
SKILL.md:37来自说明文档打开原文件
All commands run via `npx -y @insforge/cli ...`. The `(command)` shown next to each primitive is the actual CLI command — primitive names are concept labels, **not** CLI subcommand names (e.g., "DB health" is `diagnose db`, not `diagnose db-health`; "Policies" is `db policies`, not `diagnose policies`).
运行命令
SKILL.md:27来自说明文档打开原文件
```bashnpx -y @insforge/cli diagnose --ai "<issue description>"
SKILL.md:197来自说明文档打开原文件
```bashnpx -y @insforge/cli feedback --json \
references/advisor.md:7来自说明文档打开原文件
```bashnpx -y @insforge/cli diagnose advisor [--severity critical|warning|info] [--category security|performance|health] [--limit <n>] [--json]
读取密钥或账号配置
SKILL.md:158来自说明文档打开原文件
If the command is unavailable (older CLI/backend, `--api-key` link mode), confirm manually in**logs** (`postgres.logs`) via the crash-recovery aftermath — "terminating connection because of
SKILL.md:180来自说明文档打开原文件
> Requires Platform login (`npx -y @insforge/cli login`). **Not available when the project is linked via `--api-key`** — fall back to `db-health` + `policies` + `metadata` for a manual audit in that case.
references/advisor.md:11来自说明文档打开原文件
Default limit: 50. Requires Platform login — **not available on backends linked via `--api-key`**.
连接外部网站
references/ai-assisted.md:49来自说明文档打开原文件
User pastes: "I invoked `https://kttprzh4.functions.insforge.app/newton` and got `508: Loop Detected (LOOP_DETECTED). Recursive requests to the same deployment cannot be processed.`"
references/ai-assisted.md:52来自说明文档打开原文件
```bashnpx -y @insforge/cli diagnose --ai "I invoked edge function https://kttprzh4.functions.insforge.app/newton, got error: 508: Loop Detected (LOOP_DETECTED)\n\nRecursive requests to the same deployment cannot be processed."```
references/metadata.md:55来自说明文档打开原文件
#    - redirect URLs include the exact callback the app uses#    (e.g., https://myapp.com/auth/callback — protocol + host + path must match)
读取了多少行
907
文件校验值(用于核对版本)
211e52001f0877db92d618c15cc8042a6f0a77aebe21c1125240580b32384bfa