Skip to content

Security: hivellm/classify

Security

SECURITY.md

Security Policy

Supported Versions

We provide security updates for the following versions across the HiveLLM ecosystem:

ProjectVersionSupported
Synap1.x.x
Vectorizer1.x.x
UMICP1.x.x
Nexus0.x.x
Gateway0.x.x
Governance0.x.x
Task Queue0.x.x
Agent Framework0.x.x
All other components< 0.1

Note: Pre-1.0 versions receive security updates for the latest minor version only.

Reporting a Vulnerability

Please do not report security vulnerabilities through public GitHub issues.

How to Report

If you discover a security vulnerability in any HiveLLM project, please report it by emailing:

team@hivellm.org

Include the following information:

  1. Affected Project: Which HiveLLM component is affected
  2. Description: A clear description of the vulnerability
  3. Impact: What an attacker could accomplish
  4. Reproduction: Step-by-step instructions to reproduce the issue
  5. Affected Versions: Which versions are vulnerable
  6. Environment: Operating system, Rust version, configuration (if relevant)
  7. Suggested Fix: If you have a fix or mitigation (optional)
  8. Disclosure Preference: How you'd like to be credited (optional)

What to Expect

  • Acknowledgment: Within 48 hours
  • Initial Assessment: Within 5 business days
  • Status Updates: Weekly until resolution
  • Fix Timeline: Depends on severity (see below)
  • Coordinated Disclosure: After fix is released

Response Timeline

SeverityResponse TimeFix TimelinePublic Disclosure
Critical24 hours7 daysAfter patch release
High48 hours14 daysAfter patch release
Medium5 days30 daysAfter patch release
Low10 days90 daysAfter patch release

Severity Classification

Critical:

  • Remote code execution (RCE)
  • Authentication bypass
  • Data breach or exposure
  • Privilege escalation to admin/root

High:

  • SQL injection
  • Cross-site scripting (XSS) with data access
  • Denial of Service (DoS) affecting availability
  • Cryptographic weaknesses

Medium:

  • Information disclosure
  • Cross-site request forgery (CSRF)
  • Missing security headers
  • Insecure defaults

Low:

  • Minor information leakage
  • Best practice violations
  • Low-impact DoS

Security Considerations by Component

Synap (Distributed Key-Value Store)

Security Features

  • Authentication: JWT-based authentication with configurable expiry
  • Encryption: TLS 1.2+ for all network communication
  • Replication: Secure replication with encrypted channels
  • Access Control: Role-based access control (RBAC)
  • Rate Limiting: Configurable rate limits per client

Configuration

# config.yml - Secure production configurationserver:
host: "0.0.0.0"port: 8080tls:
enabled: truecert_path: "/etc/synap/certs/cert.pem"key_path: "/etc/synap/certs/key.pem"min_version: "1.2"auth:
enabled: truejwt_secret: "${JWT_SECRET}"# Use environment variabletoken_expiry: 3600# 1 hourrefresh_enabled: truesecurity:
rate_limit:
enabled: truerequests_per_minute: 120burst: 20max_connections: 10000max_request_size: "10MB"replication:
enabled: truetls_verify: trueauth_required: true

Vectorizer (Semantic Search Engine)

Security Features

  • API Authentication: API key-based authentication
  • Input Validation: Strict validation of queries and parameters
  • Resource Limits: Query size, result count, timeout limits
  • Isolation: Query execution isolation to prevent abuse

Configuration

# config.yml - Secure configurationserver:
bind: "127.0.0.1:8080"# Bind to localhost, use reverse proxyauth:
api_key_header: "X-API-Key"require_auth: truelimits:
max_query_length: 1000max_results: 100query_timeout_ms: 30000max_concurrent_queries: 100security:
content_security_policy: truecors:
enabled: trueallowed_origins: ["https://yourdomain.com"]

UMICP (Universal Model Interoperability Protocol)

Security Features

  • mTLS: Mutual TLS authentication between clients and servers
  • Message Signing: Cryptographic signatures for message integrity
  • Encryption: End-to-end encryption for sensitive payloads
  • Authorization: Fine-grained permission system

Configuration

# config.yml - Secure UMICP configurationserver:
tls:
enabled: truemutual_tls: truecert_path: "/etc/umicp/certs/server.crt"key_path: "/etc/umicp/certs/server.key"ca_path: "/etc/umicp/certs/ca.crt"security:
message_signing: truerequire_encryption: truemax_message_size: "50MB"

Gateway (API Gateway)

Security Features

  • Request Validation: Schema validation for all requests
  • Authentication: Multiple auth methods (JWT, API Key, OAuth2)
  • Rate Limiting: Per-client and global rate limits
  • WAF: Basic web application firewall features

Configuration

// gateway.config.tsexportdefault{auth: {methods: ['jwt','apikey'],jwtSecret: process.env.JWT_SECRET,tokenExpiry: '1h',},security: {rateLimiting: {enabled: true,windowMs: 60000,// 1 minutemaxRequests: 100,},helmet: true,// Enable Helmet.js security headerscors: {origin: ['https://yourdomain.com'],credentials: true,},},};

