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.
Getting Started
- Look at the use cases for Shescape.
- Check the recipes for examples of how to use Shescape.
- Read the tips for additional ways to protect against shell injection.
- Having trouble? See the troubleshooting document for help.
Migrating from v1
View the migration guidelines for help.
API
View the API documentation of Shescape.
Testing
View the testing documentation for how to test code that uses Shescape.
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-0 license.
Supporting code (scripts and tests) is generally licensed under the MIT or
MIT-0 license. Individual files may be licensed differently depending on the
intent or origin.
The license under which a given file is available can always be found in the
file's banner comment.
Current Tags
61 Versions
-
2.1.11
...
3 days ago
-
2.1.10
...
a month ago
-
2.1.9
...
a month ago
-
2.1.8
...
3 months ago
-
2.1.7
...
5 months ago
-
2.1.6
...
9 months ago
-
2.1.5
...
10 months ago
-
2.1.4
...
10 months ago
-
2.1.3
...
a year ago
-
2.1.2
...
a year ago
-
2.1.1
...
2 years ago
-
2.1.0
...
2 years ago
-
2.0.2
...
2 years ago
-
2.0.1
...
2 years ago
-
2.0.0
...
3 years ago
-
2.0.0-rc3
[deprecated]
...
3 years ago
-
1.7.4
[deprecated]
...
3 years ago
-
2.0.0-rc2
[deprecated]
...
3 years ago
-
1.7.3
[deprecated]
...
3 years ago
-
2.0.0-rc1
[deprecated]
...
3 years ago
-
1.7.2
[deprecated]
...
3 years ago
-
1.7.1
[deprecated]
...
3 years ago
-
1.7.0
[deprecated]
...
3 years ago
-
1.6.7
[deprecated]
...
3 years ago
-
1.6.6
[deprecated]
...
3 years ago
-
1.6.5
[deprecated]
...
3 years ago
-
1.6.4
[deprecated]
...
3 years ago
-
1.6.3
[deprecated]
...
3 years ago
-
1.6.2
[deprecated]
...
3 years ago
-
1.6.1
[deprecated]
...
3 years ago
-
1.6.0
[deprecated]
...
3 years ago
-
1.5.10
[deprecated]
...
4 years ago
-
1.5.9
[deprecated]
...
4 years ago
-
1.5.8
[deprecated]
...
4 years ago
-
1.5.7
[deprecated]
...
4 years ago
-
1.5.6
[deprecated]
...
4 years ago
-
1.5.5
[deprecated]
...
4 years ago
-
1.5.4
[deprecated]
...
4 years ago
-
1.5.3
[deprecated]
...
4 years ago
-
1.5.2
[deprecated]
...
4 years ago
-
1.5.1
[deprecated]
...
4 years ago
-
1.5.0
[deprecated]
...
4 years ago
-
1.4.0
[deprecated]
...
4 years ago
-
1.3.3
[deprecated]
...
4 years ago
-
1.3.2
[deprecated]
...
4 years ago
-
1.3.1
[deprecated]
...
4 years ago
-
1.3.0
[deprecated]
...
4 years ago
-
1.2.1
[deprecated]
...
5 years ago
-
1.2.0
[deprecated]
...
5 years ago
-
1.1.3
[deprecated]
...
5 years ago
-
1.1.2
[deprecated]
...
5 years ago
-
1.1.1
[deprecated]
...
5 years ago
-
1.1.0
[deprecated]
...
5 years ago
-
1.0.0
[deprecated]
...
5 years ago
-
0.4.1
[deprecated]
...
5 years ago
-
0.4.0
[deprecated]
...
5 years ago
-
0.3.1
[deprecated]
...
5 years ago
-
0.3.0
[deprecated]
...
5 years ago
-
0.2.1
[deprecated]
...
5 years ago
-
0.2.0
[deprecated]
...
5 years ago
-
0.1.0
[deprecated]
...
5 years ago