PII Redaction Guardrail skill - #212
Conversation
Scan customer emails, tickets, notes, and case studies for personal data (emails, phone numbers, SSNs, credit cards, IPs) before they're published or sent externally. General-purpose, not clinical/HIPAA text.
There was a problem hiding this comment.
Pull request overview
Adds a new gallery submission skill to help agents detect and handle potential PII in customer-derived text before it’s published, shared externally, or sent to third-party services.
Changes:
- Adds
pii-redaction-guardrailskill instructions and guardrails (SKILL.md). - Adds a bundled Python scanner for deterministic PII pattern detection (
scripts/scan_pii.py). - Adds submission metadata and a human-facing README (
metadata.json,README.md).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| submissions/pii-redaction-guardrail/SKILL.md | Defines the agent procedure/guardrails for PII review and redaction decisions. |
| submissions/pii-redaction-guardrail/scripts/scan_pii.py | Implements a Python-based scanner for emails, SSN-shaped numbers, IPv4, credit cards (Luhn), and phone candidates. |
| submissions/pii-redaction-guardrail/README.md | Provides human-facing overview and usage guidance for the submission. |
| submissions/pii-redaction-guardrail/metadata.json | Registers the skill in the gallery with platforms/tags/author/version metadata. |
Matches the invocation shown in SKILL.md and README.md, per Copilot review feedback on the PR.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
submissions/pii-redaction-guardrail/scripts/scan_pii.py:58
redact()currently preserves the first/last 2 characters of the matched value, which can still leak identifying information (especially emails, SSNs, and IPs) into logs or chat output. For a PII guardrail tool, it’s safer to avoid emitting any part of the matched value by default.
def redact(value: str) -> str:
if len(value) <= 4:
return "*" * len(value)
return value[:2] + "*" * (len(value) - 4) + value[-2:]
Fixes the issues flagged in the automated review: see PR discussion for details.
|
Thanks for submitting this skill, Tim (@Timziito). One required fix spotted: The SKILL.md frontmatter description references another skill by name "use the phi-deidentifier skill instead." Since the skill will load at runtime with no visibility on other skills in this gallery, there is no guarantee phi-deidentifier will be present alongside it. Could you please review these references, so that the metadata focuses on describing the scope and boundaries without referencing another skill name? That keeps the trigger useful (when to fire / not to fire) with no external dependencies. |
Scan customer emails, tickets, notes, and case studies for personal data (emails, phone numbers, SSNs, credit cards, IPs) before they're published or sent externally. General-purpose, not clinical/HIPAA text.