fix-security-vulnerabilities-with-strix
usestrix/strix
Fix security vulnerabilities from Strix pentests by triaging, patching root causes, and re-scanning to verify.
What is fix-security-vulnerabilities-with-strix?
This skill remediates validated security findings from Strix penetration tests (both open-source CLI and cloud scans). It guides you through triaging findings by severity, applying minimal fixes that address root causes rather than symptoms, and re-running Strix to confirm each vulnerability is closed.
- Triage findings by severity (critical → high → medium → low) from Strix CLI artifacts or cloud scans
- Reproduce vulnerabilities using provided proof-of-concept steps before fixing
- Apply framework-native defenses (parameterization, auto-escaping, middleware, centralized authz) instead of ad-hoc sanitization
- Fix root causes: injection → parameterization, IDOR/authz → object-level checks, SSRF → allowlist, XSS → encoding + CSP, secrets → rotation + removal
- Re-scan with Strix (scoped to changed files or via PoC instruction) to verify each fix closes the exploit
- Generate a summary report per finding with severity, root cause, fix location, and verification result
How to install fix-security-vulnerabilities-with-strix
npx skills add https://github.com/usestrix/strix --skill fix-security-vulnerabilities-with-strix- Strix CLI installed (open-source) or access to app.strix.ai cloud platform
- A completed Strix scan with findings (vulnerabilities.json, .md files, or cloud scan ID)
- Git repository with the vulnerable code and ability to commit/push fixes
- For cloud scans: valid Strix cloud credentials (see managed-pentesting-with-strix skill for login)
How to use fix-security-vulnerabilities-with-strix
- 1.Retrieve findings from Strix: read vulnerabilities/*.md and vulnerabilities.json (CLI) or run `strix cloud vulns list --scan-id <id> --json` (cloud)
- 2.Sort findings by severity (critical first) and read the PoC description and affected code locations for each
- 3.Reproduce the vulnerability locally using the provided PoC steps or script to confirm it exists
- 4.Identify and fix the root cause in your code using the framework's built-in defenses (e.g., parameterized queries, template auto-escaping, authz middleware)
- 5.Keep the fix minimal and consistent with your repo's existing patterns; use fix_before/fix_after snippets as a starting point
- 6.Re-run Strix scoped to the fixed area: either `strix --scope-mode diff --diff-base <branch>` (fast) or `strix --instruction "Verify <finding> is fixed"` (no diff base needed)
- 7.Confirm the re-scan shows exit code 0 and the finding no longer appears in vulnerabilities/
- 8.Run your project's test suite to ensure the fix does not break existing behavior
Use cases
- After a Strix CLI scan reports findings in strix_runs/, systematically fix and re-verify each vulnerability
- Remediate cloud scan findings from app.strix.ai by pulling them via CLI, patching, and confirming closure
- Address injection, XSS, SSRF, broken access control, IDOR, and other validated findings in a code review workflow
- Prove to stakeholders that security fixes actually work by re-running Strix and showing findings are gone
- Integrate Strix remediation into CI/CD: scan, fix, re-scan, and gate merges on a clean re-scan
- Backend and full-stack developers fixing security issues in their own code
- Security engineers or pentesting teams remediating findings for clients
- DevSecOps engineers automating vulnerability remediation in CI/CD pipelines
- Engineering leads ensuring fixes address root causes, not just symptoms
fix-security-vulnerabilities-with-strix FAQ
Use `strix cloud vulns list --scan-id <scan-id> --json` to pull findings as JSON, or `strix cloud scans get <scan-id> --json | jq '.vulnerabilities'` for full scan details. Each finding includes severity, CWE, endpoint, impact, PoC description, and code_diff suggestions.
Always fix the root cause. For example, parameterize every query instead of blocking one string; enforce authorization in the handler instead of hiding the endpoint. Strix findings are validated with working PoCs, so ad-hoc sanitization of one payload will not prevent similar attacks.
Re-run Strix scoped to the changed files (`strix --scope-mode diff --diff-base <branch>`) or use `strix --instruction "Verify <finding> is fixed"` with the original PoC. Confirm exit code 0 and the finding is gone from vulnerabilities/. Also manually re-test the PoC if it is a simple request.
Read the new vulnerabilities/ files to see what the re-scan found. The fix may not have addressed the root cause, or the re-scan may have incomplete coverage. Check run.json for status (completed vs. stopped) and budget usage. If stuck, use `strix --instruction` to focus on the specific PoC and give it enough budget to finish.
Yes, after verification: run `strix cloud vulns update <id> --status fixed` to mark the finding as resolved in app.strix.ai. This tracks remediation progress and prevents duplicate work.
Full instructions (SKILL.md)
Source of truth, from usestrix/strix.
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_locationswithfix_before/fix_aftersuggestions when available).
- Cloud (app.strix.ai) — pull findings with the CLI:
strix cloud vulns list --scan-id <scan-id> --json(orstrix cloud scans get <scan-id> --json | jq '.vulnerabilities', orstrix cloud vulns list --severity criticalorg-wide). Each finding carriesseverity, cwe, endpoint, method, impact, technical_analysis, poc_description, poc_script_codeand, for code findings,code_file/code_diff/code_before/code_after. After a fix is verified, mark it withstrix cloud vulns update <id> --status fixed. See the managed-pentesting-with-strix skill forstrix cloud loginand 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:
- Reproduce it with the PoC from the finding file when feasible.
- 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).
- Prefer the framework's built-in defense (ORM parameterization, template auto-escaping, CSRF middleware, centralized authz) over ad-hoc sanitization.
- Keep the diff minimal and apply the repo's existing patterns. Finding files often include
fix_before/fix_aftersnippets — 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:
# 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:
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.
Related skills
More from usestrix/strix and the wider catalog.

managed-pentesting-with-strix
Run managed pentests on Strix's infrastructure via CLI or REST API—no local Docker or LLM key needed.

owasp-top-10-testing
Test applications against OWASP Top 10:2025 and API Security Top 10 with autonomous exploitation agents.

penetration-testing-with-strix
Autonomous AI penetration testing that exploits and proves vulnerabilities with proof-of-concept exploits.

web-app-penetration-testing
Black-box penetration testing of web apps with autonomous agents that validate every finding with a working exploit.

valyu-best-practices
Complete Valyu API toolkit for real-time search, content extraction, and AI-powered research across web, academic, and financial sources.

drama-creator
创作竖屏短剧剧本,包括宏观建构、剧本创作、精准优化、创意发想。适用于从零开始创作短剧、优化现有剧本、设计故事大纲和悬念钩子