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

post-patch-validation

하는 일

원본과 패치된 코드에 반복 가능한 테스트를 실행해, 보고된 공격, 비슷한 변형, 회귀, 새로운 위험을 점검합니다. 수정을 받아들일지 결정하는 검토자와 팀을 위한 것입니다.

사용하는 경우

  • ✓보안 패치, 수정 커밋 또는 풀 리퀘스트가 검토 준비가 되었을 때.
  • ✓AI가 만든 패치를 사람이 검토하거나 병합하기 전에 검증해야 할 때.
  • ✓패치가 한 공격 경로는 고쳤지만 같은 원인의 다른 변형은 놓칠 수 있을 때.

스킬 링크

https://github.com/trailofbits/skills/blob/main/plugins/post-patch-validation/skills/post-patch-validation/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/trailofbits/skills/blob/main/plugins/post-patch-validation/skills/post-patch-validation/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에서 그대로 가져왔습니다.

Post-Patch Validation

Validate a security patch against the reported bug and the surrounding code it affects. Give the patch author reproducible failures to fix and identify what still needs testing. Apply the same checks to human and agent patches. The diff, author, upstream implementation, and original proof of concept alone cannot establish correctness.

When to Use

  • A security fix, remediation commit, patch file, or pull request already exists.
  • An AI-generated patch needs validation before human review or merge.
  • A fix may cover one exploit path while missing variants of the same root cause.
  • A security fix may alter legitimate behavior or introduce a new vulnerability.
  • A patch author needs concrete failures and coverage gaps before another revision.

When NOT to Use

  • No patch exists yet; use vulnerability discovery or fix implementation first.
  • The task is to review an audit finding against a report without executing patch evidence.
  • The task is only to convert a finding into a permanent project test.
  • The target is remote or production. This skill executes local code and tests only.
  • The user has not authorized execution of the repository's code or test suite.

Quick Start

  1. Pin the vulnerable base and patched input. Prefer immutable commits. For uncommitted work, create a binary patch file first; do not validate in the user's working tree.

  2. Scaffold a pinned plan:

    uv run {baseDir}/scripts/post_patch_validation.py scaffold \
      --repo . \
      --base-ref <vulnerable-ref> \
      --patched-ref <patched-ref> \
      --finding-id <stable-id> \
      --finding-summary "<root cause and impact>" \
      --evidence-level runtime \
      --output post-patch-validation/plan.json
    

    Use --patch-file <path> instead of --patched-ref for a patch artifact. Choose the highest honest evidence level: source for source/patch invariants only, build when target code is compiled or analyzed but the reported behavior is not executed, or runtime when the checks execute the reported behavior and its safety assertions.

  3. Inspect the finding, diff, callers, sibling paths, cleanup/error paths, and existing tests. Populate checks in the generated plan. Run print-schema for the structural schema:

    uv run {baseDir}/scripts/post_patch_validation.py print-schema
    
  4. Run validate-plan for the complete validation, including coverage, command restrictions, and pinned inputs, before executing code:

    uv run {baseDir}/scripts/post_patch_validation.py validate-plan \
      --plan post-patch-validation/plan.json
    
  5. Execute the evidence plan:

    uv run {baseDir}/scripts/post_patch_validation.py run \
      --plan post-patch-validation/plan.json \
      --output post-patch-validation/results
    
  6. Report result.json, report.md, the evidence level, and the complete assessment. Return each finding to the patch author with its check ID, assertion, and saved logs. Identify each validation gap separately, including gaps that coexist with supported findings. After the author revises the patch, pin the new inputs and save a fresh validation run. Preserve the prior evidence. Passing supplied checks still requires human review before acceptance.

Evidence Contract

The runner rejects incomplete plans. Supply at least one check of every kind:

Kind Required observation
control Benign harness succeeds on both base and patch
exploit Original safety assertion fails on base and succeeds on patch
variant A distinct root-cause variant fails on base and succeeds on patch
behavior Unaffected behavior succeeds with byte-identical selected output
regression Targeted non-security regression check succeeds on both revisions
security Adjacent/new-vulnerability check succeeds on base and patch
suite Existing project suite, sanitizer, or deterministic fuzz campaign succeeds on patch

Commands are argv arrays, never shell strings. Put complex setup in a checked-in or plan artifact script and invoke it with {plan_dir}. The runner fixes locale/timezone/hash-seed inputs, executes checks in lexical ID order, records raw stdout/stderr, and never edits the original worktree. Each check's timeout_seconds defaults to 300 and accepts integers from 1 through 3600. Exceeding the timeout leaves a validation gap. A timeout alone does not establish a regres

자주 묻는 질문

원격이나 운영 시스템에서도 되나요?

아니요. 로컬 코드와 테스트만 실행하며, 사용자가 승인했을 때만 실행합니다.

깨끗한 diff면 패치를 믿을 수 있나요?

아니요. 이 스킬은 diff, 작성자, 원래 증명만으로는 정확성을 확인할 수 없다고 설명합니다.

패치 작성자를 돕나요?

네. 다음 수정본을 위한 구체적인 실패와 검사 공백을 알려 줍니다.

상세 정보

작성자의 원본 설명

Validates security patches with reproducible baseline-versus-patched evidence, including original exploits, root-cause variants, behavior preservation, regressions, and newly introduced security failures. Use after a patch exists and before accepting, merging, or reporting it as fixed; also use when an AI-generated patch, remediation commit, pull request, or proposed upstream fix needs adversarial post-patch validation across any language.

repo: trailofbits/skills

인기도

GitHub 스타
8.0k
순위
#12693
라이선스
CC-BY-SA-4.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