enforcing-nophi-logging

Add fail-closed PHI redaction filters to OpenMed logging and telemetry sinks.

5.0k|615|Updated Oct 4, 2025
One-click install
npx skills add https://github.com/maziyarpanahi/openmed --skill enforcing-nophi-logging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: enforcing-nophi-logging
Source: https://github.com/maziyarpanahi/openmed/tree/main/skills/enforcing-nophi-logging
Command: npx skills add https://github.com/maziyarpanahi/openmed --skill enforcing-nophi-logging

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents protected health information from leaking into application logs, traces, exception reports, and centralized observability systems during OpenMed deployments.

Core Features & Use Cases

  • PHI Redaction Filter: Adds a fail-closed Python logging filter that scrubs structured identifiers and free-text PHI before records are emitted.
  • Telemetry Protection: Provides guidance for sanitizing OpenTelemetry spans, events, error trackers, crash reports, and exception messages.
  • Structured No-PHI Logging: Replaces clinical text with safe metadata such as document identifiers, entity counts, labels, offsets, and lengths.
  • Use Case: Protect a clinical NLP service by redacting patient names, phone numbers, emails, and identifiers from every log handler while retaining useful debugging metadata.

Quick Start

Use the enforcing-nophi-logging skill to add a fail-closed PHI-redacting filter to every logging and telemetry sink in an OpenMed deployment.

Frequently Asked Questions about enforcing-nophi-logging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent PHI from leaking into application logs and OpenTelemetry traces?

To prevent PHI leaking into logs and OpenTelemetry traces, apply a pre-emit redaction filter that scrubs structured identifiers and free-text PHI before records are sent to handlers. This fail-closed approach ensures sensitive health data never reaches centralized observability stores.

What is fail-closed PHI redaction for logging and telemetry systems?

Fail-closed PHI redaction is a logging filter mechanism that blocks record emission entirely if sanitization fails, replacing clinical text with safe metadata like document identifiers and entity counts to ensure no protected health information leaks into telemetry payloads.

How do I redact patient names and phone numbers from Python logging handlers in clinical NLP services?

Redact patient names and phone numbers from Python logging handlers by adding a structured no-PHI filter that replaces clinical text with safe metadata. The filter uses fast identifier patterns to scrub sensitive data before logs are emitted to any handler.

Does enforcing no-PHI logging work with Sentry and crash-reporting systems for OpenMed deployments?

Yes, no-PHI logging works with Sentry and crash-reporting systems by sanitizing exception messages and error-tracking payloads before emission. It provides specific guidance for scrubbing OpenTelemetry spans, events, and crash reports across OpenMed deployments processing clinical text.

What are the limitations of using identifier patterns for PHI redaction in telemetry security?

Identifier pattern-based PHI redaction requires pairing with OpenMed PHI extraction testing to catch free-text health data that simple patterns miss. Limitations include balancing fast identifier matching against comprehensive clinical text scrubbing across all telemetry sinks.

Do I need OpenMed PHI extraction to test no-PHI logging filters?

Yes, testing no-PHI logging filters requires OpenMed PHI extraction alongside fast identifier patterns to validate that structured identifiers, free-text PHI, and clinical text are fully scrubbed before logs reach observability systems and centralized stores.