# coverity-security-library
**Repository Path**: ivanmao/coverity-security-library
## Basic Information
- **Project Name**: coverity-security-library
- **Description**: Coverity Security Library (CSL) is a lightweight set of escaping routines for fixing cross-site scripting (XSS), SQL injection, and other security defects in Java web applications.
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2020-03-31
- **Last Updated**: 2024-12-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Coverity Security Library
The Coverity Security Library (CSL) is a lightweight set of escaping routines for fixing cross-site scripting (XSS), SQL injection, and other security defects in Java web applications.
Here's why it's worth checking out:
* **It's secure:** We take the security of CSL seriously. Every change is carefully scrutinized through a process that includes manual code review, static analysis, fuzz testing, and unit testing.
* **It's convenient:** CSL contains escapers for XSS and SQL injection that are missing from standard libraries like Apache Commons and Java EE. We use fast, easy to invoke static methods with short, intuitive names. We also provide hooks for Expression Language (EL) to make it easy to use within JSPs.
* **It's small:** CSL has no external dependencies and is a minimalist library. This means it's fast and does not require any configuration besides dropping a JAR in the right location or modifying your build to do it.
* **It's free:** CSL is distributed under a BSD-style license. We would appreciate patches be sent back to us but it's not required.
Users of Coverity Security Advisor get remediation guidance based on escaping routines in CSL. However, CSL is a standalone project with no dependencies on Security Advisor.
## Escape
The [Escape class](https://github.com/coverity/coverity-security-library/tree/develop/coverity-escapers) contains several escapers for web content. These escaping functions help remedy common defects (mostly cross-site scripting) that occur when the data is inserted into HTML element, HTML attribute values, URI, JavaScript strings, SQL LIKE clauses, etc. More information are available in the [Escape directory](https://github.com/coverity/coverity-security-library/tree/develop/coverity-escapers).
Before using any of these methods, you should understand the context (or nested contexts) in which the data is inserted. [Several mockup examples with explanation](https://github.com/coverity/coverity-security-library/tree/develop/coverity-escapers/samples/mockup-examples) are available in the repository, and more will be available on [our blog](https://communities.coverity.com/blogs/security).
If you want to test the library to understand how it whistands security attacks, our [functional testsuite](https://github.com/coverity/coverity-security-library/tree/develop/coverity-escapers/samples/functional-testsuite) is the right app to build/deploy/test.
Ready to use it? One last step is to have a look at [the latest javadoc](http://coverity.github.com/coverity-security-library) directly on github.
To include this library into your Maven project, add the following:
```xml
WEB-INF/lib directory.
Then you can use it directly in your JSPs:
```jsp
<%@ taglib uri="http://coverity.com/security" prefix="cov" %>