diff --git a/testing/templates/check_email.html b/testing/templates/check_email.html
index 42e3604..fb7cbcf 100644
--- a/testing/templates/check_email.html
+++ b/testing/templates/check_email.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load tags %}
+{% load static %}
{% block content %}
The Sender Policy Framework (SPF) is an email validation protocol that helps detect and block email spoofing. Email spoofing is a common technique used in phishing and spam emails. SPF allows the receiving mail server to verify that incoming mail from a domain comes from a host authorized by that domain’s administrators. The list of authorized sending hosts for a domain is published in the Domain Name System (DNS) records. Valid:
+ {% if spf_valid %}
+
+ {% else %}
+
+ {% endif %}
+ Create and publish an SPF record in your DNS settings for your domain. The SPF record specifies which email servers are authorized to send emails on behalf of your domain name. Identify the IP addresses of your legitimate email servers and include them in your SPF record. This ensures that only authorized servers can send emails using your domain name. Configure your SPF record with a "hard fail" mechanism (-all) to explicitly reject any emails that do not originate from authorized IP addresses. This helps prevent unauthorized sources from sending emails on behalf of your domain. Consider implementing SPF alignment mechanisms, such as DMARC (Domain-based Message Authentication, Reporting, and Conformance), to further strengthen email authentication and protect against domain spoofing. DMARC (Domain-based Message Authentication, Reporting, and Conformance) is an email authentication protocol that provides additional protection against email spoofing and phishing attacks. It uses the Sender Policy Framework (SPF) and DomainKeys Identified Mail (DKIM) standards. DMARC enables a domain owner to specify how mail servers should handle messages from their domain that don’t pass SPF or DKIM checks. This adds an extra layer of security Valid:
+ {% if dmarc_valid %}
+
+ {% else %}
+
+ {% endif %}
+ DNSSEC (Domain Name System Security Extensions) is a set of cryptographic protocols and security measures designed to enhance the security of the Domain Name System (DNS). By digitally signing DNS data, DNSSEC ensures data integrity and authenticity, protecting against various forms of DNS attacks like cache poisoning or DNS spoofing. It uses public key cryptography to verify the authenticity of DNS responses and provides a chain of trust from the root DNS servers down to the individual domain names, ensuring that the DNS information received by a user is valid and has not been tampered with during transmission.
+ IPv6 is the next generation of the Internet Protocol, and it offers a number of advantages over IPv4, the current version of the protocol.
+ Assess the security of your ema
+ value="{{ domain }}" required>
Assess the security of your ema
{% if result %}
Overview of {{ result.domain }}
+ Overview of {{ domain }}
Overview of {{ result.domain }}
Overview of {{ result.domain }}
SPF record
Overview of {{ result.domain }}
DMARC Record
Overview of {{ result.domain }}
Signed Domain Name (DNSSEC)
Overview of {{ domain }}
+
+ Vulnerabilities
+ {% if spf_valid %}
+
+ {% else %}
+
+ {% endif %} SPF Record
+ SPF Record
+ {{ spf }}
+ Recommendations:
+ {% if dmarc_valid %}
+
+ {% else %}
+
+ {% endif %} DMARC Record
+ DMARC Record
+ {{ dmarc }}
+ {% if dnssec %}
+
+ {% else %}
+
+ {% endif %} Signed Domain Name (DNSSEC)
+ DNSSEC Status
+ {{ dnssec }}
+ Recommendations:
+
+
+
Content Security Policy (CSP) is an HTTP header that allows site operators - fine-grained control over where resources on their site can be loaded from. The - use of this header is the best method to prevent cross-site scripting (XSS) - vulnerabilities. Due to the difficulty in retrofitting CSP into existing - websites, CSP is mandatory for all new websites and is strongly recommended for - all existing high-risk sites.
-
- Content-Security-Policy
-
- Determine what types of resources your site should load: Before - implementing - CSP, it is important to identify which types of resources your site needs to - load such as scripts, stylesheets, images, and fonts.
-Create a whitelist of
- allowed sources:
Once you have determined the types of
- resources your site needs to load, you should create a whitelist of allowed
- sources for each of them. This will prevent malicious sources from injecting
- unwanted code into your site.
Use the Content-Security-Policy header:
Add the
- Content-Security-Policy
- header
- to the HTTP response of your site. This header specifies the whitelist of
- allowed sources for each resource type.
For example, the following header - specifies that only resources from the same origin as the site are allowed: -
-Test your CSP policy:
After implementing your CSP policy, it is
- important
- to
- test it to ensure that it does not break any functionality of your site. You
- can use rescan and check if the CSP will pass.
Keep your CSP policy up to date:
As your site evolves, you may
- need to add
- new
- resources or change the sources of existing resources. Therefore, it is
- important to review and update your CSP policy regularly to ensure that it
- remains effective.
Using cookies attributes such as Secure and HttpOnly can protect users from - having their personal information stolen.
-The secure flag in cookies tells the browser that the cookie should - only be sent - over HTTPS, which is an encrypted connection. This helps to protect the cookie - from being intercepted by attackers. If a website never uses HTTPS, the secure - flag will not offer any protection.
- -The HttpOnly flag tells the browser that the cookie should only be - accessible by - the server. This helps to mitigate XSS attacks, where an attacker tries to - steal - cookies by injecting malicious scripts into a web page.
- -The SameSite flag controls when cookies are sent. When it is set to - Strict, the - cookie is only sent if the site for the cookie matches the site currently - shown - in the browser's URL bar. This helps to mitigate CSRF attacks, where an - attacker - tricks a user into submitting a malicious form on a trusted site.
- -You should also set an expiration date for your cookies. Without one, - the cookie - will last as long as the browser session does. By setting an expiration date, - you can limit how long the cookie persists.
-Here are some additional tips for securing cookies:
-Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that - allows a server to indicate any origins (domain, scheme, or port) other than its - own from which a browser should permit loading resources. CORS also relies on a - mechanism by which browsers make a "preflight" request to the server hosting the - cross-origin resource, in order to check that the server will permit the actual - request. In that preflight, the browser sends headers that indicate the HTTP - method and headers that will be used in the actual request.
- Instead of using the wildcard "*"
, explicitly specify the
- allowed origins for
- cross-origin requests.
- This can be done by setting the Access-Control-Allow-Origin header to a
- specific
- origin, such as https://nc3.lu
, or to a list of trusted origins.
- By explicitly specifying the allowed origins, you can prevent unauthorized
- access to your resources from untrusted sources.
Use the Access-Control-Allow-Methods and Access-Control-Allow-Headers headers - to - define the allowed HTTP methods and request headers for cross-origin requests. - Only include the necessary methods and headers that your application requires, - rather than allowing all methods or headers. - This can help to reduce the attack surface of your application and protect it - from malicious requests.
- - Validate origin - -Implement server-side validation of the Origin header in the request to
- ensure
- that it matches the list of allowed origins.
- This prevents attackers from spoofing the origin and bypassing CORS
- restrictions.
- You can use the nginx web server to implement this validation by adding the
- following line to your nginx.conf file:
-
- add_header Access-Control-Allow-Origin $http_origin;
-
-
Be cautious when enabling the Access-Control-Allow-Credentials header. - Only enable it if your application requires sending and receiving credentials - (e.g., cookies, authorization headers) across origins. - Make sure to properly handle and validate the credentials on the server-side - to - prevent unauthorized access.
- Apply origin whitelisting - -Consider maintaining a whitelist of trusted origins within your application's - server-side logic. - Validate incoming requests against this whitelist and only allow requests from - trusted origins. - This can help to further reduce the attack surface of your application and - protect it from malicious requests.
- Set secure CORS headers - -In addition to the CORS headers, ensure that your application implements - other - security headers, such as Content Security Policy (CSP), Strict Transport - Security (HSTS), and X-Frame-Options, to provide a layered security approach. - These headers can help to protect your application from a variety of attacks, - including cross-site scripting (XSS), clickjacking, and man-in-the-middle - (MITM) - attacks.
- -Properly configured redirections from HTTP to HTTPS allow browsers to correctly - apply HTTP Strict Transport Security (HSTS) settings.
-Use HTTPS for all websites and APIs. This is the most important security - recommendation, - as it encrypts all communication between the client and the server, making it - much more difficult - for attackers to intercept and steal data.
-Use 301 redirects to redirect HTTP requests to HTTPS. This ensures that users - are always redirected to the secure - version of the site, even if they type in the HTTP URL.
-Enable HSTS. HSTS (HTTP Strict Transport Security) is a security feature that - tells browsers - to always connect to your site over HTTPS, even if the user types in the HTTP - URL. - This helps to prevent attackers from tricking users into connecting to your - site over HTTP.
-Do not redirect from HTTP to HTTPS on a different host. This can prevent HSTS - from being set.
-Keep your SSL/TLS certificate up to date. This helps to protect your site - from attacks that exploit expired or - misconfigured certificates.
-Content Security Policy (CSP) is an HTTP header that allows site operators + fine-grained control over where resources on their site can be loaded from. The + use of this header is the best method to prevent cross-site scripting (XSS) + vulnerabilities. Due to the difficulty in retrofitting CSP into existing + websites, CSP is mandatory for all new websites and is strongly recommended for + all existing high-risk sites.
+ +CSP Value:
+ {% if csp_result.csp_value %}
+ {{ csp_result.csp_value }}
+ {% else %}
+ None
+ {% endif %}
+
Referrer Policy can protect the privacy of your users by restricting the - contents of the HTTP Referer header.
-You can set the header in an apache configuration file or in a
- root web directory over an .htaccess
file.
You need to add:
- Header set Referrer-Policy
- "replace-with-the-policy-you-want-to-use"
-
- If your website doesn't need to send any referrer information to other
- domains, you can use the "no-referrer"
directive. This will
- prevent the
- browser from sending any referrer information in the HTTP header.
Determine what types of resources your site should load: before + implementing CSP, it is important to identify which types of resources + your site needs to load such as scripts, stylesheets, images, and fonts.
+Create a whitelist of allowed sources:
+ Once you have determined the types of
+ resources your site needs to load, you should create a whitelist of allowed
+ sources for each of them. This will prevent malicious sources from injecting
+ unwanted code into your site.
Use the Content-Security-Policy header:
Add the
+ Content-Security-Policy
+ header
+ to the HTTP response of your site. This header specifies the whitelist of
+ allowed sources for each resource type.
For example, the following header + specifies that only resources from the same origin as the site are allowed: +
+Test your CSP policy:
After implementing your CSP policy, it is
+ important
+ to
+ test it to ensure that it does not break any functionality of your site. You
+ can use rescan and check if the CSP will pass.
Keep your CSP policy up to date:
As your site evolves, you may
+ need to add
+ new
+ resources or change the sources of existing resources. Therefore, it is
+ important to review and update your CSP policy regularly to ensure that it
+ remains effective.
If your website needs to send referrer information only when the user is
- navigating within your own domain, you can use the
- "same-origin"
directive.
- This will prevent the browser from sending referrer information when the
- user navigates to a different domain.
Using cookies attributes such as Secure and HttpOnly can protect users from + having their personal information stolen.
+ +Cookie Name | +Secure | +HttpOnly | +
---|---|---|
{{ cookie.name }} | +{% if cookie.secure %}Yes{% else %}No{% endif %} | +{% if cookie.http_only %}Yes{% else %}No{% endif %} | +
If your website needs to send referrer information to other domains, but
- you
- don't want to leak sensitive information, you can use the
- "strict-origin-when-cross-origin"
directive. This will send
- the referrer
- information only when the referring page is from the same origin, and will
- only include the origin (not the full URL) when the referring page is from
- a
- different origin.
If your website needs to send referrer information to other domains, and
- you
- don't need to hide the URL of the referring page, you can use the "origin"
- or "unsafe-url"
directive. The "origin"
- directive will send only the origin
- (not the full URL) in the referrer header, while the
- "unsafe-url"
directive
- will send the full URL of the referring page.
The secure flag in cookies tells the browser that the cookie should + only be sent + over HTTPS, which is an encrypted connection. This helps to protect the cookie + from being intercepted by attackers. If a website never uses HTTPS, the secure + flag will not offer any protection.
+ +The HttpOnly flag tells the browser that the cookie should only be + accessible by + the server. This helps to mitigate XSS attacks, where an attacker tries to + steal + cookies by injecting malicious scripts into a web page.
+ +The SameSite flag controls when cookies are sent. When it is set to + Strict, the + cookie is only sent if the site for the cookie matches the site currently + shown + in the browser's URL bar. This helps to mitigate CSRF attacks, where an + attacker + tricks a user into submitting a malicious form on a trusted site.
+ +You should also set an expiration date for your cookies. Without one, + the cookie + will last as long as the browser session does. By setting an expiration date, + you can limit how long the cookie persists.
+Here are some additional tips for securing cookies:
+Subresource Integrity (SRI) is a security feature that enables browsers to - verify that files they fetch (for example, from a CDN) - are delivered without unexpected manipulation. It works by allowing you to - provide a cryptographic hash that a fetched file must match. -
-Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that + allows a server to indicate any origins (domain, scheme, or port) other than its + own from which a browser should permit loading resources. CORS also relies on a + mechanism by which browsers make a "preflight" request to the server hosting the + cross-origin resource, in order to check that the server will permit the actual + request. In that preflight, the browser sends headers that indicate the HTTP + method and headers that will be used in the actual request.
+ +Header | +Value | +
---|---|
{{ header }} | +{{ value }} | +
Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they + fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing + you to provide a cryptographic hash that a fetched file must match.
+ +Source | +Cross-Origin | +Has Integrity | +Integrity Valid | +
---|---|---|---|
{{ resource.src }} |
+ {% if resource.is_cross_origin %}{% else %}{% endif %} | +{% if resource.has_integrity %}{% else %}{% endif %} | ++ {% if resource.is_cross_origin %} + {% if resource.integrity_valid is none %} + N/A + {% elif resource.integrity_valid %} + + {% else %} + + {% endif %} + {% else %} + N/A + {% endif %} + | +
Records:
- {% if records %} -Server | -IPv4 | -IPv6 | -
---|---|---|
{{ record.0 }} | -{{ record.1 }} | -{{ record.2 }} | -
- - Your server has an IPv6 address. -
- {% else %} -+ +
X-Content-Type-Options is a security header that prevents browsers from guessing the MIME type of a file, + enforcing the type declared by the server. + This helps protect against certain types of attacks, like MIME type sniffing, by ensuring content is handled as intended.
+Implement the X-Content-Type-Options: nosniff header on your web server to enhance security by + preventing MIME type sniffing attacks. This header ensures browsers strictly follow the + declared content type and do not try to guess the MIME type, reducing the risk of executing malicious files.
+- {% if records_v4_comments.grade == "full" %} - - {% elif records_v4_comments.grade == "null" %} - + +
+ HSTS is a web security policy mechanism that helps protect websites against protocol downgrade attacks and cookie hijacking. It allows web servers to declare that web browsers should interact with it using only secure HTTPS connections. +
+Status: + {% if hsts_result.status %} + 'Implemented' + {% else %} + 'Not Implemented' + {% endif %} +
+HTTP Status: {{ hsts_result.http_status }}
+HSTS Header: {{ hsts_result.data }}
+Preload Ready: + {% if hsts_result.preload_ready %} + 'Yes' + {% else %} + 'No' + {% endif %} +
+Implementation Strength: {{ hsts_result.strength }}
+ {% if hsts_result.parsed %} +- {% if records_v6_comments.grade == "full" %} - - {% elif records_v6_comments.grade == "null" %} - +
No specific recommendations at this time.
{% endif %} - {{ records_v6_comments.comment }} - -- IPv6 is the next generation of the Internet Protocol, and it offers a - number of advantages over IPv4, the current version of the protocol. + The security.txt file is used to help security researchers contact the site owner about security issues.
-{% if security_txt_result.status %}Found{% else %}Not Found{% endif %}
+{{ security_txt_result.data }}+ {% else %} +
The security.txt file is present. Ensure it contains up-to-date information and follows the standard format.
+Consider implementing a security.txt file:
+Ciphersuite | -Security level | -
---|---|
{{ name }} | -- {% if info.sec_level.level == "GOOD" or info.sec_level.level == "SUFFICIENT" %} - - {% elif info.sec_level.level == "PHASE_OUT" %} - - {% elif info.sec_level.level == "INSUFFICIENT" %} - - {% endif %} - {{ info.sec_level.level }} - | -
diff --git a/testing/templates/infra-test_report.html b/testing/templates/infra-test_report.html new file mode 100644 index 0000000..d776d06 --- /dev/null +++ b/testing/templates/infra-test_report.html @@ -0,0 +1,88 @@ + + +
+ + +
diff --git a/testing/templates/pdf_wrapper.html b/testing/templates/pdf_wrapper.html index ace183a..792ef4b 100644 --- a/testing/templates/pdf_wrapper.html +++ b/testing/templates/pdf_wrapper.html @@ -1,4 +1,32 @@ -
+
+
+{% with test|add:"_report.html" as template %}
+ {% include template %}
+{% endwith %}
diff --git a/testing/templates/web-test_report.bkp.html b/testing/templates/web-test_report.bkp.html
new file mode 100644
index 0000000..f27da19
--- /dev/null
+++ b/testing/templates/web-test_report.bkp.html
@@ -0,0 +1,899 @@
+
+ Basic Website Security Checker
+
+ + +
Content Security Policy (CSP) is an HTTP header that allows site operators + fine-grained control over where resources on their site can be loaded from. The + use of this header is the best method to prevent cross-site scripting (XSS) + vulnerabilities. Due to the difficulty in retrofitting CSP into existing + websites, CSP is mandatory for all new websites and is strongly recommended for + all existing high-risk sites.
+
+ {% if csp_result.csp_value %}
+ {{ csp_result.csp_value }}
+ {% else %}
+ None
+ {% endif %}
+
+ {% if csp_result.csp_report_only %} + {{ csp_result.csp_report_only }} + {% else %} + None + {% endif %} +
+Determine what types of resources your site should load: Before + implementing + CSP, it is important to identify which types of resources your site needs to + load such as scripts, stylesheets, images, and fonts.
+Create a whitelist of
+ allowed sources:
Once you have determined the types of
+ resources your site needs to load, you should create a whitelist of allowed
+ sources for each of them. This will prevent malicious sources from injecting
+ unwanted code into your site.
Use the Content-Security-Policy header:
Add the
+ Content-Security-Policy
+ header
+ to the HTTP response of your site. This header specifies the whitelist of
+ allowed sources for each resource type.
For example, the following header + specifies that only resources from the same origin as the site are allowed: +
+Test your CSP policy:
After implementing your CSP policy, it is
+ important
+ to
+ test it to ensure that it does not break any functionality of your site. You
+ can use rescan and check if the CSP will pass.
Keep your CSP policy up to date:
As your site evolves, you may
+ need to add
+ new
+ resources or change the sources of existing resources. Therefore, it is
+ important to review and update your CSP policy regularly to ensure that it
+ remains effective.
+ +
Using cookies attributes such as Secure and HttpOnly can protect users from + having their personal information stolen.
+Cookie Name | +Secure | +HttpOnly | +
---|---|---|
{{ cookie.name }} | +{% if cookie.secure %}Yes{% else %}No{% endif %} | +{% if cookie.http_only %}Yes{% else %}No{% endif %} | +
The secure flag in cookies tells the browser that the cookie should + only be sent + over HTTPS, which is an encrypted connection. This helps to protect the cookie + from being intercepted by attackers. If a website never uses HTTPS, the secure + flag will not offer any protection.
+ +The HttpOnly flag tells the browser that the cookie should only be + accessible by + the server. This helps to mitigate XSS attacks, where an attacker tries to + steal + cookies by injecting malicious scripts into a web page.
+ +The SameSite flag controls when cookies are sent. When it is set to + Strict, the + cookie is only sent if the site for the cookie matches the site currently + shown + in the browser's URL bar. This helps to mitigate CSRF attacks, where an + attacker + tricks a user into submitting a malicious form on a trusted site.
+ +You should also set an expiration date for your cookies. Without one, + the cookie + will last as long as the browser session does. By setting an expiration date, + you can limit how long the cookie persists.
+Here are some additional tips for securing cookies:
++ +
Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that + allows a server to indicate any origins (domain, scheme, or port) other than its + own from which a browser should permit loading resources. CORS also relies on a + mechanism by which browsers make a "preflight" request to the server hosting the + cross-origin resource, in order to check that the server will permit the actual + request. In that preflight, the browser sends headers that indicate the HTTP + method and headers that will be used in the actual request.
+Header | +Value | +
---|---|
{{ header }} | +{% if value %}{{ value }}{% else %}Not set{% endif %} | +
Instead of using the wildcard "*"
, explicitly specify the
+ allowed origins for
+ cross-origin requests.
+ This can be done by setting the Access-Control-Allow-Origin header to a
+ specific
+ origin, such as https://nc3.lu
, or to a list of trusted origins.
+ By explicitly specifying the allowed origins, you can prevent unauthorized
+ access to your resources from untrusted sources.
Use the Access-Control-Allow-Methods and Access-Control-Allow-Headers headers + to + define the allowed HTTP methods and request headers for cross-origin requests. + Only include the necessary methods and headers that your application requires, + rather than allowing all methods or headers. + This can help to reduce the attack surface of your application and protect it + from malicious requests.
+ + Validate origin + +Implement server-side validation of the Origin header in the request to
+ ensure
+ that it matches the list of allowed origins.
+ This prevents attackers from spoofing the origin and bypassing CORS
+ restrictions.
+ You can use the nginx web server to implement this validation by adding the
+ following line to your nginx.conf file:
+
+ add_header Access-Control-Allow-Origin $http_origin;
+
+
Be cautious when enabling the Access-Control-Allow-Credentials header. + Only enable it if your application requires sending and receiving credentials + (e.g., cookies, authorization headers) across origins. + Make sure to properly handle and validate the credentials on the server-side + to + prevent unauthorized access.
+ Apply origin whitelisting + +Consider maintaining a whitelist of trusted origins within your application's + server-side logic. + Validate incoming requests against this whitelist and only allow requests from + trusted origins. + This can help to further reduce the attack surface of your application and + protect it from malicious requests.
+ Set secure CORS headers + +In addition to the CORS headers, ensure that your application implements + other + security headers, such as Content Security Policy (CSP), Strict Transport + Security (HSTS), and X-Frame-Options, to provide a layered security approach. + These headers can help to protect your application from a variety of attacks, + including cross-site scripting (XSS), clickjacking, and man-in-the-middle + (MITM) + attacks.
++ + +
Properly configured redirections from HTTP to HTTPS allow browsers to correctly + apply HTTP Strict Transport Security (HSTS) settings.
+Use HTTPS for all websites and APIs. This is the most important security + recommendation, + as it encrypts all communication between the client and the server, making it + much more difficult + for attackers to intercept and steal data.
+Use 301 redirects to redirect HTTP requests to HTTPS. This ensures that users + are always redirected to the secure + version of the site, even if they type in the HTTP URL.
+Enable HSTS. HSTS (HTTP Strict Transport Security) is a security feature that + tells browsers + to always connect to your site over HTTPS, even if the user types in the HTTP + URL. + This helps to prevent attackers from tricking users into connecting to your + site over HTTP.
+Do not redirect from HTTP to HTTPS on a different host. This can prevent HSTS + from being set.
+Keep your SSL/TLS certificate up to date. This helps to protect your site + from attacks that exploit expired or + misconfigured certificates.
++ + +
Referrer Policy can protect the privacy of your users by restricting the + contents of the HTTP Referer header.
+You can set the header in an apache configuration file or in a
+ root web directory over an .htaccess
file.
You need to add:
+ Header set Referrer-Policy
+ "replace-with-the-policy-you-want-to-use"
+
+ If your website doesn't need to send any referrer information to other
+ domains, you can use the "no-referrer"
directive. This will
+ prevent the
+ browser from sending any referrer information in the HTTP header.
If your website needs to send referrer information only when the user is
+ navigating within your own domain, you can use the
+ "same-origin"
directive.
+ This will prevent the browser from sending referrer information when the
+ user navigates to a different domain.
If your website needs to send referrer information to other domains, but
+ you
+ don't want to leak sensitive information, you can use the
+ "strict-origin-when-cross-origin"
directive. This will send
+ the referrer
+ information only when the referring page is from the same origin, and will
+ only include the origin (not the full URL) when the referring page is from
+ a
+ different origin.
If your website needs to send referrer information to other domains, and
+ you
+ don't need to hide the URL of the referring page, you can use the "origin"
+ or "unsafe-url"
directive. The "origin"
+ directive will send only the origin
+ (not the full URL) in the referrer header, while the
+ "unsafe-url"
directive
+ will send the full URL of the referring page.
+ + +
Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they + fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing + you to provide a cryptographic hash that a fetched file must match.
+Type | +Source | +Cross-Origin | +Has Integrity | +Integrity Value | +Integrity Valid | +
---|---|---|---|---|---|
{{ resource.type }} | +{{ resource.src }} |
+ {% if resource.is_cross_origin %}{% else %}{% endif %} | +{% if resource.has_integrity %}{% else %}{% endif %} | +{% if resource.integrity_value %}{{ resource.integrity_value }} {% else %}N/A{% endif %} |
+ + {% if resource.is_cross_origin %} + {% if resource.integrity_valid is none %} + N/A + {% elif resource.integrity_valid %} + + {% else %} + + {% endif %} + {% else %} + N/A + {% endif %} + | +
+ + +
X-Content-Type-Options is a security header that prevents browsers from guessing the MIME type of a file, + enforcing the type declared by the server. + This helps protect against certain types of attacks, like MIME type sniffing, by ensuring content is handled as intended.
++ Implement the X-Content-Type-Options: nosniff header on your web server to enhance security by + preventing MIME type sniffing attacks. This header ensures browsers strictly + follow the declared content type and do not try to guess the MIME type, + reducing the risk of executing malicious files. +
+ ++ + +
+ HSTS is a web security policy mechanism that helps protect websites against protocol downgrade attacks and cookie hijacking. It allows web servers to declare that web browsers should interact with it using only secure HTTPS connections. +
+Status:{% if hsts_result.status %} Implemented {% else %} 'Not Implemented' {% endif %}
+HTTP Status: {{ hsts_result.http_status }}
+HSTS Header: {{ hsts_result.data }}
+Preload Ready:{% if hsts_result.preload_ready %} 'Yes' {% else %} 'No' {% endif %}
+Implementation Strength: {{ hsts_result.strength }}
+ {% if hsts_result.parsed %} +No specific recommendations at this time.
+ {% endif %} ++ + +
+ The security.txt file is used to help security researchers contact the site owner about security issues. +
+{% if security_txt_result.status %}Found{% else %}Not Found{% endif %}
+{{ security_txt_result.data }}+ {% else %} +
The security.txt file is present. Ensure it contains up-to-date information and follows the standard format.
+Consider implementing a security.txt file:
+diff --git a/testing/templates/web-test_report.html b/testing/templates/web-test_report.html index 9311a40..45c4555 100644 --- a/testing/templates/web-test_report.html +++ b/testing/templates/web-test_report.html @@ -1,1129 +1,757 @@ -{% load tags %} -{% if result %} + + +
+ + +
+