prove-patch
하는 일
같은 입력을 원본과 패치된 코드에 실행해 결과를 비교하며, 완성된 패치를 확인합니다. 수정이 작동하고 다른 동작을 깨뜨리지 않았다는 증거가 필요한 검토자를 위한 것입니다.
사용하는 경우
- ✓검토자가 로컬 보안 패치가 버그를 고쳤다는 독립적인 증명이 필요할 때.
- ✓팀이 패치가 기존 동작을 깨지 않았는지 확인하고 싶을 때.
- ✓팀이 버그를 고쳤다고 보고하기 전에 증거가 필요한 경우.
스킬 링크
https://github.com/trailofbits/skills/blob/main/plugins/patching-bugs/skills/prove-patch/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“같은 테스트를 이전 코드와 새 코드에 실행해서, 이 패치가 버그를 고쳤다는 것을 증명해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 계획된 입력을 깨끗한 원본 사본과 패치 사본에 실행한 다음, 원시 출력을 영수증으로 보관합니다. 실패하던 경우가 패치 후 통과하고 정상 대조군이 여전히 통과할 때만 버그가 고쳐진 것으로 봅니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Prove Patch
Use the original baseline, final patch commit, declared repair_scope, and unchanged
reproduction package. Read the record contract. Do not
edit the patch or validate an uncommitted tree. Return failures for a new attempt.
Before target commands, follow its project guidance.
- Review the scoped cases and the patch without the patcher's conclusion. Execute
each planned input on clean baseline and patched trees with the same retained
harness source and command. The harness must print exactly one
PATCH_CASE {"input": ..., "actual": ...}from the exercised input and observed result, then printPATCH_REACHEDas its final stdout line immediately before the assertion. Representatives must fail on the baseline and pass on the patch. Valid controls must pass on both. Keep the baseline and patched stdout, stderr, exit status, elapsed time, command, and harness source underreceipts/. A timeout, setup failure, missing marker, mismatched input, or ambiguous observation is an evidence gap. A trustworthy patched failure is a finding. Never relabel a gap as a pass. - Run relevant project checks on the patch and retain the same raw receipts. Use baseline comparison for behavior checks and to attribute failed project checks; a passing patched suite may omit a baseline run. Include focused tests, regression and security checks where relevant. Record specific unproven limits; an empty list leaves the result inconclusive.
- Run the three-arm helper with the proof-type recipe in
the record contract,
reproduce.baseline_commit, and finalpatch_commit. Require the baseline to fail, patch to pass, and complete baseline revert to fail again. Requirereceipts/source.jsonto identify the pinned commits and the reverted tree to equal the original baseline tree. Require the type's build identity result. Retain all source-tree, build, and execution receipts. - Write
prove.jsonand a final manifest covering it and every receipt. Runuv run --no-project <script> manifest <prove-attempt-dir>and thenuv run --no-project <script> check <run-dir>with the validator. Independently inspect the native proof assessment and raw receipts before reporting a result. A complete proof has no findings or gaps. Return exact failures and receipt paths to the orchestrator.
{
"schema_version": 2,
"attempt": 1,
"failure_type": "runtime",
"baseline_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"patch_commit": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"reverted": "pass",
"build_identity": "pass",
"hashes": {
"baseline": "1111111111111111111111111111111111111111111111111111111111111111",
"patched": "2222222222222222222222222222222222222222222222222222222222222222",
"reverted": "1111111111111111111111111111111111111111111111111111111111111111"
},
"reverted_hash_note": null,
"cases": [{
"check_id": "reported-input",
"argv": ["python", "receipts/case.py", "reported-input"],
"source": "receipts/case.py",
"runs": {
"baseline": {"exit_code": 1, "elapsed_ms": 15, "stdout": "receipts/case-base.stdout", "stderr": "receipts/case-base.stderr"},
"patched": {"exit_code": 0, "elapsed_ms": 14, "stdout": "receipts/case-patched.stdout", "stderr": "receipts/case-patched.stderr"}
}
}],
"project_checks": [{
"check_id": "focused-suite",
"kind": "suite",
"argv": ["pytest", "tests/test_upload.py"],
"baseline": null,
"patched": {"exit_code": 0, "elapsed_ms": 860, "stdout": "receipts/suite.stdout", "stderr": "receipts/suite.stderr"}
}],
"unproven": ["Inputs outside the declared boundary were not assessed."],
"agent": "prover-1"
}
For a bounded class, include at least two distinct failing representatives and a
valid control. The record must cover every planned case by unique check_id.
Use the same harness and command on both commits; do not reveal the side to the
harness or change expectations by side. Review the selected cases for relevance;
retained receipts establish only what those cases exercised.
자주 묻는 질문
패치를 바꿀 수 있나요?
아니요. 패치를 편집하거나 커밋되지 않은 작업을 검증하지 않습니다. 증명이 실패하면 새 시도를 위해 실패 결과를 돌려줍니다.
증거 공백이란 무엇인가요?
시간 초과, 설정 실패, 불분명한 결과를 말합니다. 이는 절대 통과로 보지 않습니다.
프로젝트 검사도 실행하나요?
네. 패치에 관련된 프로젝트 검사를 실행하고 결과를 기록합니다.
상세 정보
작성자의 원본 설명
Use when a local security patch commit needs independent scoped and three-arm proof.
repo: trailofbits/skills
인기도
- GitHub 스타
- 8.0k
- 순위
- #12690
- 라이선스
- CC-BY-SA-4.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
audit-context-building
8.0k에이전트가 보안 검토 전에 낯선 코드베이스를 익히고, 각 함수가 가정하고 보장하며 의존하는 것을 정리하도록 돕습니다.
algorand-vulnerability-scanner
8.0k에이전트가 TEAL이나 PyTeal 기반 Algorand 스마트 계약에서 키 재설정 공격, 수수료 미검증 등 보안 문제 11가지를 찾도록 돕습니다.
audit-prep-assistant
8.0k에이전트가 외부 보안 검토를 위해 코드베이스를 준비하도록 돕습니다. 정적 분석, 테스트 커버리지, 죽은 코드 정리, 명확한 문서화를 포함합니다.
cairo-vulnerability-scanner
8.0k에이전트가 StarkNet Cairo 스마트 계약에서 오버플로, 위험한 계층 간 메시지, 서명 재사용 등 6가지 문제를 검사하도록 돕습니다.