Skip to content

removing ds store, adding gitignore - #8

Merged
dmitry-openai merged 2 commits into
mainfrom
repo/gitignore
Mar 11, 2025
Merged

removing ds store, adding gitignore#8
dmitry-openai merged 2 commits into
mainfrom
repo/gitignore

Conversation

@dmitry-openai

Copy link
Copy Markdown
Contributor

Removing DS_Store and adding gitignore

@rm-openai

Copy link
Copy Markdown
Collaborator

While you're here, can you remove the egg/pycache too? there are a bunch of pycache directories that slipped in

@dmitry-openai
dmitry-openai merged commit 2c6d1b6 into main Mar 11, 2025
rm-openai pushed a commit that referenced this pull request Mar 11, 2025
removing ds store, adding gitignore
@rm-openai
rm-openai deleted the repo/gitignore branch March 13, 2025 01:15
DIZ-admin pushed a commit to DIZ-admin/openai-agents-python that referenced this pull request Nov 18, 2025
Implemented immutable audit logging for PII detection:
- PIIAuditTrail class with SQLite storage
- PIIAuditRecord dataclass for audit entries
- Automatic logging of all PII scans and blocking decisions
- Retention policy enforcement (default: 90 days)
- Query interface for investigations and reporting

Features:
- Immutable audit records (never modified after creation)
- SHA-256 hashing of field values (never store actual PII)
- Comprehensive metadata (session_id, timestamp, confidence, risk_level)
- Detection method tracking (rule-based, ai-based, hybrid)
- Blocking decision audit trail
- Statistics and compliance reporting

Integration:
- Integrated into PIIDetector.scan_text()
- Integrated into PIIDetector.should_block_processing()
- Automatic logging on every PII scan
- Session ID tracking for correlation
- Image path tracking for context

Database schema:
- SQLite with indexed columns for fast queries
- Indexes on: session_id, timestamp, blocked, risk_level
- Automatic cleanup of old records
- Export capabilities for compliance reports

Benefits:
- Full compliance with GDPR audit requirements
- Transparent PII detection decisions
- Investigation capabilities for false positives/negatives
- Statistical analysis for model improvement
- Retention policy enforcement

Tests:
- 10 comprehensive unit tests for audit trail
- Test record creation, storage, retrieval
- Test filtering by session, date, blocked status
- Test cleanup and statistics
- All audit trail tests passing (10/10)

Note: Updated PIIDetector.should_block_processing() to async
to support audit trail logging. Updated all call sites.

Resolves: openai#8 (HIGH priority)
Impact: Enables compliance and transparency for PII validation
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.

2 participants