Fix PII: replace /Users/username/ with ~ and <username> placeholder

Replace hardcoded user paths that triggered gitleaks PII detection:
- /Users/username/ → ~/
- /Users/user/ → ~/
- -Users-username- → -Users-<username>- (normalized paths)

Also fix the sed example to use <home> placeholder instead of
regex pattern that would match actual usernames.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
daymade
2026-04-05 13:36:50 +08:00
parent 22de8f043c
commit 2833aaec42
3 changed files with 5 additions and 5 deletions

View File

@@ -36,13 +36,13 @@ class SessionAnalyzer:
Find all session files for a specific project.
Args:
project_path: Project path (e.g., /Users/user/Workspace/js/myproject)
project_path: Project path (e.g., ~/Workspace/js/myproject)
Returns:
List of session file paths
"""
# Convert project path to Claude's directory naming
# Example: /Users/user/Workspace/js/myproject -> -Users-user-Workspace-js-myproject
# Example: ~/Workspace/js/myproject -> -Users-<username>-Workspace-js-myproject
normalized = project_path.replace("/", "-")
project_dir = self.projects_dir / normalized