Skip to content

Commit a7ab6c2

Browse files
committed
docs: add sub section OWASP Top 10 2021
1 parent f005318 commit a7ab6c2

File tree

1 file changed

+35
-41
lines changed

1 file changed

+35
-41
lines changed

user_guide_src/source/concepts/security.rst

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ the CodeIgniter provisions to address the problem.
1717

1818
.. contents::
1919
:local:
20-
:depth: 1
20+
:depth: 2
21+
22+
*****************
23+
OWASP Top 10 2021
24+
*****************
2125

22-
******************************
2326
A01:2021 Broken Access Control
24-
******************************
27+
==============================
2528

2629
Access control enforces policy such that users cannot act outside of their intended
2730
permissions. Failures typically lead to unauthorized information disclosure,
@@ -49,7 +52,7 @@ Common access control vulnerabilities include:
4952
pages as a standard user.
5053

5154
OWASP recommendations
52-
=====================
55+
---------------------
5356

5457
Access control is only effective in trusted server-side code or server-less API,
5558
where the attacker cannot modify the access control check or metadata.
@@ -71,7 +74,7 @@ where the attacker cannot modify the access control check or metadata.
7174
follow the OAuth standards to revoke access.
7275

7376
CodeIgniter provisions
74-
======================
77+
----------------------
7578

7679
- :ref:`Public <application-structure-public>` folder, with application and system
7780
outside
@@ -83,9 +86,8 @@ CodeIgniter provisions
8386
- An official authentication and authorization framework :ref:`CodeIgniter Shield <shield>`
8487
- Easy to add third party authentication
8588

86-
*******************************
8789
A02:2021 Cryptographic Failures
88-
*******************************
90+
===============================
8991

9092
The first thing is to determine the protection needs of data in transit and at
9193
rest. For example, passwords, credit card numbers, health records, personal
@@ -123,7 +125,7 @@ or regulations, e.g., financial data protection such as PCI Data Security Standa
123125
example in the form of padding oracle attacks?
124126

125127
OWASP recommendations
126-
=====================
128+
---------------------
127129

128130
Do the following, at a minimum, and consult the references:
129131

@@ -161,7 +163,7 @@ Do the following, at a minimum, and consult the references:
161163
- Verify independently the effectiveness of configuration and settings.
162164

163165
CodeIgniter provisions
164-
======================
166+
----------------------
165167

166168
- The config for global secure access (``Config\App::$forceGlobalSecureRequests``)
167169
- :php:func:`force_https()` function
@@ -170,9 +172,8 @@ CodeIgniter provisions
170172
- An official authentication and authorization framework
171173
:ref:`CodeIgniter Shield <shield>`
172174

173-
******************
174175
A03:2021 Injection
175-
******************
176+
==================
176177

177178
An application is vulnerable to attack when:
178179

@@ -194,7 +195,7 @@ dynamic (DAST), and interactive (IAST) application security testing tools into
194195
the CI/CD pipeline to identify introduced injection flaws before production deployment.
195196

196197
OWASP recommendations
197-
=====================
198+
---------------------
198199

199200
Preventing injection requires keeping data separate from commands and queries:
200201

@@ -218,7 +219,7 @@ Preventing injection requires keeping data separate from commands and queries:
218219
records in case of SQL injection.
219220

220221
CodeIgniter provisions
221-
======================
222+
----------------------
222223

223224
- :ref:`urls-uri-security`
224225
- :ref:`invalidchars` filter
@@ -231,9 +232,8 @@ CodeIgniter provisions
231232
- :ref:`Database escape methods <database-queries-escaping>`
232233
- :ref:`database-queries-query-bindings`
233234

234-
************************
235235
A04:2021 Insecure Design
236-
************************
236+
========================
237237

238238
Insecure design is a broad category representing different weaknesses, expressed
239239
as “missing or ineffective control design.” Insecure design is not the source for
@@ -249,7 +249,7 @@ lack of business risk profiling inherent in the software or system being develop
249249
and thus the failure to determine what level of security design is required.
250250

251251
OWASP recommendations
252-
=====================
252+
---------------------
253253

254254
- Establish and use a secure development lifecycle with AppSec professionals to
255255
help evaluate and design security and privacy-related controls
@@ -269,15 +269,14 @@ OWASP recommendations
269269
- Limit resource consumption by user or service
270270

271271
CodeIgniter provisions
272-
======================
272+
----------------------
273273

274274
- :doc:`PHPUnit testing <../testing/overview>`
275275
- :doc:`../libraries/throttler` for rate limit
276276
- An official authentication and authorization framework :ref:`CodeIgniter Shield <shield>`
277277

278-
**********************************
279278
A05:2021 Security Misconfiguration
280-
**********************************
279+
==================================
281280

282281
The application might be vulnerable if the application is:
283282

@@ -301,7 +300,7 @@ Without a concerted, repeatable application security configuration process,
301300
systems are at a higher risk.
302301

