Assessment 2 TP
Assessment 2 TP
software application”
(Cybersecurity)
Contents
1
Introduction.......................................................................................................2
Main Body........................................................................................................ 3
Installation - Instructions...............................................................................3
Conclusion........................................................................................................9
References.....................................................................................................10
Introduction
2
protocols. When new code is submitted, it activates the automation of
repetitive tasks, such as clicking and entering data, using tools like Selenium.
like Jenkins enable the automation of the entire development cycle. Once the
3
2.Installation
search for bugs, including code issues, vulnerabilities, security issues. For the
replicated the image from the official website, our container will be operational
access the interface via our web browser. After the successful compilation of
our code, we will establish communication with SonarQube to carry out our
tests. After creating a new project and choosing the option to create a local
project, we will proceed to generate a token, establish a build tool, and install
Sonarscanner. During the subsequent step, the page will undergo a refresh
and present the outcomes of the scan, revealing any vulnerabilities or code
4
Material from Sonar
(1)
(2)
5
(3)
6
The results where:
1. Security Hotspots: The first image makes it quite evident which two
problems have been found: the first concerns using both safe and
protection.
POST requests is shown when enabled. The user logs in if the function
7
successfully authenticates them by comparing their username and
3. Quality Gate Status: The overall state of the codebase is shown in the
quality established specifically for this project. On the other hand, there
is a section that is red, indicating that just 0.0 percent of the Security
metrics:
No debt
No code smells
rating.
Both the unit test coverage and duplication blocks metrics are
8
3.Solution
The warning regarding "allowing safe and unsafe HTTP methods" does not
HTTP methods that have the potential to alter the system's state (POST, PUT,
DELETE).
1. Enforcement of HTTPS:
HTTPS.
2. Cookie Security:
9
3. Forms and API Calls:
4. SSL/TLS Certificate:
may obtain one for free using services like Let's Encrypt.
as needed.
5. Backend Configuration:
of incoming requests.
10
The Implementation:
11
4. For AJAX requests, send the CSRF token within the request header:
your Flask application always uses HTTPS, you can do the following:
12
7. Lastly, set the Strict-Transport-Security header to enforce HSTS:
Conclusion
and lessen the threat of cyberattacks is secure code analysis. Creating safe
greatly reduce the likelihood that hackers will be able to successfully exploit
13
References
December.
10.1007/s42979-021-00939-4.
14
5. Pan, Z. et al. (2024) 'Ambush From All Sides: Understanding Security
15