Skip to content

Commit 2a0e0d0

Browse files
committed
docs: add sub section OWASP Top 10 2021
1 parent b57be10 commit 2a0e0d0

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:`invalidchars` filter
224225
- :doc:`../libraries/validation` library
@@ -230,9 +231,8 @@ CodeIgniter provisions
230231
- :ref:`Database escape methods <database-queries-escaping>`
231232
- :ref:`database-queries-query-bindings`
232233

233-
************************
234234
A04:2021 Insecure Design
235-
************************
235+
========================
236236

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

250250
OWASP recommendations
251-
=====================
251+
---------------------
252252

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

270270
CodeIgniter provisions
271-
======================
271+
----------------------
272272

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

277-
**********************************
278277
A05:2021 Security Misconfiguration
279-
**********************************
278+
==================================
280279

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

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

302301
OWASP recommendations
303-
=====================
302+
---------------------
304303

305304
Secure installation processes should be implemented, including:
306305

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

324323
CodeIgniter provisions
325-
======================
324+
----------------------
326325

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

330-
*******************************************
331329
A06:2021 Vulnerable and Outdated Components
332-
*******************************************
330+
===========================================
333331

334332
You are likely vulnerable:
335333

@@ -351,7 +349,7 @@ You are likely vulnerable:
351349
Misconfiguration).
352350

353351
OWASP recommendations
354-
=====================
352+
---------------------
355353

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

@@ -377,13 +375,12 @@ applying updates or configuration changes for the lifetime of the application or
377375
portfolio.
378376

379377
CodeIgniter provisions
380-
======================
378+
----------------------
381379

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

384-
***************************************************
385382
A07:2021 Identification and Authentication Failures
386-
***************************************************
383+
===================================================
387384

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

407404
OWASP recommendations
408-
=====================
405+
---------------------
409406

410407
- Where possible, implement multi-factor authentication to prevent automated
411408
credential stuffing, brute force, and stolen credential reuse attacks.
@@ -426,15 +423,14 @@ OWASP recommendations
426423
timeouts.
427424

428425
CodeIgniter provisions
429-
======================
426+
----------------------
430427

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

435-
*********************************************
436432
A08:2021 Software and Data Integrity Failures
437-
*********************************************
433+
=============================================
438434

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

453449
OWASP recommendations
454-
=====================
450+
---------------------
455451

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

474470
CodeIgniter provisions
475-
======================
471+
----------------------
476472

477473
- n/a
478474

479-
*************************************************
480475
A09:2021 Security Logging and Monitoring Failures
481-
*************************************************
476+
=================================================
482477

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

502497
OWASP recommendations
503-
=====================
498+
---------------------
504499

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

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

526521
CodeIgniter provisions
527-
======================
522+
----------------------
528523

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

533-
*******************************************
534528
A10:2021 Server-Side Request Forgery (SSRF)
535-
*******************************************
529+
===========================================
536530

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

547541
OWASP recommendations
548-
=====================
542+
---------------------
549543

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

579573
CodeIgniter provisions
580-
======================
574+
----------------------
581575

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

0 commit comments

Comments
 (0)