跳到正文
Skillpedia
安全73k · #3098

find-security-vulnerabilities-in-code

它能做什么

这个技能审查源代码中的安全弱点,并尝试利用它找到的每个弱点。它面向希望得到一份简短的已确认问题清单的开发者和安全审查人员。

适用场景

  • ✓有人希望在发布前对代码仓库或服务进行安全审查的时候。
  • ✓代码涉及登录、权限或用户数据,需要检查的时候。
  • ✓大量扫描器警报需要缩减为真实问题的时候。

技能链接

https://github.com/usestrix/strix/blob/main/skills/find-security-vulnerabilities-in-code/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/usestrix/strix/blob/main/skills/find-security-vulnerabilities-in-code/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我审查我们的后端代码是否存在安全问题吗?我只想要那些你能确认确实可以利用的问题。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会阅读代码,了解其路由和权限检查,然后在测试沙箱中进行真实的攻击尝试。每个报告的问题都附有可运行的概念验证。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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

# Local working tree
strix -n -t ./ --scan-mode standard --max-budget 15

# A GitHub repo directly
strix -n -t https://github.com/org/app --max-budget 15

# Monorepo: point at the service that matters, not the whole tree
strix -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:
    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.

常见问题

它会查找哪些问题?

这个技能列出了注入、跨站脚本、服务端请求伪造、失效的访问控制和 IDOR。

我应该在代码的干净副本上运行吗?

应该。这个技能说,本地文件夹会以可写方式挂载,因此代理可以修改它,建议使用干净的检出副本。

它能只检查有变化的部分吗?

可以。这个技能描述了一种差异模式,只审查分支的更改,适合大型仓库。

详情

作者的原始描述

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

repo: usestrix/strix

热度

GitHub 星标
73k
排名
#3098
许可证
Apache-2.0
更新时间
2026/10/30

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能