Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved documentation #853

Merged
merged 7 commits into from
Sep 14, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ specific Jakarta version of ESAPI, in Maven, you would specify your ESAPI depend
<dependency>
<groupId>org.owasp.esapi</groupId>
<artifactId>esapi</artifactId>
<version>2.5.3.0-SNAPSHOT</version>
DebajitKumarPhukan marked this conversation as resolved.
Show resolved Hide resolved
<version>2.5.4.0</version>
<classifier>jakarta</classifier>
</dependency>
```
Expand All @@ -46,6 +46,38 @@ fact, without the
```
that's the version that will be used by default.

# Quickstart - Maven Example
DebajitKumarPhukan marked this conversation as resolved.
Show resolved Hide resolved
### Step 1: Add the required maven dependencies.
```xml
<dependency>
<groupId>org.owasp.esapi</groupId>
<artifactId>esapi</artifactId>
<version>2.5.4.0</version>
<classifier>jakarta</classifier>
</dependency>
<dependency>
DebajitKumarPhukan marked this conversation as resolved.
Show resolved Hide resolved
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>
```
### Step 2: Download the ESAPI.properties and validation.properties from below locations and put it in your classpath.
[ESAPI.properties](https://github.com/ESAPI/esapi-java-legacy/blob/develop/configuration/esapi/ESAPI.properties) <br/>
[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.
DebajitKumarPhukan marked this conversation as resolved.
Show resolved Hide resolved
```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 !");
}
}
```
# 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
Expand Down
Loading