org.llm4s.core.safety
Members list
Type members
Classlikes
Default mapping that preserves existing behavior.
Default mapping that preserves existing behavior.
Attributes
- Supertypes
- Self type
-
DefaultErrorMapper.type
Maps arbitrary Throwables into domain-specific LLMError values.
Maps arbitrary Throwables into domain-specific LLMError values.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object DefaultErrorMapper
Network security utilities for SSRF protection.
Network security utilities for SSRF protection.
Provides IP address validation to prevent Server-Side Request Forgery (SSRF) attacks by blocking requests to internal networks, cloud metadata endpoints, and other potentially sensitive destinations.
== Protected IP Ranges ==
- Private networks: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 (RFC 1918)
- Loopback: 127.0.0.0/8, ::1
- Link-local: 169.254.0.0/16, fe80::/10
- Cloud metadata: 169.254.169.254 (AWS, GCP, Azure)
- Multicast: 224.0.0.0/4, ff00::/8
- Documentation/test ranges: 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24
Attributes
- Example
-
import org.llm4s.core.safety.NetworkSecurity // Validate a URL before fetching NetworkSecurity.validateUrl("https://example.com/api") // Right(()) NetworkSecurity.validateUrl("http://169.254.169.254/") // Left(NetworkError) NetworkSecurity.validateUrl("http://192.168.1.1/admin") // Left(NetworkError) - Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NetworkSecurity.type
Pure helpers for safe, typed error handling. All helpers return Either-based results or cats ValidatedNec for aggregation.
Pure helpers for safe, typed error handling. All helpers return Either-based results or cats ValidatedNec for aggregation.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Safety.type
Resource management helpers for automatic cleanup This file legitimately needs try-finally for low-level resource management
Resource management helpers for automatic cleanup This file legitimately needs try-finally for low-level resource management
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
UsingOps.type
Deprecated classlikes
Delegate to org.llm4s.util.Redaction for all redaction functionality.
Delegate to org.llm4s.util.Redaction for all redaction functionality.
This object is preserved for backward compatibility. New code should use org.llm4s.util.Redaction directly.
Attributes
- Deprecated
-
[Since version 0.2.0]Use org.llm4s.util.Redaction instead - Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LogRedaction.type