Find Security Vulnerabilities In Code

usestrix/strix/skills/find-security-vulnerabilities-in-code

作者 usestrix469529068290Apache-2.067K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

Find security vulnerabilities in a codebase or repository with Strix — a white-box AI security review that reads your source, reasons about the actual data flow and authorization model, then exploits what it finds in a live sandbox so every reported issue has a working proof-of-concept instead of a noisy static-analysis alert. Covers injection, XSS, SSRF, broken access control and IDOR, insecure deserialization, secrets in code, unsafe dependencies, and business-logic flaws. Use when the user asks to security-scan, security-review, or audit their code, repo, or pull request for vulnerabilities.

仅含说明Security
AI 生成的概览

指导使用 Strix 进行白盒 AI 安全审查,在代码库中发现并验证可利用的漏洞。

功能
该技能指导智能体对本地工作树、GitHub 仓库或特定服务子树运行白盒安全审查工具 Strix。智能体阅读源代码以建模路由、危险汇聚点和授权检查,然后在沙箱中尝试真实利用,产出带有概念验证证据的发现。输出写入运行目录,包括渗透测试报告、每个发现的 Markdown 文件、JSON/CSV 漏洞列表和 SARIF 文件。它还涵盖审查范围界定、基于差异的审查、结果解读,以及补充的依赖与密钥扫描。
适用场景
当用户要求对代码库、仓库或拉取请求进行安全扫描、安全审查或漏洞审计时使用。适用于注入、XSS、SSRF、访问控制缺陷与 IDOR、不安全反序列化、代码中的密钥、不安全依赖以及业务逻辑缺陷的检查。它面向经漏洞利用验证的审查,而非穷尽式清单。
运行要求
需要 Strix 可执行文件;本地运行还需要 Docker 和 LLM 密钥。托管云路径无需 Docker 和 LLM 密钥,但需要 Strix 云登录。访问远程仓库和使用云服务需要网络连接。该技能不附带脚本,仅提供说明和命令示例。

Find security vulnerabilities in code

White-box security review with Strix: the agents read the source to build a model of routes, sinks, and authorization checks, then attempt real exploitation. Findings come with a proof-of-concept, so the output is a short list of proven issues rather than the hundreds of "potential" hits a pattern-matching scanner produces.

Install, LLM setup, all flags, and the managed-cloud path are in the penetration-testing-with-strix skill. For a run with no Docker and no LLM key, the same binary drives the managed platform: strix cloud login, then strix cloud scans start ... (details in managed-pentesting-with-strix).

Run it

bash
# Local working treestrix -n -t ./ --scan-mode standard --max-budget 15
# A GitHub repo directlystrix -n -t https://github.com/org/app --max-budget 15
# Monorepo: point at the service that matters, not the whole treestrix -n -t ./services/checkout --max-budget 20
# Only what a branch changed (whole-repo review is wasteful on a large repo)strix -n -t ./ --scope-mode diff --diff-base origin/main --max-budget 10

A local path is mounted into the sandbox writable, so the agents can modify it. Run against a clean checkout.

Two things sharply improve results:

  1. Add a running instance of the app. -t ./ -t http://host.docker.internal:3000 lets the agents confirm exploitability against live behavior instead of reasoning about it statically — this is the difference between "this looks unsafe" and a validated finding. If nothing is running, static-only findings should be described as unconfirmed.
  2. Scope the review. Point at the risky subtree and say what matters:
    bash
    strix -n -t ./services/api --max-budget 15 \  --instruction "Focus on the authorization layer in src/auth and every route under src/routes/admin. Multi-tenant app: tenant id comes from the JWT. Flag any query that filters by object id without also filtering by tenant."
    Tenancy model, trust boundaries, and which inputs are attacker-controlled are things the agents cannot infer reliably — tell them.

Reviewing a pull request instead of the whole repo

For diff-scoped review of a branch or PR (and blocking merges on findings), use ci-security-scanning-with-strix — it covers diff scoping, PR comments, and SARIF upload to GitHub code scanning. The managed platform can also review PRs directly via API (managed-pentesting-with-strix).

Read the results

In strix_runs/<run>/: penetration_test_report.md (start here), vulnerabilities/*.md (one per finding, with PoC and remediation), vulnerabilities.json / .csv, findings.sarif (upload to code scanning), run.json.

Before reporting to the user, open each finding and check the PoC actually demonstrates impact. Report file and line alongside the exploit so the fix is obvious.

Exit 0 means nothing exploitable was proven in what was analyzed — not that the codebase is clean. Check run.json status and cost against --max-budget, and note which paths went unreviewed if the run was capped.

Complementary tooling

This is exploit-validated review, not an exhaustive inventory. Keep a dependency scanner (SCA) and secret scanning in place for complete coverage of known-CVE dependencies and committed credentials; use this for the logic, authorization, and injection bugs those tools structurally cannot find.

Fix and verify

Hand results to fix-security-vulnerabilities-with-strix: patch the root cause (the shared authorization helper, not the one route), then re-run Strix to prove the exploit no longer works.

来源与署名

来源:usestrix/strix位于skills/find-security-vulnerabilities-in-code提交4695290

许可证: Apache-2.0

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架