본문으로 건너뛰기
Skillpedia
보안5.8k · #14669

auditing-deidentification-runs

하는 일

이 스킬은 비식별화 실행마다 규제 준수 기록을 만듭니다. 무엇을 가렸고 왜 가렸는지 나열하지만, 원래 개인 데이터는 저장하지 않습니다. 규제 기관이나 내부 검토에 필요한 감사 증거가 필요한 팀을 위한 스킬입니다.

사용하는 경우

  • ✓비식별화 실행이 무엇을 바꿨는지 보여 주는 규제 준수 증거가 필요할 때.
  • ✓HIPAA 또는 GDPR 감사를 위해 변조를 드러내는 기록을 보관해야 할 때.
  • ✓검토자가 원래 개인 데이터를 보지 않고 비식별화 결정을 확인해야 할 때.

스킬 링크

https://github.com/maziyarpanahi/openmed/blob/master/skills/auditing-deidentification-runs/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“이 노트를 HIPAA 검토용 감사 기록과 함께 비식별화해 주세요. 변경 사항을 알 수 있도록 서명도 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 감사 모드로 비식별화를 실행하고, 사용자가 관리하는 키로 결과 보고서에 서명한 뒤, 나중에 무결성을 확인할 수 있도록 저장합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Auditing de-identification runs

deidentify(..., audit=True) returns an AuditReport instead of the rewritten text: a deterministic, PHI-free record of every redaction decision — offsets, label, detector confidence and threshold, the action taken, content hashes, model provenance, and projected residual risk. Sign it to make it tamper-evident, retain it as compliance evidence, and verify it later without ever touching the original text. Runs on-device.

When to use this skill

Use it whenever a de-identification needs to be defensible: regulatory retention, internal review, reproducibility checks, or proving to an auditor that identifiers were detected and handled — all without storing or exposing the PHI itself.

Quick start

import openmed

note = "Patient John Doe (MRN 1234567) seen 2024-03-02. SSN 123-45-6789."

# Returns an AuditReport, NOT a DeidentificationResult, when audit=True.
report = openmed.deidentify(note, policy="hipaa_safe_harbor", audit=True)

# Make it tamper-evident with a release HMAC key (keep the key in a vault).
report.sign(b"my-release-hmac-key", key_id="release-2026")

# Persist the no-PHI report (no plaintext identifiers inside).
import json
with open("deid_audit.json", "w") as fh:
    json.dump(report.to_dict(), fh, indent=2)

# Later: verify integrity. Optionally bind to the exact texts via their hashes.
ok = report.verify(b"my-release-hmac-key", original_text=note)
assert ok

What an AuditReport contains

AuditReport (from openmed.core.audit) carries no plaintext PHI. Key fields:

Field Meaning
policy policy profile name in effect
resolved_profile the concrete settings applied (method, model, thresholds, language, sweep flags)
detectors list[DetectorInfo] — provenance of each detector
safety_sweep structured-ID sweep metadata (patterns version, source)
spans list[AuditSpan] — one entry per detected identifier
thresholds per-label confidence thresholds used
residual_risk projected leakage / re-identification risk summary
openmed_version library version that produced the report
manifest_hash hash of the model manifest used
document_length character length of the input
input_hash sha256: hash of the original text
deidentified_text_hash sha256: hash of the de-identified output
repro_hash deterministic hash over the canonical payload
signature AuditSignature once .sign() is called (else None)

AuditSpan (per identifier, no plaintext): start, end, label, canonical_label, sources, confidence, threshold, action, surrogate, text_hash (hash of the span text), plus evidence and a redacted context.

DetectorInfo: source, model_id, model_format, commit, metadata.

AuditSignature: key_id, algorithm (HMAC-SHA256), value (hex digest).

Why audits store offsets + hashes + provenance, never plaintext

The whole point of de-identification is to not retain identifiers. An audit log full of raw names and MRNs would itself be a PHI breach. So OpenMed records:

  • offsets (start/end) — where an identifier was, not what it was;
  • hashes (input_hash, deidentified_text_hash, per-span text_hash) — prove what was processed without revealing it;
  • provenance (detectors, manifest_hash, openmed_version) — which model/version made each call, for reproducibility;
  • residual risk (residual_risk) — projected leakage so a reviewer can judge whether the output is safe to release.

This lets an auditor confirm coverage and integrity while the report stays shareable.

Workflow

  1. Run with audit=True and a policy= to get an AuditReport.
  2. Inspect residual_risk before releasing the output — non-zero projected leakage means review (cross-check with auditing-safe-harbor-checklist).
  3. Sign with report.sign(key, key_id=...) using a secret release HMAC key stored in a vault (never in the repo).
  4. Persist report.to_dict() (JSON). For a reviewer view without full context, use report.export_review_bundle().
  5. Verify on retrieval with report.verify(key). Pass original_text= / deidentified_text= to also confirm the texts match the recorded hashes.
  6. Retain per your retention schedule alongside the de-identified output (but keep any reversible mapping separate and encrypted).

Hand-off to /

자주 묻는 질문

기록에 환자 이름이 들어 있나요?

아니요. 보고서에는 평문 식별자가 없도록 설계되어 있어 안전하게 보관할 수 있습니다.

나중에 기록을 어떻게 확인하나요?

서명된 보고서는 나중에 무결성을 확인할 수 있으며, 원문 텍스트와 연결하는 선택 기능도 있습니다.

어디에서 실행되나요?

스킬은 사용하는 기기에서 실행되므로, 감사가 클라우드 서비스에 의존하지 않습니다.

상세 정보

작성자의 원본 설명

Produce a signed, reproducible, no-PHI audit trail for an OpenMed de-identification run via deidentify(audit=True). Use when the user needs compliance evidence, a tamper-evident record of what was redacted and why, to verify nothing was changed, to retain proof for HIPAA/GDPR audits, or to review de-id decisions without exposing plaintext PHI. Covers the AuditReport / AuditSignature / AuditSpan / DetectorInfo fields, why audits store offsets+hashes+provenance+residual-risk and never plaintext, signing with .sign(key), and verifying with .verify(key). Pairs with OpenMed deidentifying-clinical-t

repo: maziyarpanahi/openmed

인기도

GitHub 스타
5.8k
순위
#14669
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