Skip to content

PII Redaction Guardrail skill - #212

Open
Tim (Timziito) wants to merge 4 commits into
microsoft:mainfrom
Timziito:add-pii-redaction-guardrail
Open

PII Redaction Guardrail skill#212
Tim (Timziito) wants to merge 4 commits into
microsoft:mainfrom
Timziito:add-pii-redaction-guardrail

Conversation

@Timziito

Copy link
Copy Markdown
Contributor

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.

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.
Copilot AI review requested due to automatic review settings July 27, 2026 14:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-guardrail skill 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.

Comment thread submissions/pii-redaction-guardrail/scripts/scan_pii.py Outdated
Comment thread submissions/pii-redaction-guardrail/SKILL.md Outdated
Tim (Timziito) and others added 2 commits July 27, 2026 16:39
Matches the invocation shown in SKILL.md and README.md, per Copilot review feedback on the PR.
Copilot AI review requested due to automatic review settings July 27, 2026 14:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:]

Comment thread submissions/pii-redaction-guardrail/SKILL.md
Comment thread submissions/pii-redaction-guardrail/scripts/scan_pii.py
Copilot AI review requested due to automatic review settings July 27, 2026 19:53
Fixes the issues flagged in the automated review: see PR discussion for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@adrianatruji

Copy link
Copy Markdown
Collaborator

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.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants