Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

fix-security-vulnerabilities-with-strix — Claude Code skill

This skill triages validated Strix findings, fixes their root causes, and runs Strix again to verify the result. Use it after a CLI or cloud scan.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add usestrix/strix --skill fix-security-vulnerabilities-with-strix -a claude-code
Open on GitHub

What fix-security-vulnerabilities-with-strix does

The skill reads findings from strix_runs//, vulnerabilities.json, Markdown finding files, and cloud scan output. It orders work by severity, helps reproduce the supplied PoC, and guides root-cause fixes. Injection is addressed with parameterization, IDOR with object-level authorization, SSRF with an allowlist and internal-range blocking, and XSS with context-aware encoding and CSP.

After a change, it runs Strix again against the affected diff or the original finding. For the OSS CLI, it checks the resolved diff base and run status. For cloud scans, it can start a new scan or retest one vulnerability. It also runs the project test suite and reports the severity, root cause, changed file, and verification result.

Install it when a project already has Strix findings and you want each remediation checked against the exploit. It is a poor fit for a manual review that has no Strix report to work from.

What it helps with

  • triage findings from vulnerabilities.json and findings.sarif
  • fix SQL injection, XSS, or SSRF at the root cause
  • add object-level authorization checks for IDOR
  • re-run Strix and confirm the original PoC no longer works

Example prompts for the agent

  • Review `strix_runs//` by severity and fix the critical and high findings.
  • Fix the SQL injection in `app/api/search.py`, then verify the original PoC with Strix.
  • Re-run the cloud scan and mark the verified vulnerability as fixed.

How to install fix-security-vulnerabilities-with-strix

1Skills CLI (Vercel)

npx skills add usestrix/strix --skill fix-security-vulnerabilities-with-strix -a claude-code

2Manually: put the files in place

~/.claude/skills/fix-security-vulnerabilities-with-strix/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/fix-security-vulnerabilities-with-strix/

From the same set3

The whole set →

Similar

gws-modelarmor-create-template official googleworkspace Creates Google Model Armor templates in GCP to filter user-generated content. Useful when configuring jailbreak defenses via the gws CLI. Claude Code CX Codex Cursor +1 29,800installs gws-modelarmor-sanitize-prompt official googleworkspace This skill sends a user prompt through a Google Model Armor template. Use it when an incoming prompt needs to pass through a configured Model Armor filter. Claude Code CX Codex Cursor +1 29,600installs gws-modelarmor-sanitize-response official googleworkspace This skill sends a model response to Google Model Armor for filtering with a template. Use it to check output before showing it to a user. Claude Code CX Codex Cursor +1 29,500installs improve shadcn Surveys any codebase in read-only mode and writes self-contained implementation plans for other models to execute. Helps audit bugs, tech debt, and security without touching code. Claude Code CX Codex Cursor +1 37,500installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs ponytail-audit DietrichGebert It audits a repository and ranks bugs, risks, and redundant code in a one-shot report. Use it when you need a review without code changes. Claude Code CX Codex Cursor +1 44,800installs security-audit cloudflare Reviews codebases and APIs for vulnerabilities using safe sandboxing. Fits pre-release security reviews, pen-test triage, and architecture checks. Claude Code CX Codex Cursor +1 52,200installs

Questions about fix-security-vulnerabilities-with-strix

How do I install fix-security-vulnerabilities-with-strix in Claude Code?

Run npx skills add usestrix/strix --skill fix-security-vulnerabilities-with-strix -a claude-code. The skill file is placed at ~/.claude/skills/fix-security-vulnerabilities-with-strix/SKILL.md.

What does fix-security-vulnerabilities-with-strix do?

It prioritizes validated Strix findings, guides root-cause remediation, and runs Strix again. The result is checked against the PoC and the project's tests.

What finding sources does the skill support?

It reads OSS CLI artifacts under strix_runs//, including vulnerabilities.json, plus cloud scans and their JSON output.

Source text

SKILL.md · Apache-2.0
---
name: fix-security-vulnerabilities-with-strix
description: Fix security vulnerabilities found by a Strix pentest (open-source CLI or app.strix.ai cloud) — triage by severity, patch the root cause rather than the symptom, and re-run Strix to prove each fix actually closes the exploit. Handles injection, XSS, SSRF, broken access control, IDOR, and other validated findings. Use after a Strix scan reports findings, or when the user asks to remediate, patch, or fix security issues from a strix_runs report, vulnerabilities.json, findings.sarif, or a cloud scan.
license: Apache-2.0
metadata:
  author: usestrix
  homepage: https://docs.strix.ai
---

# Fix Strix findings and verify

Turn validated Strix findings into minimal, correct fixes — and prove they work by re-scanning.

## 1. Triage

Get the findings from wherever the scan ran:

