@@ -17,11 +17,14 @@ the CodeIgniter provisions to address the problem.
17
17
18
18
.. contents ::
19
19
:local:
20
- :depth: 1
20
+ :depth: 2
21
+
22
+ *****************
23
+ OWASP Top 10 2021
24
+ *****************
21
25
22
- ******************************
23
26
A01:2021 Broken Access Control
24
- ******************************
27
+ ==============================
25
28
26
29
Access control enforces policy such that users cannot act outside of their intended
27
30
permissions. Failures typically lead to unauthorized information disclosure,
@@ -49,7 +52,7 @@ Common access control vulnerabilities include:
49
52
pages as a standard user.
50
53
51
54
OWASP recommendations
52
- =====================
55
+ ---------------------
53
56
54
57
Access control is only effective in trusted server-side code or server-less API,
55
58
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.
71
74
follow the OAuth standards to revoke access.
72
75
73
76
CodeIgniter provisions
74
- ======================
77
+ ----------------------
75
78
76
79
- :ref: `Public <application-structure-public >` folder, with application and system
77
80
outside
@@ -83,9 +86,8 @@ CodeIgniter provisions
83
86
- An official authentication and authorization framework :ref: `CodeIgniter Shield <shield >`
84
87
- Easy to add third party authentication
85
88
86
- *******************************
87
89
A02:2021 Cryptographic Failures
88
- *******************************
90
+ ===============================
89
91
90
92
The first thing is to determine the protection needs of data in transit and at
91
93
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
123
125
example in the form of padding oracle attacks?
124
126
125
127
OWASP recommendations
126
- =====================
128
+ ---------------------
127
129
128
130
Do the following, at a minimum, and consult the references:
129
131
@@ -161,7 +163,7 @@ Do the following, at a minimum, and consult the references:
161
163
- Verify independently the effectiveness of configuration and settings.
162
164
163
165
CodeIgniter provisions
164
- ======================
166
+ ----------------------
165
167
166
168
- The config for global secure access (``Config\App::$forceGlobalSecureRequests ``)
167
169
- :php:func: `force_https() ` function
@@ -170,9 +172,8 @@ CodeIgniter provisions
170
172
- An official authentication and authorization framework
171
173
:ref: `CodeIgniter Shield <shield >`
172
174
173
- ******************
174
175
A03:2021 Injection
175
- ******************
176
+ ==================
176
177
177
178
An application is vulnerable to attack when:
178
179
@@ -194,7 +195,7 @@ dynamic (DAST), and interactive (IAST) application security testing tools into
194
195
the CI/CD pipeline to identify introduced injection flaws before production deployment.
195
196
196
197
OWASP recommendations
197
- =====================
198
+ ---------------------
198
199
199
200
Preventing injection requires keeping data separate from commands and queries:
200
201
@@ -218,7 +219,7 @@ Preventing injection requires keeping data separate from commands and queries:
218
219
records in case of SQL injection.
219
220
220
221
CodeIgniter provisions
221
- ======================
222
+ ----------------------
222
223
223
224
- :ref: `invalidchars ` filter
224
225
- :doc: `../libraries/validation ` library
@@ -230,9 +231,8 @@ CodeIgniter provisions
230
231
- :ref: `Database escape methods <database-queries-escaping >`
231
232
- :ref: `database-queries-query-bindings `
232
233
233
- ************************
234
234
A04:2021 Insecure Design
235
- ************************
235
+ ========================
236
236
237
237
Insecure design is a broad category representing different weaknesses, expressed
238
238
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
248
248
and thus the failure to determine what level of security design is required.
249
249
250
250
OWASP recommendations
251
- =====================
251
+ ---------------------
252
252
253
253
- Establish and use a secure development lifecycle with AppSec professionals to
254
254
help evaluate and design security and privacy-related controls
@@ -268,15 +268,14 @@ OWASP recommendations
268
268
- Limit resource consumption by user or service
269
269
270
270
CodeIgniter provisions
271
- ======================
271
+ ----------------------
272
272
273
273
- :doc: `PHPUnit testing <../testing/overview >`
274
274
- :doc: `../libraries/throttler ` for rate limit
275
275
- An official authentication and authorization framework :ref: `CodeIgniter Shield <shield >`
276
276
277
- **********************************
278
277
A05:2021 Security Misconfiguration
279
- **********************************
278
+ ==================================
280
279
281
280
The application might be vulnerable if the application is:
282
281
@@ -300,7 +299,7 @@ Without a concerted, repeatable application security configuration process,
300
299
systems are at a higher risk.
301
300
302
301
OWASP recommendations
303
- =====================
302
+ ---------------------
304
303
305
304
Secure installation processes should be implemented, including:
306
305
@@ -322,14 +321,13 @@ Secure installation processes should be implemented, including:
322
321
settings in all environments.
323
322
324
323
CodeIgniter provisions
325
- ======================
324
+ ----------------------
326
325
327
326
- :ref: `Production mode <environment-constant >` by default
328
327
- :ref: `secureheaders ` filter
329
328
330
- *******************************************
331
329
A06:2021 Vulnerable and Outdated Components
332
- *******************************************
330
+ ===========================================
333
331
334
332
You are likely vulnerable:
335
333
@@ -351,7 +349,7 @@ You are likely vulnerable:
351
349
Misconfiguration).
352
350
353
351
OWASP recommendations
354
- =====================
352
+ ---------------------
355
353
356
354
There should be a patch management process in place to:
357
355
@@ -377,13 +375,12 @@ applying updates or configuration changes for the lifetime of the application or
377
375
portfolio.
378
376
379
377
CodeIgniter provisions
380
- ======================
378
+ ----------------------
381
379
382
380
- Easy :ref: `app-starter-upgrading ` by Composer
383
381
384
- ***************************************************
385
382
A07:2021 Identification and Authentication Failures
386
- ***************************************************
383
+ ===================================================
387
384
388
385
Confirmation of the user's identity, authentication, and session management is
389
386
critical to protect against authentication-related attacks. There may be
@@ -405,7 +402,7 @@ authentication weaknesses if the application:
405
402
or a period of inactivity.
406
403
407
404
OWASP recommendations
408
- =====================
405
+ ---------------------
409
406
410
407
- Where possible, implement multi-factor authentication to prevent automated
411
408
credential stuffing, brute force, and stolen credential reuse attacks.
@@ -426,15 +423,14 @@ OWASP recommendations
426
423
timeouts.
427
424
428
425
CodeIgniter provisions
429
- ======================
426
+ ----------------------
430
427
431
428
- :doc: `Session <../libraries/sessions >` library
432
429
- An official authentication and authorization framework
433
430
:ref: `CodeIgniter Shield <shield >`
434
431
435
- *********************************************
436
432
A08:2021 Software and Data Integrity Failures
437
- *********************************************
433
+ =============================================
438
434
439
435
Software and data integrity failures relate to code and infrastructure that does
440
436
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
451
447
that an attacker can see and modify is vulnerable to insecure deserialization.
452
448
453
449
OWASP recommendations
454
- =====================
450
+ ---------------------
455
451
456
452
- Use digital signatures or similar mechanisms to verify the software or data is
457
453
from the expected source and has not been altered.
@@ -472,13 +468,12 @@ OWASP recommendations
472
468
tampering or replay of the serialized data
473
469
474
470
CodeIgniter provisions
475
- ======================
471
+ ----------------------
476
472
477
473
- n/a
478
474
479
- *************************************************
480
475
A09:2021 Security Logging and Monitoring Failures
481
- *************************************************
476
+ =================================================
482
477
483
478
This category is to help detect, escalate, and respond to active breaches. Without
484
479
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
500
495
visible to a user or an attacker (see A01:2021-Broken Access Control).
501
496
502
497
OWASP recommendations
503
- =====================
498
+ ---------------------
504
499
505
500
Developers should implement some or all the following controls, depending on the risk of the application:
506
501
@@ -524,15 +519,14 @@ such as the Elasticsearch, Logstash, Kibana (ELK) stack, that feature custom
524
519
dashboards and alerting.
525
520
526
521
CodeIgniter provisions
527
- ======================
522
+ ----------------------
528
523
529
524
- :doc: `Logging <../general/logging >` library
530
525
- An official authentication and authorization framework
531
526
:ref: `CodeIgniter Shield <shield >`
532
527
533
- *******************************************
534
528
A10:2021 Server-Side Request Forgery (SSRF)
535
- *******************************************
529
+ ===========================================
536
530
537
531
SSRF flaws occur whenever a web application is fetching a remote resource without
538
532
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
545
539
complexity of architectures.
546
540
547
541
OWASP recommendations
548
- =====================
542
+ ---------------------
549
543
550
544
Developers can prevent SSRF by implementing some or all the following defense in
551
545
depth controls:
@@ -577,7 +571,7 @@ Do not mitigate SSRF via the use of a deny list or regular expression. Attackers
577
571
have payload lists, tools, and skills to bypass deny lists.
578
572
579
573
CodeIgniter provisions
580
- ======================
574
+ ----------------------
581
575
582
576
- :doc: `../libraries/validation ` library
583
577
- :doc: `HTTP library <../incoming/incomingrequest >` provides for
0 commit comments