Skip to content

Improved documentation #853

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

Merged
merged 7 commits into from
Sep 14, 2024
Merged
Changes from all 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
37 changes: 36 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>
<version>2.5.4.0</version>
<classifier>jakarta</classifier>
</dependency>
```
Expand All @@ -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
<dependency>
<groupId>org.owasp.esapi</groupId>
<artifactId>esapi</artifactId>
<version>2.5.3.0 [or later]</version>
<classifier>jakarta</classifier>
</dependency>
<!-- Add the below dependency if the not using JakartaEE -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>
```
### 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) <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.
```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
Expand Down
Loading