enforcing-nophi-logging
强化部署时的隐私边界,减少日志泄露风险
可能无法覆盖所有日志来源,需在多组件中配合部署。
在日志、追踪和错误报告中拦截并清洗PHI,防止隐私泄露。
在日志、追踪和错误上游拦截并清洗 PHI,防止病人信息意外写入日志或上报系统。适合担心日志、OpenTelemetry span 或错误追踪器泄露患者数据的部署场景,提供在记录发出前做脱敏的过滤器。这样可以保留结构化非敏感字段用于排错,同时确保受保护的健康信息不被外泄。
▸ 展开 SKILL.md 英文原文
Add a logging and telemetry guard that scrubs or blocks PHI from logs, traces, and error reports around an OpenMed deployment. Use when the user wants a Python logging.Filter that redacts protected health information before records are emitted, wants to keep PHI out of OpenTelemetry spans or error trackers, needs structured no-PHI log fields, or is worried that logs and stack traces are leaking patient data. Trigger on "scrub logs", "redact PHI from logs", "no-PHI logging", "logging filter", "telemetry redaction", "logs leaking patient data", or "OpenTelemetry redaction" in an OpenMed deployment.
帮我安装这个 skill:https://raw.githubusercontent.com/maziyarpanahi/openmed/master/skills/enforcing-nophi-logging/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/maziyarpanahi/openmed/master/skills/enforcing-nophi-logging/SKILL.md"# Enforcing No-PHI Logging Logs are a top breach vector: a clinical string lands in a log line, gets shipped to a centralized log store and an error tracker, and is now PHI sitting outside the de-id boundary. OpenMed's local-first stance says *no raw PHI in logs, caches, or error reports* — this skill enforces it with a redaction guard that runs **before** any record is emitted. ## When to use this skill - An OpenMed service logs request text, model output, or exception messages. - You ship logs/traces to a centralized store or error tracker (Sentry, ELK). - You need a `logging.Filter` (or OTel processor) that redacts PHI pre-emit. - You want structured, no-PHI log fields (offsets, hashes