Apex077/PII_Obfuscator

A mini project built for Flipkart ISCP 2.0, that identifies Personally Identifiable Information (PII) from .csv files and spreadsheets and obfuscates them.

★ 0Forks 0PythonGitHub ↗Compare

README

PII Detector & Redactor - Project Guardian 2.0

Overview

A Python-based solution to detect and redact Personally Identifiable Information (PII) from CSV data streams, designed to prevent fraud incidents like those experienced by Flixkart.

Files

  • detector_dharaneesh_panneerselvam.py - Main PII detection and redaction script
  • redacted_output_dharaneesh_panneerselvam.csv - Output file with detected and redacted PII
  • deployment_strategy.md - Detailed deployment architecture proposal
  • README.md - This documentation

Usage

python3 detector_dharaneesh_panneerselvam.py iscp_pii_dataset_-_Sheet1.csv

PII Detection Rules

Standalone PII (Always sensitive)

  • Phone Numbers: 10-digit numbers
  • Aadhar Cards: 12-digit numbers
  • Passport Numbers: Format like P1234567
  • UPI IDs: username@bank format (paytm, ybl, okaxis, etc.)

Combinatorial PII (Sensitive when 2+ present)

  • Names: Full names or first+last name combinations
  • Email Addresses: Valid email formats
  • Physical Addresses: Street + city + pin code
  • Device ID/IP Address: Only when combined with user context

Non-PII (Correctly excluded)

  • Single first/last names alone
  • Standalone email addresses
  • Individual city, state, or pin codes
  • Transaction/order IDs
  • Product descriptions

Redaction Strategy

  • Phone: 98XXXXXX10 (preserve first 2 and last 2 digits)
  • Aadhar: 12XXXXXXXX12 (preserve first 2 and last 2 digits)
  • Passport: PXXXXXX7 (preserve first and last character)
  • UPI: usXXX@paytm (preserve first 2 chars and domain)
  • Email: [email protected] (preserve first 2 chars and domain)
  • Names: JXXX DXXX (preserve first character of each part)
  • Address: Replace numbers with X's
  • IP: Replace all numbers with XXX

Contributors

Apex077

Issues