Security and user privacy are foundational engineering requirements in VELORA. Every subsystem is designed under a Privacy-by-Default and Capability-Sandboxed threat model.
| Version | Supported | Security Updates |
|---|---|---|
2.5.x (VELORA) |
✅ Yes | Active security, stream validation & DSP patches |
2.0.x – 2.4.x |
✅ Yes | Security & stability backports |
1.0.x (Legacy) |
Upgrade to 2.5.3+ recommended |
- Strict Media Path Allowlist (
PhiDesignMetrics.isSafeMediaFolder): Local scanning and user-selected folder paths are canonicalized (File.canonicalPath) and verified against an explicit prefix allowlist (/storage/emulated/,/sdcard/,/storage/self/primary/,content://), rejecting..,., null bytes, and all system/app-private directories (/proc,/sys,/data,/etc,/apex,/system,/vendor,/dev). - Zero Broad Storage Permissions: Complies strictly with Google Play policies by using scoped
MediaStorequeries (READ_MEDIA_AUDIO,READ_MEDIA_VIDEOon API 33+) and the Storage Access Framework (OpenDocumentTree).
- Secure Stream Validation (HTTPS/HLS/DASH URL sanitization): Parses URIs via
java.net.URI, rejects authority user-info (user@host), and blocks untrusted IPv4 loopback (127.0.0.1,localhost,0.0.0.0), decimal/octal/hex/shorthand IPs (2130706433,0177.0.0.1,0x7f.0.0.1,127.1), link-local (169.254.x.x), RFC-1918 private network addresses (10.x.x.x,192.168.x.x,172.16–31.x.x), and IPv6 loopback/unique-local/link-local/IPv4-mapped addresses ([::1],[::ffff:127.0.0.1],fc00::/7,fe80::/10) before passing URIs toMedia3PlayerEngineorVeloraPlaybackService. - IDN-Homograph & Open-Redirect Sanitization: Rejects non-ASCII and punycode (
xn--) host spoofing as well as embedded redirect query parameters targeting internal or file URIs. - Adaptive Manifest Segment & Attribute Inspection (
isSafeAdaptiveManifestPayload): Verifies.m3u8(HLS) and.mpd(MPEG-DASH) manifest payloads—including#EXT-X-KEY,#EXT-X-MAP,#EXT-X-MEDIAURI="..."attributes and<BaseURL>/<SegmentTemplate>attributes—to ensure segment and key references do not targetfile://,javascript:, path traversal (../), or loopback/private hosts. - Transport Security (
network_security_config.xml): EnforcescleartextTrafficPermitted="false"by default across the application, permitting cleartext HTTP only for explicitly allowlisted legacy radio stream domains.
- Threat Model: Third-party media player extensions historically introduce three high-severity attack vectors:
- Dynamic Code Execution (
.dex/.jar/.soinjection) leading to arbitrary code execution within the app UID. - Capability Escalation where a visual theme or lyrics adapter accesses private storage or exfiltrates listening history over the network.
- Unsigned Manifest Tampering where an unverified plugin impersonates a core component.
- Dynamic Code Execution (
- Mitigations (
VeloraPluginRegistry.isPluginAllowedInSandbox):- Tier 1 Declarative-Only Execution: Plugins are pure data manifests (
DeclarativePluginManifest). NoDexClassLoader,PathClassLoader, reflection, or JNI library loading is permitted anywhere in the runtime. - Explicit Capability Allowlist (
ALLOWED_CAPABILITIES): Every plugin's requested capabilities are checked against the immutable allowlist (theme.palette.saffron,wcag.contrast.guard,lyrics.sync.lrc,subtitle.rtl.persian,dsp.biquad.10band,visualizer.goertzel.rta,recommendations.local,privacy.zero_telemetry). Any unrecognized capability (dex.dynamic_code_load,network.raw,filesystem.write) causes immediate rejection. - Signature Gate:
manifest.verifiedSignaturemust betruebefore a plugin can be enabled.
- Tier 1 Declarative-Only Execution: Plugins are pure data manifests (
- All cloud synchronization is strictly opt-in behind Google Sign-In (
CredentialManager). - Anonymous authentication is disabled. Every Firestore document under
/users/{userId}/...enforcesrequest.auth != null && request.auth.uid == userIdon both client (VeloraFirebaseRepository) and server (firestore.rules), alongside strict key allowlists (hasAll/hasOnly), per-band EQ gain bounds (-24.0..+24.0 dBacross all 10 bands), string validation ontrackIds, and timestamp bounds (<= request.time).
If you discover a security vulnerability in VELORA:
- Do NOT open a public GitHub issue containing exploit details.
- Report the finding privately via GitHub's Private Vulnerability Reporting tab (Security → Advisories → New draft security advisory).
- Include:
- Affected component (
MediaOrchestrator,VeloraDownloadValidator,TenBandBiquadAudioProcessor,firestore.rules, etc.). - Minimal reproduction steps or proof-of-concept unit test.
- Potential impact assessment.
- Affected component (
We aim to acknowledge security reports within 48 hours and publish a verified fix and release binary within 7 days.