Agenkit is currently in beta (v0.9.x). Security updates are provided for the following versions:
| Version | Supported | Status |
|---|---|---|
| 0.9.x | ✅ | Beta - Active development |
| < 0.9.0 | ❌ | Pre-release - Not supported |
Note: Once v1.0.0 is released, we will maintain security updates for:
- Latest stable version (v1.x.x)
- Previous major version for 6 months after new major release
We take security vulnerabilities seriously. If you discover a security issue, please report it responsibly.
DO NOT open a public GitHub issue for security vulnerabilities.
Instead, please report security issues via:
-
GitHub Security Advisories (Preferred):
- Go to https://github.com/scttfrdmn/agenkit/security/advisories
- Click "Report a vulnerability"
- Provide detailed information about the vulnerability
-
Email (Alternative):
- Send an email to: scttfrdmn@users.noreply.github.com
- Use subject line:
[SECURITY] Brief description - Include detailed reproduction steps
Please provide as much information as possible:
- Type of vulnerability (e.g., RCE, XSS, injection, DoS)
- Affected component(s) (e.g., HTTP transport, gRPC adapter, specific middleware)
- Affected version(s)
- Step-by-step reproduction instructions
- Proof of concept code (if applicable)
- Potential impact (what an attacker could achieve)
- Suggested remediation (if you have ideas)
- Your contact information (for follow-up questions)
We are committed to responding promptly:
- Initial Response: Within 48 hours of report
- Triage & Assessment: Within 5 business days
- Fix Development: Depends on severity (see below)
- Disclosure: Coordinated disclosure after fix is available
| Severity | Description | Fix Timeline | Example |
|---|---|---|---|
| Critical | Remote code execution, authentication bypass | 1-3 days | Arbitrary code execution via message deserialization |
| High | Privilege escalation, significant data exposure | 7-14 days | SQL injection, unauthorized data access |
| Medium | DoS, limited information disclosure | 30 days | Resource exhaustion, verbose error messages |
| Low | Minor information leaks, best practice violations | 90 days | Version disclosure, non-sensitive config exposure |
- Acknowledgment: We'll confirm receipt of your report
- Communication: We'll keep you updated on progress
- Credit: With your permission, we'll credit you in the security advisory
- Disclosure: We'll coordinate the public disclosure timing with you
When a security vulnerability is confirmed:
- Private Fix Development: We develop and test the fix in private
- Security Advisory: We draft a GitHub Security Advisory
- Release: We release a patched version
- Notification: We notify users via:
- GitHub Security Advisory
- GitHub Releases notes
- Repository README banner (for critical issues)
- Public Disclosure: After users have had time to update (typically 7-14 days for critical issues)
- Patch releases (e.g., 0.9.0 → 0.9.1): Security fixes, no breaking changes
- Emergency releases: Tagged with
-securitysuffix if needed before planned release
Always validate and sanitize inputs before processing:
from agenkit import Message
# ❌ BAD: Accepting untrusted input directly
message = Message(role="user", content=untrusted_input)
# ✅ GOOD: Validate and sanitize
if len(untrusted_input) > MAX_LENGTH:
raise ValueError("Input too long")
if contains_malicious_patterns(untrusted_input):
raise ValueError("Invalid input")
message = Message(role="user", content=sanitize(untrusted_input))Use TLS/SSL for all network communications:
# ✅ Use HTTPS for HTTP transport
from agenkit.adapter.transport import HTTPTransport
transport = HTTPTransport("https://api.example.com") # Not http://
# ✅ Use TLS for gRPC
from agenkit.adapter.transport import GRPCTransport
transport = GRPCTransport("api.example.com:443", secure=True)Implement proper authentication for agent endpoints:
# ✅ Add authentication middleware
from agenkit.middleware import create_middleware
@create_middleware
async def auth_middleware(agent, message, next_handler):
# Verify token/credentials
if not verify_auth(message.metadata.get("auth_token")):
raise PermissionError("Unauthorized")
return await next_handler(agent, message)Protect against DoS attacks:
# ✅ Use rate limiting middleware
from agenkit.middleware import RateLimitMiddleware
rate_limiter = RateLimitMiddleware(
max_requests=100,
window_seconds=60
)Avoid leaking sensitive information in errors:
# ❌ BAD: Exposing internal details
except Exception as e:
return Message(content=f"Error: {str(e)}")
# ✅ GOOD: Generic error messages
except Exception as e:
logger.error(f"Internal error: {e}") # Log internally
return Message(content="An error occurred. Please try again.")Keep dependencies updated:
# Check for known vulnerabilities
pip install safety
safety check
# Update dependencies regularly
pip install --upgrade agenkitNever hardcode secrets:
# ❌ BAD: Hardcoded API keys
api_key = "sk-1234567890abcdef"
# ✅ GOOD: Use environment variables
import os
api_key = os.environ["API_KEY"]
# ✅ BETTER: Use secrets management
from agenkit.secrets import get_secret
api_key = get_secret("api_key")Implement security logging:
# ✅ Log security events
from agenkit.observability import SecurityLogger
security_log = SecurityLogger()
security_log.log_auth_attempt(user_id, success=False)
security_log.log_rate_limit_exceeded(client_ip)- No Hardcoded Secrets: Never commit API keys, passwords, or tokens
- Input Validation: Validate all external inputs
- SQL Injection Prevention: Use parameterized queries
- Command Injection Prevention: Avoid
eval(),exec(), unsafe shell execution - Path Traversal Prevention: Validate file paths
- Dependency Auditing: Run
safety checkbefore commits - Security Tests: Add tests for security-sensitive code
# Run security linting
ruff check --select S # Bandit security rules
# Check for secrets
git diff --cached | grep -i "api_key\|password\|secret\|token"
# Run security tests
pytest tests/security/Security issues in:
- Core Framework: Agent base classes, message handling, lifecycle
- Transports: HTTP, WebSocket, gRPC, QUIC implementations
- Adapters: Local, Python, Go adapters
- Middleware: Authentication, rate limiting, timeout, retry, caching
- Observability: Tracing, metrics, logging (if they expose sensitive data)
- Dependencies: Known vulnerabilities in dependencies
The following are generally out of scope:
- User-Implemented Agents: Security of agents you build (unless framework causes the issue)
- Third-Party LLM APIs: Vulnerabilities in OpenAI, Anthropic, etc. APIs
- Infrastructure: Vulnerabilities in your hosting environment
- Social Engineering: Phishing, social attacks
- Physical Security: Physical access to systems
- Denial of Wallet: Excessive API costs (unless caused by framework bug)
However, if you're unsure whether something is in scope, please report it anyway. We'll assess and provide guidance.
# agenkit_config.py
SECURITY_SETTINGS = {
# Network
"use_tls": True,
"verify_ssl_certs": True,
"tls_min_version": "TLSv1.3",
# Rate Limiting
"rate_limit_enabled": True,
"rate_limit_requests": 1000,
"rate_limit_window": 60,
# Timeouts
"request_timeout": 30,
"connection_timeout": 10,
# Logging
"log_level": "INFO",
"log_sensitive_data": False,
# Validation
"max_message_size": 1_000_000, # 1MB
"validate_schemas": True,
}If running multiple tenants on shared infrastructure:
- Implement proper tenant isolation
- Use separate authentication per tenant
- Monitor for cross-tenant data leakage
- Consider resource limits per tenant
When using LLM agents:
- Prompt Injection: Validate and sanitize user inputs
- Model Jailbreaking: Implement content filtering
- Data Leakage: Don't include sensitive data in prompts
- Cost Attacks: Implement rate limiting and quotas
- HTTP: Always use HTTPS in production
- WebSocket: Use WSS (WebSocket Secure)
- gRPC: Enable TLS
- QUIC: Uses TLS 1.3 by default
Past security advisories will be listed here once v1.0.0 is released.
Currently: No security advisories (pre-1.0.0)
Planned security enhancements:
- Built-in authentication middleware
- Input sanitization utilities
- Security-focused examples
- Comprehensive security audit
- Penetration testing
- Security-hardened defaults
- Secrets management integration
- Security documentation expansion
- Bug bounty program
- Regular third-party security audits
- SOC 2 compliance documentation
- FIPS 140-2 validated cryptography
- OWASP Top 10: https://owasp.org/www-project-top-ten/
- CWE Top 25: https://cwe.mitre.org/top25/
- Python Security Best Practices: https://python.readthedocs.io/en/stable/library/security_warnings.html
If you have questions about this security policy, please:
- Open a GitHub Discussion: https://github.com/scttfrdmn/agenkit/discussions
- Email: scttfrdmn@users.noreply.github.com (for sensitive questions only)
We appreciate the security researchers and users who help keep Agenkit secure. Contributors who responsibly disclose vulnerabilities will be acknowledged here (with their permission).
Last Updated: 2025-01-16 Version: 0.9.0