fix-security-vulnerabilities-with-strix
하는 일
이 스킬은 Strix 스캔에서 발견된 보안 문제를 받아 근본 원인에서 고칩니다. 취약점을 패치하고 패치가 작동하는지 확인해야 하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Strix 스캔이 고쳐야 할 보안 발견 사항을 보고했을 때.
- ✓알려진 취약점을 패치하거나 수정해 달라는 요청이 있을 때.
- ✓수정이 공격 테스트를 다시 실행해 확인되어야 할 때.
스킬 링크
https://github.com/usestrix/strix/blob/main/skills/fix-security-vulnerabilities-with-strix/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“지난 보안 스캔에서 심각한 문제 세 개가 나왔습니다. 코드에서 고친 뒤 공격이 더 이상 작동하지 않는지 확인해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 발견 사항을 심각도별로 정렬하고, 각각을 재현한 뒤 근본 원인을 패치합니다. 그다음 보안 테스트를 다시 실행해 각 공격이 차단되었는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
어떤 발견 사항을 먼저 고치나요?
스킬은 작업 순서를 치명적(critical)과 높음 심각도부터, 그다음 중간과 낮음 순으로 정합니다.
거짓 양성으로 무시할 수 있나요?
스킬은 발견 사항의 개념 증명을 직접 다시 테스트하기 전에는 무시하지 말라고 말합니다.
발견 사항 데이터는 어디에서 오나요?
로컬 스캔의 출력 폴더에서 오거나, 명령줄 도구를 통해 Strix 클라우드 플랫폼에서 가져옵니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 73k
- 순위
- #3099
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 30.
댓글
- …
이 저장소의 다른 스킬
api-security-testing
73k에이전트가 Strix로 REST, GraphQL, gRPC API의 보안을 테스트하는 방법을 보여 줍니다. OWASP API Top 10의 권한 결함 등 위험에 중점을 둡니다.
application-security-testing
73k에이전트가 제품 전체의 보안 테스트를 계획하도록 돕습니다. 각 부분에 맞는 테스트를 고르고 실행하며, 실제 위험에 따라 수정 사항의 순위를 매깁니다.
ci-security-scanning-with-strix
73k에이전트가 풀 리퀘스트마다 자동 보안 검사를 추가하는 방법을 보여 줍니다. 위험한 코드를 병합하기 전에 표시할 수 있습니다.
find-security-vulnerabilities-in-code
73k에이전트가 인젝션이나 깨진 접근 제어 같은 보안 결함을 코드에서 찾고, 테스트 공격으로 어떤 것이 실제인지 증명하도록 돕습니다.