본문으로 건너뛰기
Skillpedia
보안8.0k · #12690

prove-patch

하는 일

같은 입력을 원본과 패치된 코드에 실행해 결과를 비교하며, 완성된 패치를 확인합니다. 수정이 작동하고 다른 동작을 깨뜨리지 않았다는 증거가 필요한 검토자를 위한 것입니다.

사용하는 경우

  • ✓검토자가 로컬 보안 패치가 버그를 고쳤다는 독립적인 증명이 필요할 때.
  • ✓팀이 패치가 기존 동작을 깨지 않았는지 확인하고 싶을 때.
  • ✓팀이 버그를 고쳤다고 보고하기 전에 증거가 필요한 경우.

스킬 링크

https://github.com/trailofbits/skills/blob/main/plugins/patching-bugs/skills/prove-patch/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/trailofbits/skills/blob/main/plugins/patching-bugs/skills/prove-patch/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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.

  1. 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 print PATCH_REACHED as 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 under receipts/. 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.
  2. 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.
  3. Run the three-arm helper with the proof-type recipe in the record contract, reproduce.baseline_commit, and final patch_commit. Require the baseline to fail, patch to pass, and complete baseline revert to fail again. Require receipts/source.json to 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.
  4. Write prove.json and a final manifest covering it and every receipt. Run uv run --no-project <script> manifest <prove-attempt-dir> and then uv 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.

Prove record schema:

{
  "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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