Security is a core design goal of LLM Ledger: your LLM API keys and usage data should never leak. This document explains how to report a vulnerability and how the project handles security.
| Version | Supported |
|---|---|
| Latest release (main branch) | ✅ |
| Older releases | ❌ |
We backport critical fixes to the latest minor release only. Please upgrade to the newest version before reporting.
If you believe you have found a security issue, please do not open a public issue.
Report it privately by emailing:
📧 security@boriskwemo.dev (placeholder - replace with your real contact)
Please include:
- A short description of the issue.
- Steps to reproduce (a minimal code snippet or config helps a lot).
- The affected version(s) and PHP version.
- The potential impact (e.g. API key exposure, SQL injection, SSRF).
- Acknowledgment within 48 hours.
- A confirmed or declined assessment, usually within 7 days.
- A fix + advisory coordinated with you. We will credit you unless you ask to remain anonymous.
LLM Ledger never persists, logs, or stores your API keys in the tracking database - keys live in memory only. To keep it that way:
- Use environment variables, not literals - prefer
api_key: env(OPENAI_API_KEY)(YAML),%env(OPENAI_API_KEY)%(Symfony), orenv()(Laravel). - Never commit
.env- it is already gitignored. - Laravel:
php artisan config:cachebakesenv()values intobootstrap/cache/config.php. Exclude that cache from version control and rotate keys if it ever leaks. - Rotate keys if a key is ever exposed, and use per-project or least-privilege keys where your provider supports them.
- Scope the tracking database - it stores prompts and completions (when
tracking.store_contentis enabled), which may contain sensitive user data. Apply the same access controls you would to any application log.
- HTTP layer: only
Authorization,x-api-key, andx-goog-api-keyheaders carry secrets; responses are stored, never requests. - Storage: all queries use PDO prepared statements / Laravel's query builder (no string-interpolated SQL values).
- SSRF: provider
base_urlvalues are configurable by design (to support self-hosted endpoints). Only configure trusted URLs.
- Vulnerabilities in third-party dependencies should be reported to their maintainers (we track them via
composer audit). - Issues that require an attacker to already have filesystem/config access to your application.