mathis-tryla / z-devsecops-cloud

Zenika Lille - Mathis - end-of-study internship 2023
0 stars 0 forks source link

fix(https+monitoring): persist prometheus + apply new https certificate #144

Closed mathis-tryla closed 1 year ago

github-actions[bot] commented 1 year ago

ZAP Scanning Report

Summary of Alerts

Risk Level Number of Alerts
High 0
Medium 2
Low 5
Informational 4

Alerts

Name Risk Level Number of Instances
Content Security Policy (CSP) Header Not Set Medium 4
Missing Anti-clickjacking Header Medium 3
HTTPS Content Available via HTTP Low 3
Permissions Policy Header Not Set Low 5
Server Leaks Version Information via "Server" HTTP Response Header Field Low 7
Strict-Transport-Security Header Not Set Low 7
X-Content-Type-Options Header Missing Low 7
Information Disclosure - Suspicious Comments Informational 1
Modern Web Application Informational 4
Re-examine Cache-control Directives Informational 4
Storable and Cacheable Content Informational 7

Alert Detail

Content Security Policy (CSP) Header Not Set

Medium (High)

Description

Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page — covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.

Instances: 4

Solution

Ensure that your web server, application server, load balancer, etc. is configured to set the Content-Security-Policy header.

Reference

CWE Id: 693

WASC Id: 15

Source ID: 3

Missing Anti-clickjacking Header

Medium (Medium)

Description

The response does not include either Content-Security-Policy with 'frame-ancestors' directive or X-Frame-Options to protect against 'ClickJacking' attacks.

Instances: 3

Solution

Modern Web browsers support the Content-Security-Policy and X-Frame-Options HTTP headers. Ensure one of them is set on all web pages returned by your site/app. If you expect the page to be framed only by pages on your server (e.g. it's part of a FRAMESET) then you'll want to use SAMEORIGIN, otherwise if you never expect the page to be framed, you should use DENY. Alternatively consider implementing Content Security Policy's "frame-ancestors" directive.

Reference

CWE Id: 1021

WASC Id: 15

Source ID: 3

HTTPS Content Available via HTTP

Low (Medium)

Description

Content which was initially accessed via HTTPS (i.e.: using SSL/TLS encryption) is also accessible via HTTP (without encryption).

Instances: 3

Solution

Ensure that your web server, application server, load balancer, etc. is configured to only serve such content via HTTPS. Consider implementing HTTP Strict Transport Security.

Reference

CWE Id: 311

WASC Id: 4

Source ID: 1

Permissions Policy Header Not Set

Low (Medium)

Description

Permissions Policy Header is an added layer of security that helps to restrict from unauthorized access or usage of browser/client features by web resources. This policy ensures the user privacy by limiting or specifying the features of the browsers can be used by the web resources. Permissions Policy provides a set of standard HTTP headers that allow website owners to limit which features of browsers can be used by the page such as camera, microphone, location, full screen etc.

Instances: 5

Solution

Ensure that your web server, application server, load balancer, etc. is configured to set the Permissions-Policy header.

Reference

CWE Id: 693

WASC Id: 15

Source ID: 3

Server Leaks Version Information via "Server" HTTP Response Header Field

Low (High)

Description

The web/application server is leaking version information via the "Server" HTTP response header. Access to such information may facilitate attackers identifying other vulnerabilities your web/application server is subject to.

Instances: 7

Solution

Ensure that your web server, application server, load balancer, etc. is configured to suppress the "Server" header or provide generic details.

Reference

CWE Id: 200

WASC Id: 13

Source ID: 3

Strict-Transport-Security Header Not Set

Low (High)

Description

HTTP Strict Transport Security (HSTS) is a web security policy mechanism whereby a web server declares that complying user agents (such as a web browser) are to interact with it using only secure HTTPS connections (i.e. HTTP layered over TLS/SSL). HSTS is an IETF standards track protocol and is specified in RFC 6797.

Instances: 7

Solution

Ensure that your web server, application server, load balancer, etc. is configured to enforce Strict-Transport-Security.

Reference

CWE Id: 319

WASC Id: 15

Source ID: 3

X-Content-Type-Options Header Missing

Low (Medium)

Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

Instances: 7

Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages. If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Reference

CWE Id: 693

WASC Id: 15

Source ID: 3

Information Disclosure - Suspicious Comments

Informational (Low)

Description

The response appears to contain suspicious comments which may help an attacker. Note: Matches made within script blocks or files are against the entire content not only comments.

Instances: 1

Solution

Remove all comments that return information that may help an attacker and fix any underlying problems they refer to.

Reference

CWE Id: 200

WASC Id: 13

Source ID: 3

Modern Web Application

Informational (Medium)

Description

The application appears to be a modern web application. If you need to explore it automatically then the Ajax Spider may well be more effective than the standard one.

Instances: 4

Solution

This is an informational alert and so no changes are required.

Reference

Source ID: 3

Re-examine Cache-control Directives

Informational (Low)

Description

The cache-control header has not been set properly or is missing, allowing the browser and proxies to cache content. For static assets like css, js, or image files this might be intended, however, the resources should be reviewed to ensure that no sensitive content will be cached.

Instances: 4

Solution

For secure content, ensure the cache-control HTTP header is set with "no-cache, no-store, must-revalidate". If an asset should be cached consider setting the directives "public, max-age, immutable".

Reference

CWE Id: 525

WASC Id: 13

Source ID: 3

Storable and Cacheable Content

Informational (Medium)

Description

The response contents are storable by caching components such as proxy servers, and may be retrieved directly from the cache, rather than from the origin server by the caching servers, in response to similar requests from other users. If the response data is sensitive, personal or user-specific, this may result in sensitive information being leaked. In some cases, this may even result in a user gaining complete control of the session of another user, depending on the configuration of the caching components in use in their environment. This is primarily an issue where "shared" caching servers such as "proxy" caches are configured on the local network. This configuration is typically found in corporate or educational environments, for instance.

Instances: 7

Solution

Validate that the response does not contain sensitive, personal or user-specific information. If it does, consider the use of the following HTTP response headers, to limit, or prevent the content being stored and retrieved from the cache by another user: Cache-Control: no-cache, no-store, must-revalidate, private Pragma: no-cache Expires: 0 This configuration directs both HTTP 1.0 and HTTP 1.1 compliant caching servers to not store the response, and to not retrieve the response (without validation) from the cache, in response to a similar request.

Reference

CWE Id: 524

WASC Id: 13

Source ID: 3