-
Notifications
You must be signed in to change notification settings - Fork 0
Security
Veloura processes files, URLs, metadata, and external decoder output. Treat those boundaries as untrusted even when the audio engine itself is small.
The repository's authoritative reporting instructions live in
SECURITY.md.
Do not place credentials or exploit details in a public issue.
- Store Discord tokens, cookies, proxy credentials, and PyPI credentials in environment or secret-management systems.
- Never place a token in a query, track title,
payload, exception message, or committed configuration. - Prefer PyPI Trusted Publishing over long-lived API tokens.
- Escape resolved titles before displaying them in chat or HTML.
- Redact signed media URLs from logs.
If a secret is committed, removing the line is not enough. Revoke and rotate it because it remains in Git history and may already have been copied.
The default scheme policy rejects local-file and FTP-style URLs. It does not prevent every server-side request forgery scenario. A public backend should also consider:
- Private and loopback IP ranges.
- DNS rebinding.
- Redirect destinations.
- Proxy and egress allowlists.
- Cloud metadata endpoints.
- Maximum response and execution time.
Use resolver timeouts, concurrency limits, rate limits, and queue limits together. No single control is sufficient.
Veloura builds FFmpeg commands as argument lists and does not use a shell for
audio commands. Continue that pattern in integrations. Never concatenate user
input into shell=True commands.
Timed yt-dlp work runs in a child process so it can be terminated. Process
isolation limits lifecycle problems; it is not a general sandbox for hostile
media parsers.
Keep FFmpeg, yt-dlp, Python, and the operating system patched.
render_lossless_transition() creates parent directories and can overwrite
output by default. For APIs that accept user-selected destinations:
- Resolve paths against an application-owned root.
- Reject traversal outside that root.
- Generate server-side filenames where possible.
- Set storage quotas.
- Use
overwrite=Falsewhen replacement is not intended.
The cache contains source identity and analysis metadata, not audio samples. Still treat it as application data:
- Use an application-owned directory.
- Set appropriate filesystem permissions.
- Bound entries and age.
- Avoid placing access tokens in source strings.
- Do not share a writable cache between mutually untrusted tenants without another isolation layer.
- Require voice-channel membership.
- Restrict control commands.
- Escape mentions and Markdown.
- Rate-limit
/play. - Keep queue and resolver limits.
- Do not echo raw exceptions or media URLs publicly.
- Grant the bot only the permissions it needs.
- Review dependency updates.
- Run the full test matrix.
- Run a dependency vulnerability audit before release.
- Build from a tagged commit.
- Match the tag exactly to
pyproject.toml. - Publish through the protected
pypienvironment and Trusted Publishing. - Never reuse a PyPI version or filename.
Include:
- Affected version.
- Operating system and Python version.
- Minimal reproduction.
- Impact.
- Whether public disclosure has occurred.
Do not include live tokens, private media, or user data in a report.
Veloura Audio · MIT licensed · Documentation for the 0.6.x API