@@ -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- ******************************
2326A01:2021 Broken Access Control
24- ******************************
27+ ==============================
2528
2629Access control enforces policy such that users cannot act outside of their intended
2730permissions. Failures typically lead to unauthorized information disclosure,
@@ -49,7 +52,7 @@ Common access control vulnerabilities include:
4952 pages as a standard user.
5053
5154OWASP recommendations
52- =====================
55+ ---------------------
5356
5457Access control is only effective in trusted server-side code or server-less API,
5558where 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
7376CodeIgniter 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- *******************************
8789A02:2021 Cryptographic Failures
88- *******************************
90+ ===============================
8991
9092The first thing is to determine the protection needs of data in transit and at
9193rest. 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
125127OWASP recommendations
126- =====================
128+ ---------------------
127129
128130Do 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
163165CodeIgniter 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- ******************
174175A03:2021 Injection
175- ******************
176+ ==================
176177
177178An application is vulnerable to attack when:
178179
@@ -194,7 +195,7 @@ dynamic (DAST), and interactive (IAST) application security testing tools into
194195the CI/CD pipeline to identify introduced injection flaws before production deployment.
195196
196197OWASP recommendations
197- =====================
198+ ---------------------
198199
199200Preventing 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
220221CodeIgniter 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- ************************
235235A04:2021 Insecure Design
236- ************************
236+ ========================
237237
238238Insecure design is a broad category representing different weaknesses, expressed
239239as “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
249249and thus the failure to determine what level of security design is required.
250250
251251OWASP 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
271271CodeIgniter 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- **********************************
279278A05:2021 Security Misconfiguration
280- **********************************
279+ ==================================
281280
282281The application might be vulnerable if the application is:
283282
@@ -301,7 +300,7 @@ Without a concerted, repeatable application security configuration process,
301300systems are at a higher risk.
302301
303302OWASP recommendations
304- =====================
303+ ---------------------
305304
306305Secure installation processes should be implemented, including:
307306
@@ -323,14 +322,13 @@ Secure installation processes should be implemented, including:
323322 settings in all environments.
324323
325324CodeIgniter provisions
326- ======================
325+ ----------------------
327326
328327- :ref: `Production mode <environment-constant >` by default
329328- :ref: `secureheaders ` filter
330329
331- *******************************************
332330A06:2021 Vulnerable and Outdated Components
333- *******************************************
331+ ===========================================
334332
335333You are likely vulnerable:
336334
@@ -352,7 +350,7 @@ You are likely vulnerable:
352350 Misconfiguration).
353351
354352OWASP recommendations
355- =====================
353+ ---------------------
356354
357355There 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
378376portfolio.
379377
380378CodeIgniter provisions
381- ======================
379+ ----------------------
382380
383381- Easy :ref: `app-starter-upgrading ` by Composer
384382
385- ***************************************************
386383A07:2021 Identification and Authentication Failures
387- ***************************************************
384+ ===================================================
388385
389386Confirmation of the user's identity, authentication, and session management is
390387critical 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
408405OWASP 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
429426CodeIgniter provisions
430- ======================
427+ ----------------------
431428
432429- :doc: `Session <../libraries/sessions >` library
433430- An official authentication and authorization framework
434431 :ref: `CodeIgniter Shield <shield >`
435432
436- *********************************************
437433A08:2021 Software and Data Integrity Failures
438- *********************************************
434+ =============================================
439435
440436Software and data integrity failures relate to code and infrastructure that does
441437not 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
452448that an attacker can see and modify is vulnerable to insecure deserialization.
453449
454450OWASP 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
475471CodeIgniter provisions
476- ======================
472+ ----------------------
477473
478474- n/a
479475
480- *************************************************
481476A09:2021 Security Logging and Monitoring Failures
482- *************************************************
477+ =================================================
483478
484479This category is to help detect, escalate, and respond to active breaches. Without
485480logging 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
501496visible to a user or an attacker (see A01:2021-Broken Access Control).
502497
503498OWASP recommendations
504- =====================
499+ ---------------------
505500
506501Developers 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
525520dashboards and alerting.
526521
527522CodeIgniter provisions
528- ======================
523+ ----------------------
529524
530525- :doc: `Logging <../general/logging >` library
531526- An official authentication and authorization framework
532527 :ref: `CodeIgniter Shield <shield >`
533528
534- *******************************************
535529A10:2021 Server-Side Request Forgery (SSRF)
536- *******************************************
530+ ===========================================
537531
538532SSRF flaws occur whenever a web application is fetching a remote resource without
539533validating 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
546540complexity of architectures.
547541
548542OWASP recommendations
549- =====================
543+ ---------------------
550544
551545Developers can prevent SSRF by implementing some or all the following defense in
552546depth controls:
@@ -578,7 +572,7 @@ Do not mitigate SSRF via the use of a deny list or regular expression. Attackers
578572have payload lists, tools, and skills to bypass deny lists.
579573
580574CodeIgniter provisions
581- ======================
575+ ----------------------
582576
583577- :doc: `../libraries/validation ` library
584578- :doc: `HTTP library <../incoming/incomingrequest >` provides for
0 commit comments