strix-cloud-api
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStrix Cloud API (managed, no local infra)
Strix Cloud API(托管式,无需本地基础设施)
Use this when you want Strix's autonomous pentesting without running Docker or an LLM yourself — the scan runs on Strix's infrastructure and results are tracked in a team dashboard. This is the right choice in sandboxed/hosted agent and CI environments, for teams, and for scheduled/continuous testing (downloadable PDF/DOCX reports are an Enterprise-plan feature). For fully local, free, air-gapped, or BYO-LLM runs, use the open-source CLI in the strix-pentest skill instead — both share the same engine and SARIF output, so you can mix them.
Full reference: docs.app.strix.ai · OpenAPI:
https://docs.app.strix.ai/openapi.json当你希望无需自行运行 Docker 或 LLM 即可使用 Strix 的自动化渗透测试功能时,可采用此方案——扫描将在 Strix 的基础设施上运行,结果会在团队仪表盘中跟踪。这适用于沙箱/托管代理环境、CI 环境、团队协作场景,以及计划型/持续测试场景(可下载的 PDF/DOCX 报告为企业版专属功能)。如果需要完全本地、免费、离线或自带 LLM 的运行方式,请使用 strix-pentest 技能中的开源 CLI——两者共享同一引擎和 SARIF 输出格式,因此可以混合使用。
完整参考文档:docs.app.strix.ai · OpenAPI 地址:
https://docs.app.strix.ai/openapi.jsonSetup
配置步骤
-
Base URL:
https://app.strix.ai/api/v1 -
Auth: every request sends. Tokens are org-scoped.
Authorization: Bearer <token> -
Get a token: the user creates one in the dashboard at Settings → API Access (app.strix.ai). Ask them for it; never hardcode, log, or commit it. Store it in an env var or the CI secret store.
-
Scopes (least-privilege): assign only what the integration needs and rotate regularly:
Scope Grants /scans:readscans:writelist/read/report scans · create/rerun/cancel scans /vulnerabilities:read:writeread findings · update status & notes /assets:read:writeread domains/repos · register/update them /schedules:read:writeread schedules · create/trigger recurring scans pr_reviews:writetrigger PR security reviews /webhooks:read:writemanage webhook subscriptions tokens:writecreate/revoke API tokens
bash
export STRIX_API_TOKEN="<token>"
BASE=https://app.strix.ai/api/v1
auth=(-H "Authorization: Bearer $STRIX_API_TOKEN")All examples use to parse JSON. Handle HTTP errors: bad/expired token, out of credits, scope/plan-tier limit, validation error.
jq401402403422-
基础 URL:
https://app.strix.ai/api/v1 -
身份验证: 每个请求需携带。令牌为组织级权限范围。
Authorization: Bearer <token> -
获取令牌: 用户可在仪表盘中的 Settings → API Access(app.strix.ai)页面创建令牌。请向用户索要令牌;切勿硬编码、记录或提交令牌,应将其存储在环境变量或 CI 密钥存储中。
-
权限范围(最小权限原则): 仅分配集成所需的权限,并定期轮换:
权限范围 权限说明 /scans:readscans:write列出/读取/查看扫描报告 · 创建/重新运行/取消扫描 /vulnerabilities:read:write读取漏洞结果 · 更新漏洞状态与备注 /assets:read:write读取域名/代码仓库 · 注册/更新资产 /schedules:read:write读取扫描计划 · 创建/触发定期扫描 pr_reviews:write触发 PR 安全评审 /webhooks:read:write管理 Webhook 订阅 tokens:write创建/撤销 API 令牌
bash
export STRIX_API_TOKEN="<token>"
BASE=https://app.strix.ai/api/v1
auth=(-H "Authorization: Bearer $STRIX_API_TOKEN")所有示例均使用 解析 JSON。需处理以下 HTTP 错误: 令牌无效/过期、 积分不足、 权限/版本限制、 验证错误。
jq4014024034221. Register the target as an asset
1. 将目标注册为资产
Scans run against registered assets, not raw URLs. Register once, then reuse the returned UUID.
bash
undefined扫描需针对已注册的资产运行,而非原始 URL。只需注册一次,之后可复用返回的 UUID。
bash
undefinedDomain (black-box / live target). Requires domain verification before external scanning.
域名(黑盒/在线目标)。外部扫描前需完成域名验证。
asset_type must be one of: web_app | api | attack_surface.
asset_type 必须为以下值之一:web_app | api | attack_surface。
curl -sS "$BASE/domains" "${auth[@]}" -H "Content-Type: application/json"
-d '{"domain":"staging.example.com","asset_type":"web_app"}' | jq '{id:.domain.id, status, reachable, verification}'
-d '{"domain":"staging.example.com","asset_type":"web_app"}' | jq '{id:.domain.id, status, reachable, verification}'
curl -sS "$BASE/domains" "${auth[@]}" -H "Content-Type: application/json"
-d '{"domain":"staging.example.com","asset_type":"web_app"}' | jq '{id:.domain.id, status, reachable, verification}'
-d '{"domain":"staging.example.com","asset_type":"web_app"}' | jq '{id:.domain.id, status, reachable, verification}'
Repository (white-box / code review). full_name
is "owner/name".
full_name代码仓库(白盒/代码评审)。full_name
格式为 "owner/name"。
full_nameSend one repository object, or a bare JSON array for several — not an object
发送单个仓库对象,或直接发送 JSON 数组(包含多个仓库)——请勿使用包裹 "repositories" 键的对象(否则会返回 400 错误)。
wrapping a "repositories" key (that is rejected with 400).
—
curl -sS "$BASE/repositories" "${auth[@]}" -H "Content-Type: application/json"
-d '[{"full_name":"org/app","provider":"github"}]' | jq '.repositories[] | {id, full_name}'
-d '[{"full_name":"org/app","provider":"github"}]' | jq '.repositories[] | {id, full_name}'
Look up existing assets instead of re-adding: `GET /domains`, `GET /repositories` (both `assets:read`, paginated with `?page=&limit=`).curl -sS "$BASE/repositories" "${auth[@]}" -H "Content-Type: application/json"
-d '[{"full_name":"org/app","provider":"github"}]' | jq '.repositories[] | {id, full_name}'
-d '[{"full_name":"org/app","provider":"github"}]' | jq '.repositories[] | {id, full_name}'
可通过查询现有资产避免重复添加:`GET /domains`、`GET /repositories`(均需 `assets:read` 权限,支持分页参数 `?page=&limit=`)。2. Launch a scan
2. 启动扫描
POST /scansscans:writedomain_idsrepository_idsinternal_targetsbash
scan_id=$(curl -sS "$BASE/scans" "${auth[@]}" -H "Content-Type: application/json" -d '{
"engagement_type": "live_test",
"domain_ids": ["<domain-uuid>"],
"focus": "IDOR, auth bypass, SSRF",
"context": "Staging. Test account creds are configured as a test user.",
"notify_on_completion": true
}' | jq -r .scan_id)
echo "$scan_id"Useful fields:
CreateScanRequest| Field | Purpose |
|---|---|
| |
| targets (at least one) |
| narrow to specific paths / branches |
| authenticated scanning, incl. |
| extra HTTP headers (e.g. API keys) for the target |
| steer the agents |
| attach uploaded source/docs archives for white-box context |
| email when done |
Response is with = .
{ scan_id, title, status }statuspending调用 (需 权限)。需通过 、 或 指定至少一个目标(内部基础设施需网络连接器——详见文档)。
POST /scansscans:writedomain_idsrepository_idsinternal_targetsbash
scan_id=$(curl -sS "$BASE/scans" "${auth[@]}" -H "Content-Type: application/json" -d '{
"engagement_type": "live_test",
"domain_ids": ["<domain-uuid>"],
"focus": "IDOR, auth bypass, SSRF",
"context": "Staging. Test account creds are configured as a test user.",
"notify_on_completion": true
}' | jq -r .scan_id)
echo "$scan_id"CreateScanRequest| 字段 | 用途 |
|---|---|
| |
| 扫描目标(至少一个) |
| 限定扫描特定路径/分支 |
| 认证扫描信息,包含 |
| 目标的额外 HTTP 头(如 API 密钥) |
| 引导扫描代理的方向 |
| 附加上传的源码/文档归档,用于白盒扫描上下文 |
| 扫描完成后发送通知邮件 |
响应格式为 ,初始 为 。
{ scan_id, title, status }statuspending3. Poll to completion
3. 轮询扫描完成状态
GET /scans/{scanId}scans:readpending → running → completedfailedcancelledbash
while :; do
s=$(curl -sS "$BASE/scans/$scan_id" "${auth[@]}" | jq -r .status)
echo "status=$s"; [[ "$s" =~ ^(completed|failed|cancelled)$ ]] && break
sleep 60
done调用 (需 权限)。状态流转:(或 / )。需定期轮询——扫描耗时从几分钟到几小时不等,请勿阻塞流程。
GET /scans/{scanId}scans:readpending → running → completedfailedcancelledbash
while :; do
s=$(curl -sS "$BASE/scans/$scan_id" "${auth[@]}" | jq -r .status)
echo "status=$s"; [[ "$s" =~ ^(completed|failed|cancelled)$ ]] && break
sleep 60
done4. Read findings
4. 读取漏洞结果
The scan-detail response includes , , , a severity roll-up, and a array. Each vulnerability carries , and (for code findings) ///.
executive_summarymethodologyrecommendationsfindingsvulnerabilities[]title, severity, status, cvss, cwe, endpoint, method, impact, technical_analysis, poc_description, poc_script_codecode_filecode_diffcode_beforecode_afterbash
curl -sS "$BASE/scans/$scan_id" "${auth[@]}" \
| jq '["critical","high","medium","low","info"] as $order
| .vulnerabilities
| sort_by(.severity as $s | $order | index($s))
| .[] | {title, severity, endpoint, cwe}'Cloud severities are and statuses are . Sort by an explicit severity order rather than , which sorts alphabetically (critical, high, low, medium).
critical | high | medium | lowopen | in_progress | fixed | ignoredsort_by(.severity)Org-wide triage across scans: (; filter by severity/status). Update triage state with the vulnerabilities endpoints. To remediate, hand off to the strix-fix-findings skill.
GET /vulnerabilitiesvulnerabilities:read:write扫描详情响应包含 、、、 严重程度汇总,以及 数组。每个漏洞对象包含 ,代码漏洞还包含 /// 字段。
executive_summarymethodologyrecommendationsfindingsvulnerabilities[]title, severity, status, cvss, cwe, endpoint, method, impact, technical_analysis, poc_description, poc_script_codecode_filecode_diffcode_beforecode_afterbash
curl -sS "$BASE/scans/$scan_id" "${auth[@]}" \
| jq '["critical","high","medium","low","info"] as $order
| .vulnerabilities
| sort_by(.severity as $s | $order | index($s))
| .[] | {title, severity, endpoint, cwe}'云端漏洞严重程度分为 ,状态分为 。需按明确的严重程度顺序排序,而非直接使用 (后者会按字母顺序排序,导致顺序变为 critical, high, low, medium)。
critical | high | medium | lowopen | in_progress | fixed | ignoredsort_by(.severity)跨扫描的组织级漏洞分类处理:调用 (需 权限;支持按严重程度/状态过滤)。可通过漏洞 接口更新分类状态。如需修复漏洞,请使用 strix-fix-findings 技能。
GET /vulnerabilitiesvulnerabilities:read:write5. Export & report
5. 导出与报告
bash
undefinedbash
undefinedSARIF 2.1.0 for GitHub code scanning / ASPM ingestion
导出 SARIF 2.1.0 格式文件,用于 GitHub 代码扫描/ASPM 集成
curl -sS "$BASE/scans/$scan_id/sarif" "${auth[@]}" -o findings.sarif
curl -sS "$BASE/scans/$scan_id/sarif" "${auth[@]}" -o findings.sarif
Report. The format and file type are query params (Accept
is ignored):
Accept导出报告。格式和文件类型通过查询参数指定(Accept
头会被忽略):
Acceptformat=technical (default) | retest | attestation | executive_summary
format=technical(默认)| retest | attestation | executive_summary
type=pdf (default) | docx
type=pdf(默认)| docx
Any report download requires the Enterprise plan; formats beyond technical
,
technical所有报告下载均需企业版权限;除 technical
格式、DOCX 格式和白标品牌外,其他格式也为企业版专属。扫描必须完成后才能导出报告。
technicalDOCX, and white-label branding are Enterprise-only too. Scan must be completed.
—
curl -sS "$BASE/scans/$scan_id/report?format=technical&type=pdf" "${auth[@]}" -o strix-report.pdf
undefinedcurl -sS "$BASE/scans/$scan_id/report?format=technical&type=pdf" "${auth[@]}" -o strix-report.pdf
undefined6. PR reviews
6. PR 评审
Trigger an automated security review of a pull request (); results appear as PR comments and in the dashboard:
pr_reviews:writebash
curl -sS "$BASE/pr-reviews/start" "${auth[@]}" -H "Content-Type: application/json" \
-d '{"repository_full_name":"org/app","pr_number":123}'List/inspect via and . Repo-level PR-review behavior is configured with the repository-settings endpoint.
GET /pr-reviewsGET /pr-reviews/{id}触发拉取请求的自动化安全评审(需 权限);结果会以 PR 评论形式展示,并同步到仪表盘中:
pr_reviews:writebash
curl -sS "$BASE/pr-reviews/start" "${auth[@]}" -H "Content-Type: application/json" \
-d '{"repository_full_name":"org/app","pr_number":123}'可通过 和 列出/查看评审详情。仓库级 PR 评审行为可通过仓库设置接口配置。
GET /pr-reviewsGET /pr-reviews/{id}7. Continuous testing (schedules & webhooks)
7. 持续测试(计划与 Webhook)
- Schedules (, Pro plan): create recurring scans and trigger them on demand — the managed equivalent of a cron-driven CLI loop.
schedules:write - Webhooks (): subscribe to pentest/vulnerability lifecycle events (e.g.
webhooks:write,scan.completed) to push results into Slack, ticketing, or your own pipeline instead of polling.vulnerability.created
See the schedules and webhooks sections at docs.app.strix.ai for payloads.
- 扫描计划(需 权限,专业版可用):创建定期扫描任务,并可按需触发——相当于托管版的 cron 驱动 CLI 循环。
schedules:write - Webhook(需 权限):订阅渗透测试/漏洞生命周期事件(如
webhooks:write、scan.completed),将结果推送到 Slack、工单系统或自有流水线,无需轮询。vulnerability.created
关于 payload 详情,请查看 docs.app.strix.ai 中的计划与 Webhook 章节。
Safety
安全提示
Only scan assets the user's organization owns or is authorized to test. External domain scans require verification (DNS/file/meta-tag) enforced by the platform — don't try to bypass it.
仅允许扫描用户组织拥有或获得授权测试的资产。外部域名扫描需完成平台强制的验证(DNS/文件/元标签)——请勿尝试绕过验证。