Shescape
A simple shell escape library for JavaScript. Use it to escape user-controlled
inputs to shell commands to prevent shell injection.
Quick links:
npm |
Source code |
License |
Changelog |
Security
Features
- Advanced shell detection
- Lightweight
- Supports MacOS, Linux, and Windows
- Prevents environment variable access
Shells
The following shells are officially supported and extensively tested. It is
recommended to only use shells found in this list.
If you want to use Shescape with another shell you can request it on GitHub by
opening an issue.
Usage
Install
-
Install shescape
:
npm install shescape
-
Import shescape
:
import { Shescape } from "shescape";
-
Initialize Shescape
.
const shescape = new Shescape(/* options */);
-
Use shescape
.
Migrating from v1
View the migration guidelines for help.
Recipes
View the recipes for examples of how to use Shescape.
API
View the API documentation of Shescape.
Testing
View the testing documentation for how to test code that uses Shescape.
Further Reading
Read the tips for additional ways to protect against shell injection.
License
The source code is licensed under the MPL-2.0
license, see LICENSE for
the full license text. The documentation text is licensed under CC BY-SA 4.0;
code snippets under the MIT license.
Supporting code, such a scripts and tests, is generally licensed under the MIT
license. However, individual files may be licensed differently depending on the
intend or origin.
The license under which a given file is available can always be found in the
file's banner comment.
Current Tags
50 Versions
-
2.1.0
...
a year ago
-
2.0.2
...
a year ago
-
2.0.1
...
a year ago
-
2.0.0
...
a year ago
-
2.0.0-rc3
[deprecated]
...
a year ago
-
1.7.4
[deprecated]
...
a year ago
-
2.0.0-rc2
[deprecated]
...
a year ago
-
1.7.3
[deprecated]
...
a year ago
-
2.0.0-rc1
[deprecated]
...
a year ago
-
1.7.2
[deprecated]
...
a year ago
-
1.7.1
[deprecated]
...
a year ago
-
1.7.0
[deprecated]
...
a year ago
-
1.6.7
[deprecated]
...
2 years ago
-
1.6.6
[deprecated]
...
2 years ago
-
1.6.5
[deprecated]
...
2 years ago
-
1.6.4
[deprecated]
...
2 years ago
-
1.6.3
[deprecated]
...
2 years ago
-
1.6.2
[deprecated]
...
2 years ago
-
1.6.1
[deprecated]
...
2 years ago
-
1.6.0
[deprecated]
...
2 years ago
-
1.5.10
[deprecated]
...
2 years ago
-
1.5.9
[deprecated]
...
2 years ago
-
1.5.8
[deprecated]
...
2 years ago
-
1.5.7
[deprecated]
...
2 years ago
-
1.5.6
[deprecated]
...
2 years ago
-
1.5.5
[deprecated]
...
2 years ago
-
1.5.4
[deprecated]
...
3 years ago
-
1.5.3
[deprecated]
...
3 years ago
-
1.5.2
[deprecated]
...
3 years ago
-
1.5.1
[deprecated]
...
3 years ago
-
1.5.0
[deprecated]
...
3 years ago
-
1.4.0
[deprecated]
...
3 years ago
-
1.3.3
[deprecated]
...
3 years ago
-
1.3.2
[deprecated]
...
3 years ago
-
1.3.1
[deprecated]
...
3 years ago
-
1.3.0
[deprecated]
...
3 years ago
-
1.2.1
[deprecated]
...
4 years ago
-
1.2.0
[deprecated]
...
4 years ago
-
1.1.3
[deprecated]
...
4 years ago
-
1.1.2
[deprecated]
...
4 years ago
-
1.1.1
[deprecated]
...
4 years ago
-
1.1.0
[deprecated]
...
4 years ago
-
1.0.0
[deprecated]
...
4 years ago
-
0.4.1
[deprecated]
...
4 years ago
-
0.4.0
[deprecated]
...
4 years ago
-
0.3.1
[deprecated]
...
4 years ago
-
0.3.0
[deprecated]
...
4 years ago
-
0.2.1
[deprecated]
...
4 years ago
-
0.2.0
[deprecated]
...
4 years ago
-
0.1.0
[deprecated]
...
4 years ago