Skip to content

Commit 3b0d3c6

Browse files
committed
security notes
1 parent ffe5012 commit 3b0d3c6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ It is important to note, that despite the use-case described below for this proj
66
* [Origin](#origin)
77
* [Usage](#usage)
88
* [Example](#example)
9+
* [Security](#security)
910

1011
### Origin <a id="Origin"></a>
1112

@@ -161,4 +162,12 @@ setTimeout(function() {
161162
162163
```
163164

165+
### Security <a id="security"></a>
166+
167+
Obviously this module can expose you to some insecure situations depending on how you use it... you are providing a gateway to an external process to Node on your host machine! (likely a shell in most use-cases). Here are some tips; ultimately its your responsibility to secure your system.
168+
169+
* Ensure that the node process is running as a user with very limited rights
170+
* Make use of the uid/gid configuration appropriately to further limit the processes
171+
* Never expose calls to this module directly, instead you should write a wrapper layer around StatefulProcessCommandProxy that protects, analyzes and sanitizes external input that can materialize in a `command` statement.
172+
* All commands you pass to `execute` should be sanitized to protect from injection attacks
164173

0 commit comments

Comments
 (0)