📦 deps(thirdparty): update snapshots
This commit is contained in:
+15
-1
@@ -8,6 +8,20 @@ import re
|
||||
from typing import Dict, List, Tuple, Set
|
||||
from collections import Counter, defaultdict
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def safe_user_path(path_value, base_dir="."):
|
||||
"""Resolve a CLI path under the current workspace."""
|
||||
if base_dir != ".":
|
||||
raise ValueError("Custom base directories are not supported for CLI paths")
|
||||
base_path = Path.cwd().resolve()
|
||||
resolved_path = Path(path_value).expanduser().resolve()
|
||||
try:
|
||||
resolved_path.relative_to(base_path)
|
||||
except ValueError as exc:
|
||||
raise ValueError(f"Path escapes allowed directory: {path_value}") from exc
|
||||
return resolved_path
|
||||
|
||||
class InterviewAnalyzer:
|
||||
"""Analyze customer interviews for insights and patterns"""
|
||||
@@ -424,7 +438,7 @@ def main():
|
||||
sys.exit(1)
|
||||
|
||||
# Read interview transcript
|
||||
with open(sys.argv[1], 'r') as f:
|
||||
with safe_user_path(sys.argv[1]).open('r') as f:
|
||||
interview_text = f.read()
|
||||
|
||||
# Analyze
|
||||
|
||||
Reference in New Issue
Block a user