From 57c12af7873709e9a660042450cf2bc9d64d02ac Mon Sep 17 00:00:00 2001
From: Debajit Kumar Phukan
<71944582+DebajitKumarPhukan@users.noreply.github.com>
Date: Sat, 14 Sep 2024 22:45:19 +0530
Subject: [PATCH] Improved documentation (#853)
* Updated README.md
---
README.md | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 2956cc916..613a441f4 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ specific Jakarta version of ESAPI, in Maven, you would specify your ESAPI depend
org.owasp.esapi
esapi
- 2.5.3.0-SNAPSHOT
+ 2.5.4.0
jakarta
```
@@ -46,6 +46,41 @@ fact, without the
```
that's the version that will be used by default.
+# Quickstart - Maven Example
+### Step 1: Add the required maven dependencies.
+```xml
+
+ org.owasp.esapi
+ esapi
+ 2.5.3.0 [or later]
+ jakarta
+
+
+
+ jakarta.servlet
+ jakarta.servlet-api
+ 6.1.0
+ provided
+
+```
+### Step 2: Create 2 properties file namely: ESAPI.properties and validation.properties and add them to your classpath. You can refer to below for boilerplate configurations.
+[ESAPI.properties](https://github.com/ESAPI/esapi-java-legacy/blob/develop/configuration/esapi/ESAPI.properties)
+[validation.properties](https://github.com/ESAPI/esapi-java-legacy/blob/develop/configuration/esapi/validation.properties)
+
+### Step 3: Let's say, you want to remediate log injection vulnerabilities. Below is an example to achieve it.
+```code
+import org.owasp.esapi.ESAPI;
+import org.owasp.esapi.Logger;
+
+public class Example {
+ private static Logger LOGGER = ESAPI.getLogger(Example.class);
+ public void printLog(){
+ LOGGER.info(Logger.EVENT_SUCCESS, "Log injection remediated !");
+ }
+}
+```
+For more examples, please visit [https://owasp.org/www-project-enterprise-security-api/](https://owasp.org/www-project-enterprise-security-api/).
+
# A word about ESAPI vulnerabilities
A summary of all the vulnerabilities that we have written about in either the
ESAPI Security Bulletins or in the GitHub Security Advisories may be found