managed-pentesting-with-strix
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 penetration-testing-with-strix 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当您希望使用Strix的自主渗透测试功能但无需自行运行Docker或LLM时,可使用此API——扫描将在Strix的基础设施上运行,结果会在团队仪表板中跟踪。这是沙箱/托管Agent和CI环境、团队协作以及定时/持续测试场景的理想选择(可下载的PDF/DOCX报告为企业版专属功能)。如果需要完全本地、免费、离线或自带LLM的运行方式,请改用penetration-testing-with-strix技能中的开源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> -
获取令牌:用户需在仪表板的设置 → API访问(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
格式为"所有者/仓库名"。
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密钥) |
| 引导Agent扫描方向 |
| 附加上传的源码/文档包,提供白盒扫描上下文 |
| 扫描完成后发送邮件通知 |
响应格式为,初始为。
{ 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 fix-security-vulnerabilities-with-strix 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)跨扫描的组织级漏洞分类处理:调用(需权限;可按严重程度/状态过滤)。使用vulnerabilities的端点更新漏洞处理状态。如需修复漏洞,请使用fix-security-vulnerabilities-with-strix技能。
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评审详情。仓库级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
关于负载格式,请查看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/文件/元标签)——请勿尝试绕过验证。