def is_file_potentially_dangerous(file_name: str) -> bool:
    """Check if a file path contains potentially dangerous patterns.

    Args:
        file_name: Path to check

    Returns:
        ``True`` if the path matches unsafe patterns, ``False`` otherwise
    """
    # Some example criteria. We could expand this.
    unsafe_patterns = ["/etc/", "/root/"]
    return any(re.search(pattern, file_name) for pattern in unsafe_patterns)
Check if a file path contains potentially dangerous patterns.

    Args:
        file_name: Path to check

    Returns:
        ``True`` if the path matches unsafe patterns, ``False`` otherwise
    
src/anomalib/data/utils/download.py