- **OSS CLI** — artifacts in `strix_runs/<run-name>/`:
  - `vulnerabilities/*.md` — one finding per file: description, severity, PoC steps or script, affected code locations, remediation guidance.
  - `vulnerabilities.json` — the same findings as JSON (ids, severity, CWE/CVE, `code_locations` with `fix_before`/`fix_after` suggestions when available).
- **Cloud (app.strix.ai)** — pull findings with the CLI: `strix cloud vulns list --scan-id <scan-id> --json` (or `strix cloud scans get <scan-id> --json | jq '.vulnerabilities'`, or `strix cloud vulns list --severity critical` org-wide). Each finding carries `severity, cwe, endpoint, method, impact, technical_analysis, poc_description, poc_script_code` and, for code findings, `code_file`/`code_diff`/`code_before`/`code_after`. After a fix is verified, mark it with `strix cloud vulns update <id> --status fixed`. See the **managed-pentesting-with-strix** skill for `strix cloud login` and scopes.

Order work by severity: critical → high → medium → low. Every Strix finding was validated with a working proof-of-concept, so do not dismiss findings as false positives without re-testing the PoC yourself.

## 2. Fix

For each finding:

1. Reproduce it with the PoC from the finding file when feasible.
2. Fix the root cause, not the specific payload (parameterize every query instead of blocking one string, and enforce authorization in the handler instead of hiding the endpoint).
3. Prefer the framework's built-in defense (ORM parameterization, template auto-escaping, CSRF middleware, centralized authz) over ad-hoc sanitization.
4. Keep the diff minimal and apply the repo's existing patterns. Finding files often include `fix_before`/`fix_after` snippets — use them as a starting point, not verbatim.

Common finding classes and expected fixes: injection → parameterization/escaping at the sink; IDOR/broken access control → object-level authorization checks; SSRF → allowlist + block internal ranges; XSS → context-aware output encoding + CSP; secrets exposure → rotate the secret AND remove it from code/history; auth issues → fix the server-side check (never client-side).

## 3. Verify by re-running Strix

After fixing, re-scan scoped to the fixed area and confirm the finding is gone. Verify in whichever environment you scanned (or both):

**OSS CLI:**
```bash
# Re-test just the changed files (fast). Resolve the repo's real default
# branch instead of assuming origin/main (many repos use master/develop).
# Avoid the current branch's own upstream as the base — its merge base with
# HEAD would be HEAD, giving an empty diff and a falsely clean result.
DIFF_BASE=$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null)
# origin/HEAD can be a dangling symbolic ref — keep it only if its target exists.
git rev-parse --verify --quiet "$DIFF_BASE" >/dev/null 2>&1 || DIFF_BASE=""
if [ -z "$DIFF_BASE" ]; then
  for b in origin/main origin/master origin/develop; do
    git rev-parse --verify --quiet "$b" >/dev/null && DIFF_BASE="$b" && break
  done
fi
# No silent fallback: a guess like HEAD~1 would cover only the last commit of a
# multi-commit fix branch. If no base resolves, ask the user for the base branch
# (or use the focused --instruction verification below, which needs no diff base).
[ -n "$DIFF_BASE" ] || { echo "Set DIFF_BASE to the branch your fix will merge into." >&2; exit 1; }
strix -n -t ./ --scan-mode quick --scope-mode diff --diff-base "$DIFF_BASE" --max-budget 5

# Or re-test with the original finding as focus (no diff base needed)
strix -n -t ./ --instruction "Verify the SQL injection in app/api/search.py is fixed. Original PoC: <poc>" --max-budget 5
```
Exit codes: `2` = findings remain (read the new `strix_runs/<run>/vulnerabilities/` and iterate); `0` = clean **for what was analyzed**. Before trusting a `0`, confirm the run wasn't cut short — check `run.json` for a completed status and compare its `llm_usage.cost` with `--max-budget`: a hard budget stop leaves `status: "stopped"`, but a run that wrapped up on a budget warning records `"completed"` with partial coverage. Give verification enough budget to finish, and prefer re-running the specific PoC as the ground-truth signal.

**Cloud:** rerun with the same config and re-poll, then confirm the finding no longer appears:
```bash
new_id=$(curl -sS "$BASE/scans/$scan_id/rerun" "${auth[@]}" -X POST | jq -r .scan_id)
# poll GET /scans/$new_id until completed, then check its vulnerabilities[]
```
Or, if the cloud scan came from a repo/PR, trigger a fresh PR review on the fix branch (`POST /pr-reviews/start`). The platform also retests a single finding directly: `POST /api/v1/vulnerabilities/{vulnerabilityId}/retest`.

- Also re-run the PoC manually when it is a simple request/script — fastest signal.
- Run the project's own test suite to make sure the fix does not break behavior.

## 4. Report

Summarize per finding: severity, root cause, fix applied (file:line), verification result (re-scan clean / PoC no longer reproduces). Never include live secrets in the report; if a secret leaked, state that rotation is required.

© usestrix · Apache-2.0 · usestrix/strix

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor