mirror of
https://github.com/usestrix/strix.git
synced 2026-08-16 17:27:26 +02:00
feat(skills): add target-specific security testing skills (web app, API, OWASP Top 10, code review)
This commit is contained in:
@@ -15,6 +15,13 @@ npx skills add usestrix/strix
|
||||
- `fix-security-vulnerabilities-with-strix` — remediate findings and re-run Strix to verify
|
||||
- `ci-security-scanning-with-strix` — add PR scanning to CI/CD (self-hosted CLI or managed app)
|
||||
|
||||
Target-specific workflows built on the same engine:
|
||||
|
||||
- `web-app-penetration-testing` — black-box pentest of a live web app or staging site
|
||||
- `api-security-testing` — REST/GraphQL APIs and the OWASP API Security Top 10 (BOLA/IDOR, authz)
|
||||
- `owasp-top-10-testing` — systematic OWASP Top 10 assessment with honest per-category coverage
|
||||
- `find-security-vulnerabilities-in-code` — white-box review of a repo or working tree
|
||||
|
||||
**Two ways to run, same engine — pick per situation:**
|
||||
|
||||
- **Open-source CLI (self-hosted):** free, fully local, BYO LLM key, needs Docker. Best for local dev loops, air-gapped/offline, and full control.
|
||||
|
||||
@@ -116,7 +116,7 @@ Strix is agent-ready. Give Claude Code, Cursor, Codex, or any [SKILL.md-compatib
|
||||
npx skills add usestrix/strix
|
||||
```
|
||||
|
||||
This installs four skills: **penetration-testing-with-strix** (run headless scans and read results), **managed-pentesting-with-strix** (drive the managed [app.strix.ai](https://app.strix.ai) platform via REST — no local Docker or LLM key), **fix-security-vulnerabilities-with-strix** (remediate + re-scan to verify), and **ci-security-scanning-with-strix** (PR scanning in CI). Agents can run Strix two ways with the same engine — the open-source CLI locally, or the managed cloud when there's no local infra — and read [`AGENTS.md`](AGENTS.md) for a quick reference, [docs.strix.ai/llms.txt](https://docs.strix.ai/llms.txt) for the CLI docs, and [docs.app.strix.ai](https://docs.app.strix.ai) for the API.
|
||||
This installs eight skills: **penetration-testing-with-strix** (run headless scans and read results), **managed-pentesting-with-strix** (drive the managed [app.strix.ai](https://app.strix.ai) platform via REST — no local Docker or LLM key), **fix-security-vulnerabilities-with-strix** (remediate + re-scan to verify), **ci-security-scanning-with-strix** (PR scanning in CI), plus target-specific workflows: **web-app-penetration-testing**, **api-security-testing**, **owasp-top-10-testing**, and **find-security-vulnerabilities-in-code**. Agents can run Strix two ways with the same engine — the open-source CLI locally, or the managed cloud when there's no local infra — and read [`AGENTS.md`](AGENTS.md) for a quick reference, [docs.strix.ai/llms.txt](https://docs.strix.ai/llms.txt) for the CLI docs, and [docs.app.strix.ai](https://docs.app.strix.ai) for the API.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ npx skills add usestrix/strix
|
||||
| `managed-pentesting-with-strix` | Drive the managed [app.strix.ai](https://app.strix.ai) platform over REST — no local Docker or LLM key needed |
|
||||
| `fix-security-vulnerabilities-with-strix` | Triage findings, fix root causes, and re-run Strix to verify each fix |
|
||||
| `ci-security-scanning-with-strix` | Add PR security scanning to GitHub Actions or any CI (self-hosted CLI or managed app) |
|
||||
| `web-app-penetration-testing` | Black-box pentest of a live web app or staging site — scope, credentials, and multi-account access-control testing |
|
||||
| `api-security-testing` | Test a REST/GraphQL API against the OWASP API Security Top 10 — schema-driven enumeration, BOLA/IDOR, authz |
|
||||
| `owasp-top-10-testing` | Systematic OWASP Top 10 assessment with honest per-category coverage |
|
||||
| `find-security-vulnerabilities-in-code` | White-box security review of a repo or working tree, with exploits to confirm findings |
|
||||
|
||||
Install a single skill with `npx skills add usestrix/strix --skill penetration-testing-with-strix`, or use one without installing:
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
name: api-security-testing
|
||||
description: Security-test a REST, GraphQL, or gRPC API with Strix — autonomous agents that enumerate endpoints from an OpenAPI/GraphQL schema (or by crawling), then actually exploit the API-specific vulnerability classes the OWASP API Security Top 10 covers: broken object-level authorization (BOLA/IDOR), broken function-level authorization, excessive data exposure, mass assignment, injection, SSRF, and auth/token flaws. Every finding comes with a working proof-of-concept request. Use when the user asks to pentest, security-test, audit, or find vulnerabilities in an API, endpoint, or backend service.
|
||||
license: Apache-2.0
|
||||
metadata:
|
||||
author: usestrix
|
||||
homepage: https://docs.strix.ai
|
||||
---
|
||||
|
||||
# Security-test an API
|
||||
|
||||
APIs fail differently from web UIs: there's no rendered surface to crawl, the interesting bugs are authorization-shaped rather than injection-shaped, and the same endpoint behaves differently per token. This workflow targets those specifics with Strix's autonomous agents.
|
||||
|
||||
Install, LLM setup, full CLI flags, and the managed-cloud path are in the **penetration-testing-with-strix** skill. Read it if `strix --version` fails or the target isn't an API.
|
||||
|
||||
## 1. Gather what the agents need
|
||||
|
||||
APIs are near-impossible to test blind, so collect first:
|
||||
|
||||
| Input | Why it matters |
|
||||
|---|---|
|
||||
| **Schema** — OpenAPI/Swagger URL or file, GraphQL endpoint (introspection), or `.proto` | Turns guesswork into full endpoint enumeration. Biggest single win in coverage. |
|
||||
| **Two sets of credentials/tokens**, ideally in different tenants | BOLA/IDOR — the #1 API vulnerability class — can only be *proven* by accessing tenant A's objects with tenant B's token. |
|
||||
| **A low-privilege and a high-privilege token** | Required to prove broken function-level authorization (a `user` calling admin-only routes). |
|
||||
| **Example object IDs** | Lets agents test ID tampering immediately instead of hunting for valid identifiers. |
|
||||
| **Out-of-scope routes** | Payments, mass notification, destructive admin endpoints. |
|
||||
| **Rate limits / WAF** in front of the API | Avoids agents burning budget on throttled requests; mention them so testing adapts. |
|
||||
|
||||
Ask the user for anything missing — don't fabricate tokens or scan an API they don't own.
|
||||
|
||||
## 2. Run the scan
|
||||
|
||||
```bash
|
||||
strix -n -t https://api.staging.example.com --max-budget 20 \
|
||||
--instruction "OpenAPI spec: https://api.staging.example.com/openapi.json.
|
||||
Tenant A token: <tokenA> (org 1111, user id 11, order id 501).
|
||||
Tenant B token: <tokenB> (org 2222, user id 22).
|
||||
Admin token: <tokenAdmin>.
|
||||
Focus: BOLA/IDOR across orgs, function-level authz on /admin/*, mass assignment on PATCH /users/{id}, excessive data exposure in list responses.
|
||||
Out of scope: POST /billing/*, POST /notifications/broadcast."
|
||||
```
|
||||
|
||||
- **Add the backend source for depth:** `-t ./services/api -t https://api.staging.example.com`. With code access the agents can reason about authorization checks and object ownership rather than inferring them from responses.
|
||||
- **GraphQL:** point at the GraphQL endpoint and say whether introspection is enabled; call out that you want batching/aliasing abuse, depth/complexity limits, and per-field authorization tested.
|
||||
- **Internal/private APIs** unreachable from your machine: use the managed platform's network connector — see **managed-pentesting-with-strix**.
|
||||
- Use `--instruction-file` when the credential/context block gets long, and keep tokens out of shell history and out of committed files.
|
||||
|
||||
## 3. Verify findings
|
||||
|
||||
`strix_runs/<run>/penetration_test_report.md` first, then `vulnerabilities/*.md` — each contains the exact request that proved the issue. Replay it (e.g. with `curl`) before reporting; for authorization findings, confirm the response really contains the other tenant's data rather than an empty 200.
|
||||
|
||||
`findings.sarif` uploads to GitHub code scanning; `vulnerabilities.json` is the structured index for ticketing.
|
||||
|
||||
## 4. Fix, re-test, and keep it tested
|
||||
|
||||
Remediate with **fix-security-vulnerabilities-with-strix** (fix the authorization check, not the single endpoint), then re-run against the same target to prove the exploit is dead. Wire it into pull-request CI with **ci-security-scanning-with-strix** so new endpoints get tested as they ship.
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
name: find-security-vulnerabilities-in-code
|
||||
description: 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.
|
||||
license: Apache-2.0
|
||||
metadata:
|
||||
author: usestrix
|
||||
homepage: https://docs.strix.ai
|
||||
---
|
||||
|
||||
# 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.
|
||||
|
||||
## Run it
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
# Large monorepo: bind-mount instead of copying in
|
||||
strix -n --mount ./huge-monorepo --max-budget 20
|
||||
```
|
||||
|
||||
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 can't 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 can't 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.
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
name: owasp-top-10-testing
|
||||
description: Test an application against the OWASP Top 10 with Strix — autonomous AI agents that attempt real exploits for each category (broken access control, cryptographic failures, injection, insecure design, misconfiguration, vulnerable components, auth failures, integrity failures, logging gaps, SSRF) and report only what they could actually prove, mapped back to the category with a proof-of-concept. Also covers the OWASP API Security Top 10. Use when the user asks for an OWASP Top 10 assessment, OWASP compliance testing, or a security review mapped to OWASP categories.
|
||||
license: Apache-2.0
|
||||
metadata:
|
||||
author: usestrix
|
||||
homepage: https://docs.strix.ai
|
||||
---
|
||||
|
||||
# Test against the OWASP Top 10
|
||||
|
||||
The OWASP Top 10 is a taxonomy of risk categories, not a test suite — so "OWASP Top 10 testing" means exercising each category against the real application and reporting what's actually exploitable. Strix's agents do the exploitation; this skill covers running it category-by-category and honestly reporting coverage.
|
||||
|
||||
Install, LLM setup, and the managed-cloud alternative: **penetration-testing-with-strix**.
|
||||
|
||||
## What is and isn't testable by an agent
|
||||
|
||||
Be straight with the user about this — claiming a clean sweep of all ten is misleading.
|
||||
|
||||
| Category (2021) | Coverage |
|
||||
|---|---|
|
||||
| A01 Broken Access Control | **Strong** — needs two accounts (and a privileged one) to prove cross-user/tenant and privilege-escalation access. |
|
||||
| A02 Cryptographic Failures | **Partial** — transport config, weak/absent encryption of data in transit, tokens and secrets exposed in responses; at-rest crypto needs source or infra review. |
|
||||
| A03 Injection | **Strong** — SQL/NoSQL/command/template injection and XSS, exploit-validated. |
|
||||
| A04 Insecure Design | **Partial** — business-logic abuse (price/quantity tampering, workflow skipping, race conditions) is found where reachable; design intent still needs human review. |
|
||||
| A05 Security Misconfiguration | **Strong** — debug endpoints, verbose errors, permissive CORS, missing hardening, default credentials, exposed admin surfaces. |
|
||||
| A06 Vulnerable & Outdated Components | **Partial** — version fingerprinting plus dependency review when source is supplied; use a dedicated SCA tool for exhaustive dependency inventory. |
|
||||
| A07 Identification & Auth Failures | **Strong** — auth bypass, weak session/token handling, password-reset and MFA flaws. |
|
||||
| A08 Software & Data Integrity Failures | **Partial** — insecure deserialization and unsigned-update paths where reachable; CI/CD supply-chain integrity is out of scope for a runtime scan. |
|
||||
| A09 Logging & Monitoring Failures | **Not testable from outside** — requires reviewing the logging/alerting pipeline; state this rather than reporting it as passed. |
|
||||
| A10 SSRF | **Strong** — exploit-validated, including blind SSRF via out-of-band callbacks. |
|
||||
|
||||
For APIs, run the same exercise against the **OWASP API Security Top 10** (BOLA, broken function-level authz, mass assignment, excessive data exposure) using the **api-security-testing** skill.
|
||||
|
||||
## Run it
|
||||
|
||||
Maximum category coverage comes from giving the agents both the source and a running instance, plus credentials at two privilege levels:
|
||||
|
||||
```bash
|
||||
strix -n \
|
||||
-t https://github.com/org/app \
|
||||
-t https://staging.example.com \
|
||||
--scan-mode deep --max-budget 30 \
|
||||
--instruction "OWASP Top 10 (2021) assessment. Cover every category systematically and map each finding to its category.
|
||||
Accounts: userA@example.com/<pw> (org 1), userB@example.com/<pw> (org 2), admin@example.com/<pw>.
|
||||
Prioritise A01 (cross-org and privilege escalation), A03, A05, A07, A10.
|
||||
Out of scope: /billing/*, outbound email."
|
||||
```
|
||||
|
||||
- `--scan-mode deep` matters here: systematically walking ten categories is not a quick scan.
|
||||
- Without a second account, A01 results are structurally incomplete — say so in the report rather than leaving it implied.
|
||||
- Need an auditor-facing PDF mapped to categories? Run it through the managed platform and pull the technical report (**managed-pentesting-with-strix**).
|
||||
|
||||
## Report honestly
|
||||
|
||||
From `strix_runs/<run>/`, group `vulnerabilities/*.md` by OWASP category and state, per category: what was attempted, what was proven, and what couldn't be assessed (A09 always, A02/A06/A08 partially). Verify each PoC yourself before it goes in front of the user.
|
||||
|
||||
A `0` exit code means nothing exploitable was proven **in what was analyzed** — check `run.json` status and cost against `--max-budget`; a budget-capped run is not a completed assessment.
|
||||
|
||||
## Then fix and re-test
|
||||
|
||||
Remediate with **fix-security-vulnerabilities-with-strix** and re-run to prove each exploit is closed. For ongoing coverage as the app changes, gate pull requests using **ci-security-scanning-with-strix**.
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
name: web-app-penetration-testing
|
||||
description: Pentest a web app or website end to end — black-box testing of a live URL, staging environment, or local dev server that finds and exploits real vulnerabilities (auth bypass, broken access control, IDOR, injection, XSS, SSRF, business logic) and proves each one with a working proof-of-concept instead of a signature match. Runs with Strix, either the self-hosted open-source CLI or the managed app.strix.ai cloud. Use when the user asks to pentest, hack, security-test, or audit their web app, website, web application, or staging site.
|
||||
license: Apache-2.0
|
||||
metadata:
|
||||
author: usestrix
|
||||
homepage: https://docs.strix.ai
|
||||
---
|
||||
|
||||
# Pentest a web application
|
||||
|
||||
Black-box (and optionally source-assisted) penetration testing of a running web app with Strix's autonomous agents. Every reported finding is validated with a working exploit, so there are no signature-based false positives to triage.
|
||||
|
||||
Install, LLM setup, all CLI flags, and the managed-cloud alternative are covered in the **penetration-testing-with-strix** skill — read it if the target isn't a running web app, or if `strix --version` fails. This skill is the web-app-specific workflow.
|
||||
|
||||
## 1. Confirm authorization and scope
|
||||
|
||||
Before running anything, establish:
|
||||
|
||||
- **The target is the user's** (or they're explicitly authorized to test it). Never pentest a third-party site on a hunch.
|
||||
- **Which environment.** Prefer staging over production; agents send real exploit payloads and will create/modify data.
|
||||
- **Out-of-scope paths** — payment flows, mass-email endpoints, admin destructive actions, third-party SSO providers.
|
||||
- **Credentials.** Most real vulnerabilities live behind login. Without a test account, the agents only ever see the marketing surface.
|
||||
|
||||
Ask for anything missing rather than guessing.
|
||||
|
||||
## 2. Run the scan
|
||||
|
||||
```bash
|
||||
strix -n -t https://staging.example.com --max-budget 20 \
|
||||
--instruction "Test account: qa@example.com / <password>. In scope: /app/*, /api/*. Do not touch /billing or send email. Focus on access control between the two seeded orgs."
|
||||
```
|
||||
|
||||
Notes that matter for web apps specifically:
|
||||
|
||||
- **Give it credentials via `--instruction`** (or `--instruction-file` for anything long), including how to log in if the flow is unusual (magic link, SSO, MFA-exempt test user).
|
||||
- **Two accounts beat one.** Multi-tenant IDOR and broken-access-control bugs — consistently the highest-impact class in web apps — can only be proven when the agent can attempt cross-account access.
|
||||
- **Add the repo for white-box depth** when you have the source: `-t https://github.com/org/app -t https://staging.example.com` (or a local path). Source access materially improves coverage of business-logic and authorization flaws.
|
||||
- **Localhost works.** Point at `http://host.docker.internal:3000` (Docker Desktop) so the sandbox can reach a dev server on the host.
|
||||
- `--scan-mode quick` for a fast dev-loop pass, `standard` (~30 min) for a normal review, `deep` for pre-release assurance. Always set `--max-budget`.
|
||||
|
||||
For a hosted run with no Docker/LLM key, or when the user wants a shareable dashboard and an auditor-ready PDF, use the cloud path in **managed-pentesting-with-strix** instead — same engine, same findings.
|
||||
|
||||
## 3. Review results
|
||||
|
||||
Read `strix_runs/<run>/penetration_test_report.md` first, then per-finding files in `vulnerabilities/`. Each contains the PoC — re-run it yourself to confirm before reporting to the user.
|
||||
|
||||
Exit codes: `0` no validated vulns in what was analyzed, `2` vulnerabilities found, `1` fatal error. A `0` is not proof of full coverage — if the budget or turn cap was hit the scan wraps up early, so check `run.json` status and cost against `--max-budget` before calling the app clean.
|
||||
|
||||
## 4. Fix and verify
|
||||
|
||||
Hand findings to the **fix-security-vulnerabilities-with-strix** skill: patch the root cause, then re-run Strix against the same target to prove the exploit no longer works. Re-testing is the only reliable confirmation a fix landed.
|
||||
|
||||
To keep the app tested on every change rather than once, wire Strix into CI with **ci-security-scanning-with-strix**.
|
||||
Reference in New Issue
Block a user