# Hush Line Security Policy At Hush Line, developed by Science & Design, Inc., we prioritize the security of our application and the privacy of our users. This security policy outlines the measures and features we implement to ensure a secure environment for all users of Hush Line. ## Two-Factor Authentication (2FA) - Hush Line offers 2FA, adding an extra layer of security by requiring two forms of identification before granting access to an account. ## HTTPS with Let's Encrypt - All traffic is encrypted using HTTPS, with certificates provided by Let's Encrypt, ensuring secure communication between users and our servers. ## End-to-End Encrypted Messages (E2EE) with OpenPGP.js - PGP-enabled messages are encrypted from the sender's device to the recipient's device, preventing any unauthorized access in transit. ## Tor Onion Service - Hush Line offers a Tor onion service, allowing users to access the application with enhanced privacy and security. ## Security Headers Hush Line implements a series of HTTP security headers to protect our users and their data. These headers help mitigate various types of attacks and ensure secure communication between clients and our servers. Below are the security headers we use and their purposes: ### Strict-Transport-Security - `Strict-Transport-Security: max-age=63072000; includeSubdomains` - Ensures that browsers only connect to Hush Line over HTTPS, preventing man-in-the-middle attacks. The `max-age` directive specifies that the policy is remembered for two years. ### X-Frame-Options - `X-Frame-Options: DENY` - Prevents the website from being framed by other sites, mitigating clickjacking attacks. ### X-Content-Type-Options - `X-Content-Type-Options: nosniff` - Stops browsers from trying to MIME-sniff the content type, which can prevent certain types of attacks like drive-by downloads. ### Onion-Location - `Onion-Location: http://$ONION_ADDRESS\$request_uri` - Provides an Onion-Location header which helps users on the Tor network to be aware of the site's onion service counterpart, enhancing privacy and security. ## Content-Security-Policy (CSP) The Content-Security-Policy (CSP) header is a powerful tool used by web applications to mitigate the risk of Cross-Site Scripting (XSS) attacks and other types of code injection attacks. By specifying which content sources are trustworthy, CSP prevents the browser from loading malicious assets. Here's a breakdown of the CSP directive used: - `default-src 'self';` Only allow content from the site's own origin. This is the default policy for loading resources such as JavaScript, images, CSS, fonts, AJAX requests, frames, HTML5 media, and other data. - `script-src 'self' https://js.stripe.com;` Allow scripts to be loaded from the site's own origin and Stripe (for payment processing). - `img-src 'self' data: https:;` Allow images from the site's origin, inline images using data URIs, and images loaded over HTTPS from any origin. - `style-src 'self';` Only allow stylesheets from the site's own origin. - `frame-ancestors 'none';` Prevent the site from being framed (embedded within an