Governance System

Security Features

  • Role-Based Access: Hierarchical role and permission system
  • Audit Logging: Complete audit trail of all actions
  • Proposal Security: Cryptographic verification of proposals
  • Vote Integrity: Tamper-proof voting system

General Security Best Practices

For Users and Operators

  1. Keep Updated: Always use the latest stable version
  2. Strong Credentials: Use strong, unique passwords and API keys
  3. TLS Everywhere: Enable TLS for all production deployments
  4. Network Security: Restrict network access with firewalls
  5. Monitoring: Monitor logs for suspicious activity
  6. Regular Backups: Maintain encrypted backups
  7. Least Privilege: Grant minimal necessary permissions
  8. Security Audits: Regular security reviews and penetration testing

For Contributors and Developers

  1. Code Review: All code changes require security-focused review
  2. Dependency Audit: Run cargo audit before every commit
  3. No Secrets: Never commit secrets, credentials, or private keys
  4. Safe Coding: Follow Rust security best practices
  5. Input Validation: Always validate and sanitize input
  6. Error Handling: Handle errors securely without leaking information
  7. Testing: Include security tests for new features
  8. Documentation: Document security implications of changes

Dependency Security

Rust Projects

# Check for security advisories
cargo audit
# Update dependencies
cargo update
# Check for outdated dependencies
cargo outdated
# Verify dependency checksums
cargo verify-project

TypeScript/Node.js Projects

# Check for vulnerabilities
npm audit
pnpm audit
# Update dependencies
npm update
pnpm update
# Check for outdated packages
npm outdated
pnpm outdated

Continuous Monitoring

All projects use automated dependency scanning:

  • Dependabot: Automated dependency updates
  • GitHub Security Advisories: Vulnerability alerts
  • cargo-audit: Daily Rust dependency scans
  • npm audit: Daily Node.js dependency scans

Network Security

Production Deployment Checklist

  • ✅ Use TLS 1.2+ for all external connections
  • ✅ Enable mutual TLS (mTLS) for service-to-service communication
  • ✅ Use reverse proxy (nginx, Caddy, Traefik) with security headers
  • ✅ Implement rate limiting at multiple layers
  • ✅ Use DDoS protection (Cloudflare, AWS Shield, etc.)
  • ✅ Restrict access by IP whitelist when possible
  • ✅ Use private networks for internal services
  • ✅ Enable logging and monitoring
  • ✅ Use secrets management (HashiCorp Vault, AWS Secrets Manager)
  • ✅ Implement proper CORS policies

Example nginx Configuration

# /etc/nginx/sites-available/hivellmupstream synap_backend {server127.0.0.1:8080;keepalive32;}server{listen443ssl http2;server_name api.hivellm.org; # SSL Configurationssl_certificate /etc/letsencrypt/live/api.hivellm.org/fullchain.pem;ssl_certificate_key /etc/letsencrypt/live/api.hivellm.org/privkey.pem;ssl_protocols TLSv1.2 TLSv1.3;ssl_ciphers HIGH:!aNULL:!MD5:!3DES;ssl_prefer_server_ciphers on; # Security Headersadd_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;add_header X-Content-Type-Options "nosniff" always;add_header X-Frame-Options "DENY" always;add_header X-XSS-Protection "1; mode=block" always;add_header Referrer-Policy "strict-origin-when-cross-origin" always; # Rate Limitinglimit_req_zone$binary_remote_addrzone=api_limit:10m rate=10r/s;limit_reqzone=api_limit burst=20 nodelay;limit_req_status429; # Request Size Limitsclient_max_body_size10M;client_body_buffer_size10M; # Proxy Configurationlocation / {proxy_passhttp://synap_backend;proxy_http_version 1.1;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;proxy_set_header Connection ""; # Timeoutsproxy_connect_timeout60s;proxy_send_timeout60s;proxy_read_timeout60s;}}# Redirect HTTP to HTTPSserver{listen80;server_name api.hivellm.org;return301 https://$server_name$request_uri;}

Docker Security

Secure Dockerfile Practices

# Use specific version tagsFROM rust:1.85-slim as builder
# Run as non-root userRUN useradd -m -u 1000 appuser
# Build stageWORKDIR /app
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release
# Runtime stageFROM debian:bookworm-slim
# Install security updatesRUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Create non-root userRUN useradd -m -u 1000 appuser
# Copy binaryCOPY --from=builder /app/target/release/synap /usr/local/bin/
RUN chown appuser:appuser /usr/local/bin/synap
# Switch to non-root userUSER appuser
# Expose portEXPOSE 8080
# Health checkHEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
# Run applicationENTRYPOINT ["synap"]

Docker Compose Security