303302
OWASP recommendations
304-
=====================
303+
---------------------
305304

306305
Secure installation processes should be implemented, including:
307306

@@ -323,14 +322,13 @@ Secure installation processes should be implemented, including:
323322
settings in all environments.
324323

325324
CodeIgniter provisions
326-
======================
325+
----------------------
327326

328327
- :ref:`Production mode <environment-constant>` by default
329328
- :ref:`secureheaders` filter
330329

331-
*******************************************
332330
A06:2021 Vulnerable and Outdated Components
333-
*******************************************
331+
===========================================
334332

335333
You are likely vulnerable:
336334

@@ -352,7 +350,7 @@ You are likely vulnerable:
352350
Misconfiguration).
353351

354352
OWASP recommendations
355-
=====================
353+
---------------------
356354

357355
There should be a patch management process in place to:
358356

@@ -378,13 +376,12 @@ applying updates or configuration changes for the lifetime of the application or
378376
portfolio.
379377

380378
CodeIgniter provisions
381-
======================
379+
----------------------
382380

383381
- Easy :ref:`app-starter-upgrading` by Composer
384382

385-
***************************************************
386383
A07:2021 Identification and Authentication Failures
387-
***************************************************
384+
===================================================
388385

389386
Confirmation of the user's identity, authentication, and session management is
390387
critical to protect against authentication-related attacks. There may be
@@ -406,7 +403,7 @@ authentication weaknesses if the application:
406403
or a period of inactivity.
407404

408405
OWASP recommendations
409-
=====================
406+
---------------------
410407

411408
- Where possible, implement multi-factor authentication to prevent automated
412409
credential stuffing, brute force, and stolen credential reuse attacks.
@@ -427,15 +424,14 @@ OWASP recommendations
427424
timeouts.
428425

429426
CodeIgniter provisions
430-
======================
427+
----------------------
431428

432429
- :doc:`Session <../libraries/sessions>` library
433430
- An official authentication and authorization framework
434431
:ref:`CodeIgniter Shield <shield>`
435432

436-
*********************************************
437433
A08:2021 Software and Data Integrity Failures
438-
*********************************************
434+
=============================================
439435

440436
Software and data integrity failures relate to code and infrastructure that does
441437
not protect against integrity violations. An example of this is where an application
@@ -452,7 +448,7 @@ Another example is where objects or data are encoded or serialized into a struct
452448
that an attacker can see and modify is vulnerable to insecure deserialization.
453449

454450
OWASP recommendations
455-
=====================
451+
---------------------
456452

457453
- Use digital signatures or similar mechanisms to verify the software or data is
458454
from the expected source and has not been altered.
@@ -473,13 +469,12 @@ OWASP recommendations
473469
tampering or replay of the serialized data
474470

475471
CodeIgniter provisions
476-
======================
472+
----------------------
477473

478474
- n/a
479475

480-
*************************************************
481476
A09:2021 Security Logging and Monitoring Failures
482-
*************************************************
477+
=================================================
483478

484479
This category is to help detect, escalate, and respond to active breaches. Without
485480
logging and monitoring, breaches cannot be detected. Insufficient logging, detection,
@@ -501,7 +496,7 @@ You are vulnerable to information leakage by making logging and alerting events
501496
visible to a user or an attacker (see A01:2021-Broken Access Control).
502497

503498
OWASP recommendations
504-
=====================
499+
---------------------
505500

506501
Developers should implement some or all the following controls, depending on the risk of the application:
507502

@@ -525,15 +520,14 @@ such as the Elasticsearch, Logstash, Kibana (ELK) stack, that feature custom
525520
dashboards and alerting.
526521

527522
CodeIgniter provisions
528-
======================
523+
----------------------
529524

530525
- :doc:`Logging <../general/logging>` library
531526
- An official authentication and authorization framework
532527
:ref:`CodeIgniter Shield <shield>`
533528

534-
*******************************************
535529
A10:2021 Server-Side Request Forgery (SSRF)
536-
*******************************************
530+
===========================================
537531

538532
SSRF flaws occur whenever a web application is fetching a remote resource without
539533
validating the user-supplied URL. It allows an attacker to coerce the application
@@ -546,7 +540,7 @@ Also, the severity of SSRF is becoming higher due to cloud services and the
546540
complexity of architectures.
547541

548542
OWASP recommendations
549-
=====================
543+
---------------------
550544

551545
Developers can prevent SSRF by implementing some or all the following defense in
552546
depth controls:
@@ -578,7 +572,7 @@ Do not mitigate SSRF via the use of a deny list or regular expression. Attackers
578572
have payload lists, tools, and skills to bypass deny lists.
579573

580574
CodeIgniter provisions
581-
======================
575+
----------------------
582576

583577
- :doc:`../libraries/validation` library
584578
- :doc:`HTTP library <../incoming/incomingrequest>` provides for

0 commit comments

Comments
 (0)