SAST/DAST Compliance Report

Content

Overview

Date

2023-11-14

Status

WIP

Release

Release 2023-10

Test Type

Automated Security Testing

Test Topic

Security

Context

Project: 2022.T3 CORE-MIS Merger

Tester

SolDevelo

Methodology

SAST

For Static Application Security Testing (SAST), we have implemented SonarCloud within our CI/CD pipeline. Our integration via GitHub Actions ensures continuous inspection of code quality and security vulnerabilities, automating the review process for every commit to the repository.

DAST

In our approach to Dynamic Application Security Testing (DAST), we have chosen to utilize OWASP ZAP, a widely recognized open-source web application security scanner. OWASP ZAP is specifically designed for testing web applications and offers a variety of features and tools to identify potential security vulnerabilities.

Introduction to OWASP ZAP

OWASP ZAP (Zed Attack Proxy) is part of the OWASP (Open Web Application Security Project) tools, known for their reliability and effectiveness in the field of web security. It is designed to automatically find security vulnerabilities in web applications while they are running, making it a suitable choice for DAST.

Utilization of OWASP ZAP in Our Testing

For our testing purposes, we adhere to the following procedure:

  1. Use of Default Policy:

    • For our DAST process, we use the default scan policy of OWASP ZAP. This policy covers a wide range of typical vulnerabilities found in web applications, ensuring our scanning process is thorough and effective. For further details about our scanning approach, please refer to the "SAST/DAST Requirements" article, which provides more comprehensive information.

  2. Dedicated Repository for Testing:

    • We have established a separate repository, openimis-dynamic-application-security-testing, specifically for conducting Dynamic Application Security Testing. This repository is central to our DAST process.

    • The application build process occurs in the openimis-dist_dkr repository. Here, we pull the latest version of the application, configure the necessary environment (including setting up the .env file), and deploy the application using Docker Compose.

    • This approach allows us to maintain a clear separation between the application building and security testing processes, ensuring a structured and focused DAST workflow.

  3. Performing the Analysis:

    • Once the application is running in its dockerized environment, OWASP ZAP performs an automated security analysis on it.

    • The target for the analysis is the running instance of the application, typically accessed at http://localhost:80.

    • This setup ensures that the security analysis is performed in an environment that closely mirrors the production setup, providing accurate and relevant security insights.

Conclusion

By integrating OWASP ZAP into our DAST methodology, we aim to proactively identify and mitigate security vulnerabilities in the openIMIS application. This approach aligns with industry best practices for web application security and contributes to the robustness and reliability of our application.

Result Summary

SAST

The results summary for each module, as analyzed by SonarCloud, is accessible at the openIMIS organization level. Detailed insights into the code quality and security postures of the respective modules can be reviewed using the following link: SonarCloud openIMIS Projects.

DAST

The Dynamic Application Security Testing (DAST) conducted on the openIMIS application using OWASP ZAP has yielded significant insights into the security posture of the application. Below is a summary of the results from the tests performed.

Summary of Alerts

The DAST identified 9 security alerts in total: three medium, three low, and three informational risks, with no high-risk vulnerabilities or false positives detected.

Risk Level

Number of Alerts

Risk Level

Number of Alerts

High

0

Medium

3

Low

3

Informational

3

False Positives:

0

Alerts

Name

Risk Level

Number of Instances

Description

Name

Risk Level

Number of Instances

Description

Content Security Policy (CSP) Header Not Set

Medium

1

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.

Missing Anti-clickjacking Header

Medium

1

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

Sub Resource Integrity Attribute Missing

Medium

1

The integrity attribute is missing on a script or link tag served by an external server. The integrity tag prevents an attacker who have gained access to this server from injecting a malicious content.

Permissions Policy Header Not Set

Low

1

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.

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

Low

3

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.

X-Content-Type-Options Header Missing

Low

1

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.

Modern Web Application

Informational

1

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.

Non-Storable Content

Informational

3

The response contents are not storable by caching components such as proxy servers. If the response does not contain sensitive, personal or user-specific information, it may benefit from being stored and cached, to improve performance.

Storable and Cacheable Content

Informational

1

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.

 

Conclusion

The overall security posture of the application is quite robust, as evidenced by the absence of high-risk vulnerabilities in the DAST findings. The issues that were detected fall within the medium and low-risk categories, which, while important, do not indicate critical security flaws. These results suggest that with targeted remediation of the identified issues, the application's security can be further strengthened.

Remediation

SAST

Remediation efforts for identified issues in SAST have been partially addressed by adhering to the OWASP Top 10 compliance report for openIMIS, which can be found here. Furthermore, we have set up an agreement that requires us to resolve any concerns raised by SonarCloud as part of the ongoing development process, assuring continual improvement in code quality and security.

DAST

While the security assessment has returned favorable results, indicating a sound security framework, there are areas identified for improvement. Addressing the issues outlined in the DAST findings will refine the application’s defenses and enhance its resilience to potential threats. The remediation steps will be guided by solutions proposed by the OWASP ZAP report, ensuring that the enhancements are in line with recognized security practices.

Name

Risk Level

Link

Solution

Name

Risk Level

Link

Solution

Content Security Policy (CSP) Header Not Set

Medium

TBA

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

Missing Anti-clickjacking Header

Medium

TBA

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.

Sub Resource Integrity Attribute Missing

Medium

TBA

Provide a valid integrity attribute to the tag.

Permissions Policy Header Not Set

Low

TBA

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

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

Low

TBA

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

X-Content-Type-Options Header Missing

Low

TBA

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.

Modern Web Application

Informational

-

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

Non-Storable Content

Informational

-

The content may be marked as storable by ensuring proper conditions.

Storable and Cacheable Content

Informational

-

Validate that the response does not contain sensitive, personal or user-specific information.

Report

SAST

For the SAST analysis, there is no single overarching report; instead, multiple reports exist for every analyzed module. These reports can be accessed and reviewed on the SonarCloud platform, offering a granular view of each module's code quality and security analysis. The reports are available at the following link: SonarCloud openIMIS Projects.

DAST

OWASP ZAP generates a comprehensive report detailing the analysis performed on the application. This report provides an in-depth review of each identified issue, complete with evidence, possible repercussions, and recommended remediation strategies. For full visibility into the security assessment, the complete OWASP ZAP report will be attached to this document, enabling a thorough review and follow-up action planning.

 

Did you encounter a problem or do you have a suggestion?

Please contact our Service Desk



This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/