# docker-compose.ymlversion: '3.8'services:
synap:
image: hivellm/synap:1.0.0restart: unless-stopped# Security optionsread_only: truesecurity_opt:
- no-new-privileges:truecap_drop:
- ALLcap_add:
- NET_BIND_SERVICE# Resource limitsdeploy:
resources:
limits:
cpus: '2'memory: 2G# Secretssecrets:
- jwt_secret
- tls_cert
- tls_key# Environment from fileenv_file:
- .env.production# Networknetworks:
- internal# Volumesvolumes:
- synap_data:/data:rw
- /tmp:/tmp:rwnetworks:
internal:
driver: bridgeinternal: truevolumes:
synap_data:
driver: localsecrets:
jwt_secret:
file: ./secrets/jwt_secret.txttls_cert:
file: ./secrets/tls_cert.pemtls_key:
file: ./secrets/tls_key.pem

Secrets Management

Best Practices

  • ✅ Use environment variables for secrets
  • ✅ Use secrets management systems (Vault, AWS Secrets Manager)
  • ✅ Rotate secrets regularly (at least quarterly)
  • ✅ Never commit secrets to version control
  • ✅ Use .gitignore to prevent accidental commits
  • ✅ Encrypt secrets at rest
  • ✅ Use principle of least privilege for secret access

Environment Variables

# .env.production (never commit this file)
JWT_SECRET=your-strong-random-secret-here
DATABASE_URL=postgresql://user:pass@localhost/db
API_KEY=your-api-key-here
TLS_CERT_PATH=/etc/hivellm/certs/cert.pem
TLS_KEY_PATH=/etc/hivellm/certs/key.pem

.gitignore

# Secrets.env.env.*!.env.example*.key*.pem*.crtsecrets/
config/*.secret.*# Credentialscredentials.jsonauth.json

Logging and Monitoring

Security Logging

Log the following security-relevant events:

  • ✅ Authentication attempts (success/failure)
  • ✅ Authorization failures
  • ✅ API rate limit violations
  • ✅ Configuration changes
  • ✅ Unusual access patterns
  • ✅ Error conditions
  • ✅ Administrative actions
  • ✅ Data access and modifications

Log Security

  • ✅ Implement log rotation
  • ✅ Define retention policies (minimum 90 days)
  • ✅ Restrict log access
  • ✅ Encrypt sensitive logs
  • ✅ Never log passwords, tokens, or keys
  • ✅ Sanitize user input in logs

Example Log Configuration

# logging.ymllogging:
level: infoformat: jsonsecurity:
enabled: truelog_auth_attempts: truelog_failures: truelog_admin_actions: truerotation:
max_size: "100MB"max_age: 90max_backups: 10compress: trueoutputs:
- type: filepath: "/var/log/hivellm/security.log"
- type: syslognetwork: tcpaddress: "syslog.example.com:514"

Incident Response

Response Plan

  1. Detection: Identify security incident
  2. Containment: Isolate affected systems
  3. Eradication: Remove threat and vulnerabilities
  4. Recovery: Restore normal operations
  5. Post-Incident: Review and improve

Contact Information

  • Security Team: team@hivellm.org
  • Emergency: For critical incidents, email with subject "SECURITY EMERGENCY"

Vulnerability Disclosure Policy

We follow Coordinated Vulnerability Disclosure:

  1. Private Report: Report to team@hivellm.org
  2. Acknowledgment: We acknowledge receipt within 48 hours
  3. Assessment: We assess and confirm the vulnerability within 5 days
  4. Fix Development: We develop and test a fix
  5. Security Release: We release a security update
  6. Public Disclosure: We publish a security advisory
  7. Recognition: We credit the reporter (if desired)

Responsible Disclosure

We request that security researchers:

  • ✅ Report vulnerabilities privately before public disclosure
  • ✅ Allow reasonable time for fixing (90 days standard)
  • ✅ Avoid exploiting vulnerabilities beyond proof-of-concept
  • ✅ Do not access, modify, or delete user data
  • ✅ Do not perform DoS attacks

Security Hall of Fame

We recognize security researchers who responsibly disclose vulnerabilities:

  • No security disclosures yet

Security Certifications and Compliance

Planned Certifications

  • SOC 2 Type II (planned for 2025)
  • ISO 27001 (planned for 2026)

Compliance

  • GDPR-ready data handling
  • CCPA compliance for California users
  • Open source license compliance

Security Resources

Internal Documentation

  • /docs/ecosystem/SECURITY_ARCHITECTURE.md - Security architecture
  • Component-specific security docs in each project's /docs directory

External Resources

Security Updates

Security updates are released as patch versions following semantic versioning:

  • Critical: Immediate release with security advisory
  • High: Released within 7 days
  • Medium: Included in next minor release
  • Low: Included in next major release

Notification Channels

  • GitHub Security Advisories
  • Mailing list: security-announce@hivellm.org (subscribe via website)
  • Release notes in CHANGELOG.md
  • Twitter: @hivellm (security announcements tagged #security)

Last Updated: October 2024
Version: 1.0.0

For security questions or to report vulnerabilities: team@hivellm.org

There aren't any published security advisories