Skip to content

Commit 57c12af

Browse files
Improved documentation (#853)
* Updated README.md
1 parent cb02efe commit 57c12af

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ specific Jakarta version of ESAPI, in Maven, you would specify your ESAPI depend
3030
<dependency>
3131
<groupId>org.owasp.esapi</groupId>
3232
<artifactId>esapi</artifactId>
33-
<version>2.5.3.0-SNAPSHOT</version>
33+
<version>2.5.4.0</version>
3434
<classifier>jakarta</classifier>
3535
</dependency>
3636
```
@@ -46,6 +46,41 @@ fact, without the
4646
```
4747
that's the version that will be used by default.
4848

49+
# Quickstart - Maven Example
50+
### Step 1: Add the required maven dependencies.
51+
```xml
52+
<dependency>
53+
<groupId>org.owasp.esapi</groupId>
54+
<artifactId>esapi</artifactId>
55+
<version>2.5.3.0 [or later]</version>
56+
<classifier>jakarta</classifier>
57+
</dependency>
58+
<!-- Add the below dependency if the not using JakartaEE -->
59+
<dependency>
60+
<groupId>jakarta.servlet</groupId>
61+
<artifactId>jakarta.servlet-api</artifactId>
62+
<version>6.1.0</version>
63+
<scope>provided</scope>
64+
</dependency>
65+
```
66+
### 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.
67+
[ESAPI.properties](https://github.com/ESAPI/esapi-java-legacy/blob/develop/configuration/esapi/ESAPI.properties) <br/>
68+
[validation.properties](https://github.com/ESAPI/esapi-java-legacy/blob/develop/configuration/esapi/validation.properties)
69+
70+
### Step 3: Let's say, you want to remediate log injection vulnerabilities. Below is an example to achieve it.
71+
```code
72+
import org.owasp.esapi.ESAPI;
73+
import org.owasp.esapi.Logger;
74+
75+
public class Example {
76+
private static Logger LOGGER = ESAPI.getLogger(Example.class);
77+
public void printLog(){
78+
LOGGER.info(Logger.EVENT_SUCCESS, "Log injection remediated !");
79+
}
80+
}
81+
```
82+
For more examples, please visit [https://owasp.org/www-project-enterprise-security-api/](https://owasp.org/www-project-enterprise-security-api/).
83+
4984
# A word about ESAPI vulnerabilities
5085
A summary of all the vulnerabilities that we have written about in either the
5186
ESAPI Security Bulletins or in the GitHub Security Advisories may be found

0 commit comments

Comments
 (0)