fix-security-vulnerabilities-with-strix
Fungsinya
Skill ini mengambil masalah keamanan yang ditemukan pemindaian Strix dan memperbaikinya pada penyebab utamanya. Skill ini ditujukan untuk pengembang yang perlu menambal kerentanan dan memastikan tambalannya berfungsi.
Kapan dipakai
- βSaat pemindaian Strix telah melaporkan temuan keamanan yang perlu diperbaiki.
- βSaat seseorang meminta untuk menambal atau memperbaiki kerentanan yang sudah diketahui.
- βSaat sebuah perbaikan harus diperiksa dengan menjalankan ulang tes serangan.
Link skill
https://github.com/usestrix/strix/blob/main/skills/fix-security-vulnerabilities-with-strix/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βPemindaian keamanan terakhir kami menemukan tiga masalah kritis. Bisakah Anda memperbaikinya di kode lalu memeriksa bahwa serangannya tidak lagi berhasil?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mengurutkan temuan berdasarkan tingkat keparahan, mereproduksi setiap masalah, dan menambal penyebab yang mendasarinya. Lalu agent menjalankan ulang tes keamanan untuk memastikan setiap serangan diblokir.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
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: ```bas
Pertanyaan umum
Temuan mana yang diperbaiki lebih dulu?
Skill mengurutkan pekerjaan dari keparahan kritis ke tinggi, sedang, dan rendah.
Apakah temuan bisa diabaikan sebagai positif palsu?
Skill menyatakan jangan mengabaikan temuan tanpa menguji ulang bukti konsepnya sendiri.
Dari mana data temuan berasal?
Dari folder output pemindaian lokal, atau dari platform cloud Strix melalui alat baris perintahnya.
Detail
Deskripsi asli dari pembuat
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.
repo: usestrix/strix
Popularitas
- Bintang GitHub
- 73k
- Peringkat
- #3099
- Lisensi
- Apache-2.0
- Diperbarui
- 30/10/2026
Komentar
- β¦
Skill lain dari repositori ini
api-security-testing
73kMenunjukkan kepada agent Anda cara menguji keamanan API REST, GraphQL, atau gRPC dengan Strix, dengan fokus pada cacat otorisasi dan risiko lain dalam OWASP API Top 10.
application-security-testing
73kMembantu agent Anda merencanakan tes keamanan untuk seluruh produk, memilih tes yang tepat untuk setiap bagian, menjalankannya, dan mengurutkan perbaikan berdasarkan risiko nyata.
ci-security-scanning-with-strix
73kMenunjukkan kepada agent Anda cara menambahkan pemindaian keamanan otomatis ke pull request, sehingga kode berisiko dapat ditandai sebelum digabungkan.
find-security-vulnerabilities-in-code
73kMembantu agent Anda meninjau kode dari cacat keamanan seperti injeksi dan kontrol akses yang rusak, dan membuktikan mana yang nyata dengan serangan uji.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.