Website and Server Tests
Security is not a checklist, nor is it simply about having website tests show a lot of green or positive results for features like:
- SSL certificate
- HTTP Strict Transport Security (HSTS)
- Certification Authority Authorization (CAA) Policy
- Expect-CT header
- Domain Name System Security Extensions (DNSSEC)
- Content Security Policy (CSP)
- Mail Transfer Agent Strict Transport Security (MTA-STS)
- SMTP TLS Reporting (TLS-RPT)
- DNS-based Authentication of Named Entities (DANE)
- Sender Policy Framework (SPF)
- DomainKeys Identified Mail (DKIM)
- Domain-based Message Authentication, Reporting and Conformance (DMARC)
- Frame Options
- Cross-Site Scripting (XSS) Protection
- Content Type Options
While it is nice to have these website or server security features, in a similar fashion to Browser Tests the context is important and there are many false positives.
Website test sites like
hardenize.com are helpful tools for website owners to check various security features, but these tests say little about the server's actual security. For instance, tests cannot check if: the kernel, operating system and web applications are fully up-to-date or neglected; SSH is configured for public key authentication only; the server is Kicksecure-hardened; and whether backups are being made and so forth.
For example, at the time of writing the Microsoft website recorded a "C" rating at
securityheaders.com. Further, they did not have a CSP and neither DNSSEC nor DANE were configured. Despite this, the Microsoft website is not routinely hacked so malicious software can be uploaded by unauthorized third parties. 
As elaborated in the CSP entry on this page, the threat models are nuanced and Whonix ™ does not engage in security theater. While imperfections exist, reasonable efforts are made to improve website security despite constrained resources and developer time. A Comparison of Test Results with Others also helps to put this information into perspective.
For further information on this topic, see here.
Whonix Test Results
Table: Whonix ™ Test Results
|Test Site / Feature||Result|
|Website DANE||See DANE TLSA References. Quote DANE TLSA (DNS-based Authentication of Named Entities) for whonix.org [archive]:
Content Security Policy (CSP)
Is a W3C specification offering the possibility to instruct the client browser from which location and/or which type of resources are allowed to be loaded. To define a loading behavior, the CSP specification use “directive” where a directive defines a loading behavior for a target resource type. Directives can be specified using HTTP response header (a server may send more than one CSP HTTP header field with a given resource representation and a server may send different CSP header field values with different representations of the same resource or with different resources) or HTML Meta tag, the HTTP headers below are defined by the specs:
Consider the following example. A certain web application might not be functioning as expected due to a bug, or it may even be compromised because an attacker exploited an existing vulnerability. However, a compromised web application does not necessarily lead to a compromise of the web server software (like nginx), let alone a whole server (root) compromise. That is, the web server software might still function according to specifications. Under these conditions, a CSP can limit what the web application -- or more accurately, what the results of the output of the web application processed by the visitor's browser -- can do. For example, a CSP enforced by the web server software can prohibit  the browser from loading content from third party websites. In some cases, web application vulnerabilities might be rendered completely harmless or made less useful due to a CSP's ability to contain faulty or compromised web applications. 
Another good CSP use case concerns webmail, that is, reading email in a browser. For better security and privacy, all content from third party websites should be prohibited while content from the email provider is allowed. Even if this is in place, it is far safer to follow the Whonix ™ recommendation to avoid webmail entirely, and instead use an email client that has disabled all HTML and scripts (text-only mails).
Forum discussion: Content-Security-Policy now deployed on Whonix ™ websites [archive]
whonix.org has an essential CSP. This is useful for the
whonix.org onion domain since it avoids loading resources from the
whonix.org clearnet domain and causing browser mixed content warnings. It is also helpful in avoiding clearnet connections for visitors who prefer the onion version of the Whonix ™ website. The reason is modern web applications are not designed for use on multiple domain names with the same database backend and/or for use with onion domains in general.
whonix.org does not yet have a CSP without 'unsafe-inline' and 'unsafe-eval' for all web applications:
- This policy contains 'unsafe-inline' which is dangerous in the script-src directive.
- This policy contains 'unsafe-eval' which is dangerous in the script-src directive.
- This policy contains 'unsafe-inline' which is dangerous in the style-src directive.
Users who have NoScript enabled in their browser are unaffected.
Rather than relying on websites to deploy CSP, users should habitually use secure browsers, compartmentalize browsing in different virtual machines (VMs), harden their operating system, use Kicksecure, and utilize NoScript. The widespread and perfect deployment of CSP is unlikely to happen soon, if ever. Kicksecure and Whonix are real efforts aimed at improving security and privacy; limited developer time and resources mean only reasonable efforts are focused on CSP at present.
Whonix CSP Test Results
Table: Whonix ™ CSP Test Results
gzip is only relevant to performance and not security.
torsocks curl -H "Accept-Encoding: gzip" --head http://dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion/wiki/Documentation
The output includes the following.
Comparison with Others
Before making suggestions about features the
whonix.org website should implement, please conduct research on much better funded organizations for a fair comparison.  See:
- Microsoft, hardenize.com [archive]
- Microsoft, securityheaders.com [archive]
- The Tor Project, hardenize.com [archive]
- Wikipedia, securityheaders.com [archive]
- mediawiki.org, securityheaders.com [archive]
- Discourse, securityheaders.com [archive]
- Privacy on the Whonix ™ Website
- Trusting the Whonix ™ Website
- Distrusting Infrastructure
- Certifiably "F"ine [archive]
The CSP is actually a recommendation for the browser. However, writing the following would be confusing:
For example a CSP enforced by the web server software can recommend the browser to not load content from external websites and the browser would honor this advice.
- Of course it would be better to completely avoid faulty applications or compromises in the first place, but it is impossible to make this judgement in advance.
The following CSP is under consideration; it was previously enabled, so this advice is not current.
It is not compatible with $wgUseFileCache
Wiki users who are not logged in have 1 CSP, the essential CSP (by nginx). (Except for visitors of pages which are not yet cached.)
Wiki users who are logged in have 2 CSPs, the essential CSP and on top of it the CSP generated by the mediawiki webapp setting
- Limited Whonix ™ resources make some features infeasible.