llm-config-security

Crates.iollm-config-security
lib.rsllm-config-security
version0.5.0
created_at2025-11-21 21:38:12.482169+00
updated_at2025-11-21 21:38:12.482169+00
descriptionSecurity hardening and validation for LLM Config Manager with input validation, rate limiting, and threat protection
homepagehttps://github.com/globalbusinessadvisors/llm-config-manager
repositoryhttps://github.com/globalbusinessadvisors/llm-config-manager
max_upload_size
id1944302
size144,763
GBA (globalbusinessadvisors)

documentation

https://docs.rs/llm-config-manager

README

llm-config-security

Crates.io Documentation License

Security hardening and validation for LLM Config Manager with input validation, rate limiting, and threat protection.

Features

  • Input Validation: Comprehensive validation of user inputs
  • Rate Limiting: Token bucket algorithm for API protection
  • SQL Injection Prevention: Detection and blocking of SQL injection attempts
  • XSS Protection: HTML/JavaScript sanitization
  • CSRF Protection: Token-based CSRF prevention
  • Password Policies: Configurable password strength requirements
  • Secret Detection: Prevent accidental secret exposure

Usage

[dependencies]
llm-config-security = "0.5.0"
use llm_config_security::{Validator, RateLimiter};

// Input validation
let validator = Validator::new();
validator.validate_key("app.database.url")?;
validator.validate_value("SELECT * FROM users")?;

// Rate limiting
let limiter = RateLimiter::new(100, Duration::from_secs(60));
if limiter.check_rate_limit(&client_id).await? {
    // Allow request
}

Security Features

  • OWASP Top 10 protections
  • Constant-time comparisons
  • Secure random generation
  • Automatic secret redaction
  • Security headers enforcement

License

Licensed under the Apache License, Version 2.0.

Commit count: 0

cargo fmt