@@ -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: `urls-uri-security `
224
225
- :ref: `invalidchars ` filter
@@ -231,9 +232,8 @@ CodeIgniter provisions
231
232
- :ref: `Database escape methods <database-queries-escaping >`
232
233
- :ref: `database-queries-query-bindings `
233
234
234
- ************************
235
235
A04:2021 Insecure Design
236
- ************************
236
+ ========================
237
237
238
238
Insecure design is a broad category representing different weaknesses, expressed
239
239
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
249
249
and thus the failure to determine what level of security design is required.
250
250
251
251
OWASP recommendations
252
- =====================
252
+ ---------------------
253
253
254
254
- Establish and use a secure development lifecycle with AppSec professionals to
255
255
help evaluate and design security and privacy-related controls
@@ -269,15 +269,14 @@ OWASP recommendations
269
269
- Limit resource consumption by user or service
270
270
271
271
CodeIgniter provisions
272
- ======================
272
+ ----------------------
273
273
274
274
- :doc: `PHPUnit testing <../testing/overview >`
275
275
- :doc: `../libraries/throttler ` for rate limit
276
276
- An official authentication and authorization framework :ref: `CodeIgniter Shield <shield >`
277
277
278
- **********************************
279
278
A05:2021 Security Misconfiguration
280
- **********************************
279
+ ==================================
281
280
282
281
The application might be vulnerable if the application is:
283
282
@@ -301,7 +300,7 @@ Without a concerted, repeatable application security configuration process,
301
300
systems are at a higher risk.
302
301
303
302
OWASP recommendations
304
- =====================
303
+ ---------------------
305
304
306
305
Secure installation processes should be implemented, including:
307
306
@@ -323,14 +322,13 @@ Secure installation processes should be implemented, including:
323
322
settings in all environments.
324
323
325
324
CodeIgniter provisions
326
- ======================
325
+ ----------------------
327
326
328
327
- :ref: `Production mode <environment-constant >` by default
329
328
- :ref: `secureheaders ` filter
330
329
331
- *******************************************
332
330
A06:2021 Vulnerable and Outdated Components
333
- *******************************************
331
+ ===========================================
334
332
335
333
You are likely vulnerable:
336
334
@@ -352,7 +350,7 @@ You are likely vulnerable:
352
350
Misconfiguration).
353
351
354
352
OWASP recommendations
355
- =====================
353
+ ---------------------
356
354
357
355
There should be a patch management process in place to:
358
356
@@ -378,13 +376,12 @@ applying updates or configuration changes for the lifetime of the application or
378
376
portfolio.
379
377
380
378
CodeIgniter provisions
381
- ======================
379
+ ----------------------
382
380
383
381
- Easy :ref: `app-starter-upgrading ` by Composer
384
382
385
- ***************************************************
386
383
A07:2021 Identification and Authentication Failures
387
- ***************************************************
384
+ ===================================================
388
385
389
386
Confirmation of the user's identity, authentication, and session management is
390
387
critical to protect against authentication-related attacks. There may be
@@ -406,7 +403,7 @@ authentication weaknesses if the application:
406
403
or a period of inactivity.
407
404
408
405
OWASP recommendations
409
- =====================
406
+ ---------------------
410
407
411
408
- Where possible, implement multi-factor authentication to prevent automated
412
409
credential stuffing, brute force, and stolen credential reuse attacks.
@@ -427,15 +424,14 @@ OWASP recommendations
427
424
timeouts.
428
425
429
426
CodeIgniter provisions
430
- ======================
427
+ ----------------------
431
428
432
429
- :doc: `Session <../libraries/sessions >` library
433
430
- An official authentication and authorization framework
434
431
:ref: `CodeIgniter Shield <shield >`
435
432
436
- *********************************************
437
433
A08:2021 Software and Data Integrity Failures
438
- *********************************************
434
+ =============================================
439
435
440
436
Software and data integrity failures relate to code and infrastructure that does
441
437
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
452
448
that an attacker can see and modify is vulnerable to insecure deserialization.
453
449
454
450
OWASP recommendations
455
- =====================
451
+ ---------------------
456
452
457
453
- Use digital signatures or similar mechanisms to verify the software or data is
458
454
from the expected source and has not been altered.
@@ -473,13 +469,12 @@ OWASP recommendations
473
469
tampering or replay of the serialized data
474
470
475
471
CodeIgniter provisions
476
- ======================
472
+ ----------------------
477
473
478
474
- n/a
479
475
480
- *************************************************
481
476
A09:2021 Security Logging and Monitoring Failures
482
- *************************************************
477
+ =================================================
483
478
484
479
This category is to help detect, escalate, and respond to active breaches. Without
485
480
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
501
496
visible to a user or an attacker (see A01:2021-Broken Access Control).
502
497
503
498
OWASP recommendations
504
- =====================
499
+ ---------------------
505
500
506
501
Developers should implement some or all the following controls, depending on the risk of the application:
507
502
@@ -525,15 +520,14 @@ such as the Elasticsearch, Logstash, Kibana (ELK) stack, that feature custom
525
520
dashboards and alerting.
526
521
527
522
CodeIgniter provisions
528
- ======================
523
+ ----------------------
529
524
530
525
- :doc: `Logging <../general/logging >` library
531
526
- An official authentication and authorization framework
532
527
:ref: `CodeIgniter Shield <shield >`
533
528
534
- *******************************************
535
529
A10:2021 Server-Side Request Forgery (SSRF)
536
- *******************************************
530
+ ===========================================
537
531
538
532
SSRF flaws occur whenever a web application is fetching a remote resource without
539
533
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
546
540
complexity of architectures.
547
541
548
542
OWASP recommendations
549
- =====================
543
+ ---------------------
550
544
551
545
Developers can prevent SSRF by implementing some or all the following defense in
552
546
depth controls:
@@ -578,7 +572,7 @@ Do not mitigate SSRF via the use of a deny list or regular expression. Attackers
578
572
have payload lists, tools, and skills to bypass deny lists.
579
573
580
574
CodeIgniter provisions
581
- ======================
575
+ ----------------------
582
576
583
577
- :doc: `../libraries/validation ` library
584
578
- :doc: `HTTP library <../incoming/incomingrequest >` provides for
0 commit comments