API 参考扫描 API
执行 Skill 安全扫描
对 owner/repo(可指定 ref 与子目录)跑一遍规则 + LLM 复核。
POST
/api/v1/skills/scanPOST
给内部服务用的端点:skills:scan 只配给 Web 侧的服务 key,不在任何自助签发范围内。请求只带地址、不带文件——源码由 Console 自己取,这样同一个提交在任何一次扫描里都得到同一个结论。规则在仓库所属环境里执行(Vercel Sandbox 或本地 clone),source 字段回传实际执行位置。最长 300 秒。
Authorization
bearerAuth AuthorizationBearer <token>
Authorization: Bearer <key>。key 由控制台自助签发,或管理员在 /dashboard 代签
In: header
Request Body
application/json
repoFullName 必填;ref / skillDir / includeLlm 可选,includeLlm 缺省 true
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/skills/scan" \ -H "Content-Type: application/json" \ -d '{ "repoFullName": "string" }'{ "repoFullName": "string", "skillDir": "string", "ref": "string", "source": "local-clone", "context": { "owner": "string", "homepage": "string", "stars": 0, "license": "string" }, "grade": "safe", "flags": [ { "name": "string", "severity": "critical", "description": "string", "file": "string", "line": 0, "snippet": "string", "inCodeBlock": true, "citedOrNegated": true } ], "trustTier": 1, "llmGrade": "safe", "llmAnalysis": null, "scannedAt": "2019-08-24T14:15:22Z", "rulesVersion": "string", "fileCount": 0, "truncated": true, "truncatedReason": "string", "files": [ { "path": "string", "size": 0 } ]}